How do I locate a object with missing OSM?


#1

I have got a old scene from the Max 5 days that contains “solidify” modifier that I can’t find a recompile for (max8). Can anyone tell me if there is a script or way to list any objects in the scene that contains a Missing OSM in the modifier stack?

It’s a really bis scenen so it would really help alot if it’s possible.

thank’s

-lander


#2

Hello Lander,

Yes, I can tell you.

Yes.

and here it is:


 -- written by joshuanewman
 -- www.joshuanewman.net
 
 obj=#()
 format "Find Missing OSM's
"
 format "Processing % objects
" objects.count
 for s in objects do if isgrouphead s==true then setgroupopen s true									-- open all group heads
 for s in objects do
 (
 	msg=#()
 	format "% - " s.name
 	for m=1 to s.modifiers.count do if classof s.modifiers[m]==Missing_OSM then	append obj s		-- make array of all missing modifiers
 	if msg.count !=0 then
 	(
 		format "modifiers %
" msg
 		for m=msg.count to 1 by -1 do deletemodifier s msg[m]										-- deletes missing modifier
 	) else format "none
"
 )
 select obj
 format "% objects with Missing OSM's
" obj.count
 --for s in obj do for m=1 to s.modifiers.count do if classof s.modifiers[m]==Missing_OSM do deletemodifier s m
 

J.


#3

Thank’s ALOT. I’ll give it a shot and as it will probably work I’ll spend the rest of the day crying in relief.


#4

actually,

that code is a bit redundant, but reliable (old reliable!)

let it not be said that my maxscript hasn’t advanced over the years! remember to open your groups first:


 i=getClassInstances Missing_OSM
 o=for m in i collect (refs.dependents m)[3]
 select o
 

J.


#5

I never was able to wrap my head around the scripting part of programs. I tend to give it a half hearted shot every six months or so with the usual lerning curve of: I get it, I get it, got it… No, now I don’t get it at all. I’m truly greatful for those lines. I have looked for a solution for this for a loong time. Stupid of me not to post here earlier. Anyway. I have now shed a few tears of happiness and will sleep like a baby.

Thank’s bigtime


#6

no problem, I’m glad to help. And I hope that these little snippets will inspire and help you to making that curve a little more shallow.

J.


#7

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.