dynamic attributes in AE template

38 views
Skip to first unread message

Michał Frątczak

unread,
Jul 12, 2018, 11:56:31 AM7/12/18
to Python Programming for Autodesk Maya
Hi
Is there any method to collect all dynamic attributes into one tab in AE ?
This would need to by dynamic, so any new attrib get's displayed in that tab
.
thanks

Marcus Ottosson

unread,
Jul 12, 2018, 12:48:41 PM7/12/18
to python_in...@googlegroups.com
This should already happen, dynamic attributes are added to the bottom grouping, under "Extra Attributes". Does this not happen for you? Or do you mean an actual tab, as what you get per node? That could prove a little more challenging.

--
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 python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/dd1894ad-43a5-4ab9-980b-6274fbd32c40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michał Frątczak

unread,
Jul 12, 2018, 4:19:25 PM7/12/18
to Python Programming for Autodesk Maya
Hey Marcus !
Actually I need all custom attr whose name is "se_*" to be groupped under custom editorTemplate -beginLayout/-endLayout
My node's workflow depends heavily on these attributes being added/removed by user so I want them in one place instead burried in "Extra Attributes" haystack :)

Michał Frątczak

unread,
Jul 13, 2018, 6:35:36 AM7/13/18
to Python Programming for Autodesk Maya
I think I solved it with a little ugly hack


global proc mfVoxelizer_DynAttrs_New(string $plug)
{

}
global proc mfVoxelizer_DynAttrs_Replace(string $plug)
{
// THIS DOES NOT WORK WHEN PLACED IN THIS PROCEDURE

/*
string $temp[];
tokenize $plug "." $temp;
string $node = $temp[0];

string $se_attrs[] = get_se_attrs($node);
for($attr in $se_attrs)
{
print "!!!!!!!!! "; print $attr; endl;
editorTemplate -addDynamicControl $attr;
}
*/

// ugly hack
evalDeferred -lp "refreshEditorTemplates"; // no evalDeferred causes CRASH

}



editorTemplate -beginLayout "Dynamic Attributes"  -collapse 0;

string $se_attrs[] = get_se_attrs($nodeName);
for($attr in $se_attrs)
editorTemplate -addDynamicControl $attr; // can't put this into mfVoxelizer_DynAttrs_Replace

editorTemplate -callCustom "mfVoxelizer_DynAttrs_New" "mfVoxelizer_DynAttrs_Replace" "";

editorTemplate -endLayout;


 
Reply all
Reply to author
Forward
0 new messages