Nested/Compound Ramp Attribute AETemplate

103 views
Skip to first unread message

Dilen Shah

unread,
Mar 3, 2016, 8:26:47 AM3/3/16
to Python Programming for Autodesk Maya
Hey guys,

Is there a way to create ramp attribute for compound array attributes.

For example: this works AEaddRampControl($nodeName + ".falloff")

But how can i achieve this: AEaddRampControl($nodeName + ".layers[i].falloff")
always give me error: Error: file: /servers/Software/Autodesk/Maya/2014_ext_sp1/scripts/AETemplates/AEaddRampControl.mel line 281: No object matches name: customNode.customNode.layers[0].falloff

i tried this method also string $falloffAttr = "layers["+$i+"].falloff";
AEaddRampControl ($falloffAttr);

i get this error: Error: file: /servers/Software/Autodesk/Maya/2014_ext_sp1/scripts/AETemplates/AEaddRampControl.mel line 487: Found no attribute match for "layers[0].falloff"


Any ideas?

Thanks.

Dilen.

Chad Vernon

unread,
Mar 3, 2016, 4:31:31 PM3/3/16
to Python Programming for Autodesk Maya
Ramps don't work in compound attributes.  You have to do a workaround where you have a dummy ramp attribute that's not a compound attribute and connect whatever ramp you are working with the dummy ramp. Also the ramp evaluation methods don't work with ramps in compound attributes so to evaluate the data you need to copy the ramp data into another dummy ramp and use the evaluate methods on that one.

Dilen Shah

unread,
Mar 4, 2016, 2:53:18 AM3/4/16
to Python Programming for Autodesk Maya
Hey Chad,

Thanks for your reply! I thought so that it was not possible because i tried every possibility :P.

Just one more thing, in arrays we have "Add New Item" button, is there a preset way of adding it in my AETemplate or by using "AEnewNonNumericMultiAddNewItem".

Thanks.

D.
Reply all
Reply to author
Forward
0 new messages