calling maya guru's who know about maya attribute editor templates

584 views
Skip to first unread message

Jonathan Topf

unread,
Feb 10, 2014, 7:40:05 AM2/10/14
to apples...@googlegroups.com
I'm refreshing mayaseed to deal with the new render layer setup, part of this means creating a new attribute editor template which in maya is an ugly job to say the least. Id there anybody around who has experience with creating attribute editor templates with many `callCustom` attributes and dynamic attributes? 

Cheers

jon

haggi

unread,
Feb 10, 2014, 7:59:24 AM2/10/14
to apples...@googlegroups.com
Belive it or not, I've worked with callCustom from time to time.
Do you use python or mel for the creation of the AETemplate?

Jonathan Topf

unread,
Feb 10, 2014, 8:31:01 AM2/10/14
to apples...@googlegroups.com
Well I'm trying to keep to python if possible but its a minefield. I'm currently trying out the pymel implementation to see if thats any less painful. Luckily my questions are fairly general so shouldn't be MEL/python specific. 

The first problem I have is this: When i create a control using callCustom I supply a create command and a modify command, but the modify command seems to be only called when I select a new node, not when i update the node's attribute outside of the editor, using cmds.setAttr etc. 

The second problem is this: When i create a render settings node it should have no render layer attributes, if i create a new attribute it adds it to the extra attributes section of the attribute editor. In this case whats the process for a. choosing where this attribute is displayed, and b giving that attribute a set of callCustom commands?

Thanks haggi



--
You received this message because you are subscribed to the Google Groups "appleseed-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appleseed-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

haggi

unread,
Feb 10, 2014, 9:36:42 AM2/10/14
to apples...@googlegroups.com
Indeed, you are right, the modify command is actually called "replaceCommand" and is only called if you select a node.
And with a callCustom, it seems that they do not update if you update the attribute externally. Maybe a scriptJob can help here which updates the ui in these cases.

If you want to have some user data in an existing AETemplate, e.g. defaultRenderGlobals or something like this, you need your own AETemplate wich has to be called if a AE windows is created. To enable this behaviour you will have to register a callback like this:

 pm.callbacks(addCallback=self.aeTemplateCallback, hook='AETemplateCustomContent', owner=self.pluginName)

But you will have no influence when this element is called. The template looks like this:

https://github.com/haggi/OpenMaya/blob/master/src/mayaToAppleseed/mtap_devmodule/scripts/Appleseed/aeNodeTemplates.py

Jonathan Topf

unread,
Feb 10, 2014, 9:44:53 AM2/10/14
to apples...@googlegroups.com
Very interesting, thanks haggi. I had considered script jobs also but that seems so crazy, I wonder how its done with other plugins, for example the 3Delight render layer attribute editor has custom attributes that update on the fly

Jonathan Topf

unread,
Feb 10, 2014, 9:48:05 AM2/10/14
to apples...@googlegroups.com
I'd very much like to know more about how maya deals with this internally, there's no reason you couldn't bypass this whole thing if you could access the attribute update/node select events and just use pySide

but thats just me ranting :)

Dorian FEVRIER

unread,
Feb 10, 2014, 10:57:35 AM2/10/14
to apples...@googlegroups.com
If you don't know, you should maybe try google group: Python Programming for Autodesk Maya

https://groups.google.com/forum/#!forum/python_inside_maya

It's a very active group about Maya scripting (python at the begening but defenetely Maya scripting in general).

I know integrate renderer in Maya is a mess (never tryed myself), you could maybe ask Autodesk Maya support forum for the best place to find technical informations about this.

I guess MtoA (Arnold) integration (the scripting part) has good informations on how to deal with this kind of stuff.

Jonathan Topf

unread,
Feb 10, 2014, 11:18:22 AM2/10/14
to apples...@googlegroups.com
thats great thanks for the pointer, ill definitely check out the group!
Reply all
Reply to author
Forward
0 new messages