coordinates in pymxs

Hello,
I need to replicate

in coordsys parent (
...
)

to the pymxs syntax but I dont know how :( any ideas?

I came with this but it not work

import pymxs

coords = pymxs.atlevel
rt = pymxs.runtime

def get_object_by_path(path):
converted_path = path.replace("|","/")
max_object = mxs.execute("$" + converted_path)
return max_object

p1=get_object_by_path("Point001")
p2=get_object_by_path("Point002")

getpos = p1.position
getrot = p1.rotation
getsca = p1.scale

p1.parent = p2

with coords("parent"):
p1.rotation = getrot
p1.position = getpos
p1.scale = getsca

Thanks for any help!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
yopakkaau1969's picture

There is no need to fear in.

There is no need to fear in. That is the requirement. - Mark Zokle

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.