Does this not work properly for you? $ mayapy
import maya.standalone maya.standalone.initialize() import maya.cmds as cmds sphere1 = cmds.polySphere() sphere2 = cmds.polySphere() cmds.parentConstraint(sphere1, sphere2, maintainOffset=True) # [u'pSphere2_parentConstraint1'] cmds.parentConstraint(sphere2, q=True, tl=True) # [u'pSphere1'] What version of maya? Is there something different in your situation than my test? On Wed, Jun 13, 2012 at 12:27 PM, Sudeepth Patinjarayil <[email protected]>wrote: > Hi, > > i am not able to get parent of an object in maya python standalone > (mayapy). i used "parent = maya.cmds.parentConstrain ([obj], q=True, > tl=True)". when using in standalone i was not able to get the result. but > if i paste the same code inside maya script editor i am getting the result. > > please give me some solution for this problem. > > Thanks and regards, > Sudeepth Patinjarayil. > > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
