Hey guys,

I need your help with AETemplate, i am working on something which requires 
me to use arrays.

So in my node, I have 4 inputs and thus creating a for loop with size of 
inputs and named as Layers.

I am writing it in cpp file use MString

Here is my code:
MString ae("");
ae += " global proc AENodeTemplate( string $nodeName )\n";
ae += "{\n";
ae += "print(\">>>>>>>>>>START<<<<<<<<<<<\");\n";
ae += "editorTemplate -beginScrollLayout;\n";
ae += "int $size = `getAttr -s ($nodeName+ \".layers\")`;\n";
ae += "for ($i = 0; $i < $size; $i++){\n";
ae += " editorTemplate -beginLayout (\"Layer \"+$i);\n";
ae += " string $attr = $nodeName+\".layers[\"+$i+\"].radius\";\n";
ae += " editorTemplate -addControl $attr;\n";
MGlobal::executeCommand(ae);

When i try this code, its not giving me anything in my AE template.

Is there a way to deal with arrays.

Thanks in advance.

Dilen.



-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/3d3139c9-0ced-4a88-94b3-52ff136ed8ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to