PDA

View Full Version : Python AETemplates - how?


haggi
12-11-2010, 09:46 PM
I discovered the AETemplates.py script and I was happy that we now can use python for AETemplates. Unfortunatly my template does not work. Following the instructions in the example file I created the following:

- A package called AETemplates
- In this package I created a module called AEmySurfaceShaderTemplate because my node is called mySurfaceShader
- In this module I defined a pymel.ui.AETemplate subclass called AEmySurfaceShaderTemplate

The package is available in maya so I suppose the path is correct. I can import the module and create a class instance with AEmySurfaceShaderTemplate().

But as soon as I create a new shader of type mySurfaceShader, there is no sign of any AETemplate at all. It is simply not called.

Did I miss something?

haggi
12-12-2010, 02:20 PM
Forget it. Works now. Seems I forgot to import pymel before using the Template.

CGTalk Moderation
12-12-2010, 02:20 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.