PDA

View Full Version : AETemplate Dynamic Array Attribute


Inos
11-05-2011, 08:27 PM
Hello everyone,

I have a custom node with some attributes, one of which is an array.
This array can change its length, depending on the value of some other attribute.

The problem is, the new array fields are not shown in the attribute editor, but if I click the "Copy Tab" button, which opens the attribute editor in a new window, the new window displays them correctly.

I've tried the resetAE MEL command, but it gives me an error for the array attribute: AEreplaceCompound "MayaWindow|MainAttributeEditorLayout|formLayout2|AEmenuBarLayout|AErootLayout|AErootLayoutPane|AEbaseFormLayout|AEcontrolFormLayout|AttrEdHairShapeFormLayout|scrollLayout1|columnLayout6|frameLayout12|columnLayout7|columnLayout8|frameLayout97" "HairShape1.segments_count" "" ;
// Error: file: C:/Program Files/Autodesk/Maya2011/scripts/AETemplates/AEreplaceInt.mel line 44: Object 'MayaWindow|MainAttributeEditorLayout|formLayout2|AEmenuBarLayout|AErootLayout|AErootLayoutPane|AEbaseFormLayout|AEcontrolFormLayout|AttrEdHairShapeFormLayout|scrollLayout1|columnLayout6|frameLayout12|columnLayout7|columnLayout8|frameLayout97|columnLayout267|' not found. //

I've also gone through all the posts on cgsociety concerning AETemplates, but nothing seems to work.
Does anyone know how to "rebuild" (delete->create) the attribute editor or perhaps delete the given attribute and later rebuild it?

Thanks in advance,
Inos

Azrail
11-07-2011, 01:13 PM
If you have a custom template for you node, and you are using the -callCustom flag the 'replace' procedure is the one, which can rebuild your UI. The nice thing is that you can test easy, if you register a procedure with the same name in Maya, because it's called on every AE refresh, so you can build your UI without constantly restarting Maya, so the AE templates get reinitialized. Also depending of what you plan to do with the array attribute, I would recommend building your own interface for that attribute, because the AE has a limit of ~ 20 array entries that can be displayed, the rest of them are not visible.

CGTalk Moderation
11-07-2011, 01:13 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.