import maya.cmds as cmds
obj= cmds.polySphere(r= 1, sx= 20, sy= 20, ax=[0, 1, 0], cuv= 2, ch= 0)
cmds.select(obj, r=1)sels= cmds.ls(sl=1)
result= cmds.listRelatives(sels[0],c=1, s=0)
for r in result:
if cmds.objExists(r+"tx"):
print "This is daggy"
Hi Jeremy,
Almost all nodes in Maya is inherited from some other node; e.g. shape inherits dagNode.
You can query this inheritance using the cmds.nodeType command:
from maya import cmds
if 'dagNode' in cmds.nodeType('pCubeShape1', inherited=True):
print "This is a dag node"
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1751a6c9-4611-45ae-b92f-dbcb41e14a56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/3aa1bb9a-7d38-46ab-8c02-1d3e864a59d6%40googlegroups.com.
Gah! Of course thanks again Marcus :)
You’re welcome. :)
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAJrOGy_kN40P%3DGzGG%2BTbgtEOeCZxODn2BRageuNykPdFcrZwAQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA2FD_K70Fuc-V5ofPjAB1_AOkXfUOGOb9SoMJdt9-Zng%40mail.gmail.com.