Hi guys!

I'm trying to find a simple way to find a nodes *DagPath *connected from a 
mesh* ("worldMesh[0]") output plug.*

This is a command so it won't be inside a compute.

Here's some python prototype code (*not working*):

import maya.OpenMaya as api 
sel = api.MSelectionList() 
sel.add( 'pPlaneShape1' ) 
obj = api.MDagPath() 
sel.getDagPath(0, obj ) 


dgNode = api.MFnDagNode(obj)

aliasList = api.MPlug()
aliasList = dgNode.findPlug( "worldMesh" )

worldP = api.MPlug()
worldP = aliasList[0]

# The plug is found!
print worldP.name()


# Ok lets convert it to a dagpath!
ob = api.MObject()
ob = worldP.asMObject()

mfDgN = api.MFnDagNode(worldP.node())

pa = api.MDagPath()

mfDgN.getPath(pa)
print pa.fullPathName()

# Nope!


Any ideas? :D

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/85465a8e-2517-4fff-b891-24438d8c9522%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to