I try to find and delete space warps which are not binded to any objects.
I was searching in ma-xhelp however I haven't seen anything about how to get spacewarps - bind-unbind
properties. Maybe someone know how to detect it ad remove. The best way for me if script could search in two variants: on scene by classes and
in selection.
Forum topic · General Scripting
Remove not binded space warps
By kredka · 2013-11-28
Description
Comments (5)
kredka · 2013-11-29
thank you:)
nevertheless question:)
kredka · 2013-11-29
Today I tried to use this commands however there are some issues:
Second and Third script don't work.
How can I do opposite? I mean instead of finding and deleting unbinded spacewarps to find and delete bineded spacewarps?
barigazy · 2013-11-29
Is not it obvious?
Just change "==" to "!=" :)
kredka · 2013-11-28
many thanks, work perfect no questions about:)
barigazy · 2013-11-28
-- delete non-binded space warps
delete (for s in SpaceWarps where (refs.dependentNodes s).count == 0 collect s)
-- delete selected space warps that are non-binded
delete (for s in selection where isKindOf s SpaceWarps and (refs.dependentNodes s).count == 0 collect s)
-- delete space warp modifier of not existing space warp
for o in objects where o.modifiers.count != 0 do
(
for m = o.modifiers.count to 1 by -1 where isKindOf o.modifiers[m] SimpleOSMToWSMMod and (refs.dependsOn o.modifiers[m]).count == 0 do deleteModifier o m
)