Ihis is the script I use. If you use it in a menu, it has a little checkmark to show that it is toggled on.
We always use it to prevent cameras from getting bumped.
=================
macroScript LockUnlockObjects category:"Rhys Tools" tooltip:"Lock/Unlock Objects" buttontext:"Lock/Unlock Objects"
(
on isEnabled do (
selection.count >= 1
)
on isChecked do (
if selection.count >= 1 do(
i = getTransformLockFlags selection[1]
i.numberSet > 0
)
)
on execute do (
if selection.count >= 1 do (
for obj in selection do (
i = getTransformLockFlags obj
if (i.numberSet > 0) then (
setTransformLockFlags obj #none
) else (
setTransformLockFlags obj #all
)
)
)
)
)
We always use it to prevent cameras from getting bumped.
=================
macroScript LockUnlockObjects category:"Rhys Tools" tooltip:"Lock/Unlock Objects" buttontext:"Lock/Unlock Objects"
(
on isEnabled do (
selection.count >= 1
)
on isChecked do (
if selection.count >= 1 do(
i = getTransformLockFlags selection[1]
i.numberSet > 0
)
)
on execute do (
if selection.count >= 1 do (
for obj in selection do (
i = getTransformLockFlags obj
if (i.numberSet > 0) then (
setTransformLockFlags obj #none
) else (
setTransformLockFlags obj #all
)
)
)
)
)
Comment