Scale rotated object (only one axis)

Hi.. i´m sorry to be asking so much dumb questions..

i am trying to do very simple scripts just for learning and for speed up my workflow using them for repetitive tasks..

but now again i am stucked with another simple script..

so.. how can i scale some rotated object in only one axis?

i tried something like this (as this way worked with move)

toolMode.coordsys #local
scale $ [2,1,1]
toolMode.coordsys #view

this way it still scale using the #view.. not the #local

note.. i cannot use $.scale because sometimes i want a negative scale (for mirror)
so if i do something like $.scale = [-1,1,1] i end with $.scale = [-1,-1,-1] i dont know why.

thankyou

Comments

Comment viewing options

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

for mirror i got something

for mirror i got something like this

objrot = $.rotation.z_rotation
$.pivot = $.center
$.rotation.z_rotation = 0
scale $ [-1,1,1]
rotate $ (eulerangles 0 0 objrot)
ResetPivot $

not pretty.. but works

Comment viewing options

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