can anyone explain this to me.  the MPlugs that are returned by
MFnDependencyNode.findPlug are not working properly, while those
retrieved from an MSelectionList are.  ( 2008ext2 )

import maya.OpenMaya as api

sel = api.MSelectionList()
sel.add( 'persp' )
obj = api.MObject()
sel.getDependNode( 0,  obj )
fn = api.MFnDependencyNode( obj )

sel.add( 'persp.worldMatrix' )
plug1 = api.MPlug()
sel.getPlug(1, plug1)
# networked
plug2 = fn.findPlug('worldMatrix', True)
# non-networked
plug3 = fn.findPlug('worldMatrix', False)

# they're all he same
print plug1 == plug2 == plug3

# works
print api.MFnMatrixData( plug1.asMObject() ).matrix()
# fails
print api.MFnMatrixData( plug2.asMObject() ).matrix()
# fails
print api.MFnMatrixData( plug2.asMObject() ).matrix()
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to