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.
Solved! Go to Solution.
Solved by Stephen.Blair. Go to Solution.
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
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.
You can do it like this:
AiMetaDataSetInt(nentry, "myParam", "default", 10
plug-ins\mtoa.mtd has all the metadata used by MtoA