Cool, Thanks Chad.

-Dave

PS, I've got pymel with git via TortoiseGit.

On Mar 18, 3:13 pm, Chad Dombrova <[email protected]> wrote:
> pymel 1.0 has support for python AETemplates using specially implemented 
> classes. there's an example included with pymel showing how to do this using 
> subclassing techniques.  you could easily write a function that created an 
> AETemplate subclass for every one of your metanodes. you may even be able to 
> do something funky like have your MetaData classes double as AETemplates.  be 
> sure to grab pymel from github, as there's been some work done on this very 
> recently.
>
> -chad
>
> On Mar 18, 2010, at 8:07 AM, thirstydevil wrote:
>
> > Based on the Bungee paper we've implemented a MetaData python class
> > that utilises a simple MPxNode as a singleton to store the MetaData
> > attributes.  MetaData structures are connected together and Maya Nodes
> > are tagged to the MetaData via message links.
>
> > for example:
>
> > class MetaData(obejct):
> >    def __init__(self, node=None, **kw):
> >         self,metaClass = self.__class__.__name__
> >         # create the MPxNode and set the attr attaching it to Node
>
> > Each MetaData subclass has different methods associated with them.
> > While I have a simple AETemplate for my MPxNode.  It's become obvious
> > that I could have a totally different template based on the metaClass
> > attribute on the node.  With buttons calling methods in the class that
> > operate on the MetaData structure.
>
> > The only hacky way I have got this working is by reloading the
> > AETemplate via a script job if the MetaData node is different to the
> > last cached MetaData selection.  This works, is slow-ish, not stable
> > because the UI doesn't seem to be thread safe.
>
> > So, I guess I have to create a different MPxNode for every subclass
> > that requires a different template.  Even though my MPxNode is
> > effectively a blank node?
>
> > Anyone?  You're experience with templates would be welcome.  I've just
> > started to investigate them.
>
> > -Dave
>
> > --
> >http://groups.google.com/group/python_inside_maya
>
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to