Discussion:
[Maya-Python] dynamic attributes in AE template
Michał Frątczak
2018-07-12 15:56:31 UTC
Permalink
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
--
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+***@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.
Marcus Ottosson
2018-07-12 16:48:38 UTC
Permalink
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.
Post by Michał Frątczak
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
--
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
To view this discussion on the web visit https://groups.google.com/d/
msgid/python_inside_maya/dd1894ad-43a5-4ab9-980b-
6274fbd32c40%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/dd1894ad-43a5-4ab9-980b-6274fbd32c40%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCMbfje5Hu8Nbvw-kGyZmnLAPmpgnxKgeQQmp8%3DrLPKrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Michał Frątczak
2018-07-12 20:19:25 UTC
Permalink
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 :)
Post by Marcus Ottosson
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.
Post by Michał Frątczak
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
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/dd1894ad-43a5-4ab9-980b-6274fbd32c40%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/dd1894ad-43a5-4ab9-980b-6274fbd32c40%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/179ba8d5-897a-474b-bb71-fe76333c4a43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michał Frątczak
2018-07-13 10:35:35 UTC
Permalink
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;
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/3175bbb8-e350-4b0f-9a28-69d6aa0e4a21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...