Remove not binded space warps

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.

Comments

Comment viewing options

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

thank you:)

thank you:)

kredka's picture

nevertheless question:)

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's picture

...

Is not it obvious?
Just change "==" to "!=" :)

bga

kredka's picture

many thanks, work perfect no

many thanks, work perfect no questions about:)

barigazy's picture

...

-- 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
)

bga

Comment viewing options

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