Pages

Saturday, February 20, 2010

Access Custom Attributes


The Custom Attributes (CAs) is a kind of scripted plugin. The CAs itself is the "key" for making a good rigging, but they also can be used for other tasks, to store persistent data in the scene, for example. Well, global persistent variables (GPV) do the same, but... they not recommended to be used (and I agree). GPV was added just to fix the "hole" in XRef development and not need anymore in Max 9 and higher. Never mind how you plan to use CAs, you'll need to know how to access them.


The problem here is that - there is a lot useful function to menage your CAs that you can find in the help, but... all of them expect CAs definition instance, so firt we need to collect the definition to a variable. This is noted in the help, but... no any simple how to example. Most typical mistake for beginners is to try to use CAs name (insted of definition). This is OK for scripted structs, but not applicable to CAs, so... we need to find your CAs by name and assign it instance to a variable, and this is what I done - example function to find Custom Attributes by name.

Ok, to not rewrite whole post just read out this forum topic. It cover how to access CAs by name, plus how to access stored functions or variables in CAs.

No comments:

Post a Comment

Thanks for your comment