ScriptSpot

Forum topic · General Scripting

Finding and removing biped collection by maxscript

By kredka · 2013-12-10

Description

I'm looking for a way to detect if there is any biped collection in selection
and remove it - so two separate actions. Is there any way to achieve it, I found
only this but no idea how to use it, not mentioning about detection:

biped.deleteAllCopies (#posture | #pose | #track)
biped.getCopyName (#posture | #pose | #track)

I would be gretefull for help.

Comments (3)

Thank You very much, work great.

kredka · 2013-12-10

This is exucly what I needed.

barigazy · 2013-12-10


-- delete scene bipeds
delete (for o in objects where isKindOf o Biped_Object collect o)

barigazy · 2013-12-10


-- delete all copies
if selection.count != 0 do
(
for b in selection where isKindOf b Biped_Object do
(
if biped.numCopies b[3].track #posture != 0 do biped.deleteAllCopies b[3].track #posture
if biped.numCopies b[3].track #pose != 0 do biped.deleteAllCopies b[3].track #pose
if biped.numCopies b[3].track #track != 0 do biped.deleteAllCopies b[3].track #track
)
)