1
General CG Discussion / Mess with MassFx/ Physics plugin garbage...
« on: 2024-05-02, 12:38:39 »
Sometimes it is very hard to fight with hidden MassFx/ Physics plugin garbage, although you already have updated plug-in installed, etc...
Those 2 scripts may help to clean up the scene, but please, be aware, as the changes are not reversible, so save the scene before starting the script.
I collect them randomly on the net...and it is always good manner to start the script from *.ms file, not maxscript listener...
2 scripts....
(
fn hasMassFXMod o =
(
result = false
if o.modifiers.count > 0 then
(
for t = 1 to o.modifiers.count do
(
if (classof o.modifiers == MassFX_RBody) then
result = true
)
)
result
)
clearSelection()
for obj in objects do
(
if hasMassFXMod obj then
selectMore obj
)
)
pxStuff = #(UConstraint, pxJoint, Skeleton, nvRagdoll, nvBox, nvCapsule, nvSphere)
for i in objects do for j in i.modifiers do if (classof j==MassFX_RBody) do deletemodifier i j
for i in objects where (finditem pxStuff (classof i))>0 do delete i
Those 2 scripts may help to clean up the scene, but please, be aware, as the changes are not reversible, so save the scene before starting the script.
I collect them randomly on the net...and it is always good manner to start the script from *.ms file, not maxscript listener...
2 scripts....
(
fn hasMassFXMod o =
(
result = false
if o.modifiers.count > 0 then
(
for t = 1 to o.modifiers.count do
(
if (classof o.modifiers == MassFX_RBody) then
result = true
)
)
result
)
clearSelection()
for obj in objects do
(
if hasMassFXMod obj then
selectMore obj
)
)
pxStuff = #(UConstraint, pxJoint, Skeleton, nvRagdoll, nvBox, nvCapsule, nvSphere)
for i in objects do for j in i.modifiers do if (classof j==MassFX_RBody) do deletemodifier i j
for i in objects where (finditem pxStuff (classof i))>0 do delete i