Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Parameters when using code rather than mtd files

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
alan-LFL
239 Views, 4 Replies

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)
Labels (3)
4 REPLIES 4
Message 2 of 5
Stephen.Blair
in reply to: alan-LFL

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
Message 3 of 5
alan-LFL
in reply to: 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.

Message 4 of 5
Stephen.Blair
in reply to: alan-LFL

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
Message 5 of 5
alan-LFL
in reply to: Stephen.Blair

Thanks so much. Super appreciated.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report