On Dec 3, 2010, at 4:57 PM, Adam Mechtley wrote:

> I think part of the problem here is that the "types" recognized in the 
> command engine (e.g. listConnections) are somewhat arbitrary. I mean those 
> are just sort of "nice names" for some API type, right?

yes and no.  maybe for animCurve and kAnimCurve, but these API types don't even 
exist for custom nodes.  and still, is there really no lookup between these 
anywhere in the maya API?  seems like a useful thing, but maybe it's just me.

> One possibility would be to write a script that just creates a node of each 
> type and uses the nodeType command to populate a "static" dictionary in some 
> module with niceName:apiType pairs, assuming you want the same types 
> represented by nice names in the command engine.

well, luckily pymel has exactly this in interal.factories, but what if i was 
working in c++ and didn't have pymel available.  

> In the case of custom node types (e.g., apiType = kPluginDependNode), I think 
> you'd just need to rely on the MTypeID to distinguish one from another.

would certainly be nice if the iterators could just filter on MTypeID.  are 
there other exceptions that i will have to test manually other than 
kPluginDependNode subtypes?

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

Reply via email to