- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is infuriating and is driving me f--ing crazy. My functioned worked perfectly until Maya 2019. I need an easy, multi-purpose "move to this position" function that will move any object, regardless of hierarchy to an exact worldspace position.
(I have a pre-built function that gets the ws position of whatever i need. That's not the problem.)
The core elements of my function are as follows:
#pm=pymel, gp is my global proc module
lst = pm.ls(sl=True)
p = gp.getPosition(lst[0])
pm.move( p[0], p[1], p[2], lst[1], wd=True, ws=True, a=True)
for aa in lst:
print(gp.getPosition(aa))
#results:
[-30.182395949167724, 0.2428520000000023, 1.7025716656958796]
[-30.19646394918632, -0.7869360172729467, 3.198302637985919]
The results I get for printing the positions of each object AFTER the move command show different positions even though i used the ' absolute=True' kwarg:
Please help. I use my snap function in a million other pieces of code and I need it to work properly. Now every time I turn around it's behaving differently.
Thank you.
Solved! Go to Solution.