Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Parameters when using code rather than mtd files

4 ANTWORTEN 4
GELÖST
Antworten
Nachricht 1 von 5
Anonymous
446 Aufrufe, 4 Antworten

Parameters when using code rather than mtd files

Hi all,

So I can't find any examples of how to create parameter registrations when you're using c++ rather than mtd files. Is this possible? There weren't any obvious function names that appeared like they would add the [attr type] blah blah data you see in the adding parameter examples here https://docs.arnoldrenderer.com/display/A5AFMUG/Adding+Parameters

I'm guessing I'll be told I have to switch to mtd (sad face), but I'd rather make things as self contained as possible, rather than having many files as that increases the opportunity for people to get it wrong.

In my case this is for a camera node, incase that changes anything.

Cheers,

Alan.

Tags (3)
Beschriftungen (3)
4 ANTWORTEN 4
Nachricht 2 von 5
Stephen.Blair
als Antwort auf: Anonymous

In node_parameters you can call things like AiMetaDataSetBool

instead of using the mtd file to set the metadata on parameters registered by the plugin




// Stephen Blair
// Arnold Renderer Support
Nachricht 3 von 5
Anonymous
als Antwort auf: Stephen.Blair

Hi Stephen,

Thanks, how do I get this expose to camera parameter in the maya interface?

As below, just use the same value as the parameter registration? Jus declaring the parameter with AiParameterInt hasn't been sufficient to get them appearing for me.

node_parameters

{

AiParameterInt("myParam", 7);

AiMetaDataSetInt(nentry, NULL, "myParam", ???whatDoIPutHereToGetTheValueOfTheRegisteredParameter???):

}

Cheers,

Alan.

Nachricht 4 von 5
Stephen.Blair
als Antwort auf: Anonymous

You can do it like this:

AiMetaDataSetInt(nentry, "myParam", "default", 10

plug-ins\mtoa.mtd has all the metadata used by MtoA





// Stephen Blair
// Arnold Renderer Support
Nachricht 5 von 5
Anonymous
als Antwort auf: Stephen.Blair

Thanks so much. Super appreciated.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report