[Closed] in coordsys local
Hello,
I thought incoordsys screen would emulate the reference coordinate system of the same name, so I could say:
in coordsys screen move $.pos+=[10,0,0]
and my selected object would move 10 units to the right, no matter what viewport I had as active.
Of course Josh I hear you say, but in fact if I do this in the left or right viewports, then my object will either move up or down, and with the top or bottom viewport, either left or right.
What can I use to ensure that my selection will always move to the right?
Josh.
you could use coordsys local or coordsys parent. local moves based on the object’s pivot (which is displayed when you switch to that space in the dropdown). parent is whatever the object’s parent is, if the object is in world space then it defaults to the world axes (z up)
also maybe you already realized this if you tried to run your quoted code, but ‘move $.pos’ is redundant and errors out. just doing $.pos+=[10,0,0] is good enough.
Hi Jeremy,
Thanks for your answer but I’m afraid it doesn’t do what I want. Thanks also for pointing out the error in my code, you’re right about that. It is for illustrative purposes so not really of any importance.
Let me just iterate again,
What can I use to ensure that my selection will always move to the right independant of what viewport is selected? (OK excluding perspective and iso viewports).
Josh.
This seems to do the trick.
in coordsys (inverse (viewport.getTM())) ($.pos += [10,0,0])