I can't seem to add a macroscript above this maxscript. Was wondering if someone could help take a look at it for me? Reads as follows...
/* This will reset transforms & rotate the pivot so Y is up. */
macroScript ResetXFormCollapseRotate
category:"Custom Tools"
buttonText:"XForm++"
toolTip:"Reset XForms & Rotate Pivot"
(
on execute do
(
ResetXForm $
macros.run "Modifier Stack" "Convert_to_Poly"
fn RotatePivotOnly obj rotation =
(
local rotValInv=inverse (rotation as quat)
animate off in coordsys local obj.rotation*=RotValInv
obj.objectoffsetrot*=RotValInv
obj.objectoffsetpos*=RotValInv
)
RotatePivotOnly $ (EulerAngles 90 0 0)
)
)
edit: I should add this works fine and does what I want otherwise. It's just when those first 4 lines for the macroscript are added it wants to break as it approaches the "fn". I'm a bit of a maxscript n00b so any help would be appreciated...
Replies
so strange how without the 4 macroscript lines it still works... But I really need to turn this into an easy click button so the macroscript is really needed.