Simple rotate & reset xform script help! :)
Hi,
I need a script that rotates the object -90 in x, resets xform and rotates +90 again.
I've never made a script but here are some parts I found on the net:
currentMatrix = $.transform
preRotate currentMatrix (eulertoquat (eulerAngles -90 0 0))
$.transform = currentMatrix
macroScript resetxformtester
category:"Urgaffel"
toolTip:"reset xform and convert to poly"
(
on isEnabled return selection.count > 0
on execute do
(
for obj in (selection as array) do ( resetXForm obj)
for obj in (selection as array) do ( convertToPoly obj)
)
)
currentMatrix = $.transform
preRotate currentMatrix (eulertoquat (eulerAngles 90 0 0))
$.transform = currentMatrix
Would be super grateful for help with this ^_^