Notifications
Clear all

[Closed] how to?

Hi all
I am trying to write a script to open all groups.
Even though we can do it by menu it’s a leboriuos job if their are hundreds of subgroups.

But Iam stuck at running an “if” statement.

I am using max9

Thanks in advance.

3 Replies

This might work out, but I have not properly tested it




--Filters through all objects in the scene, picks out the closed groupheads and opens them
for o in objects where ((isgrouphead o) and (not isOpenGroupHead o)) do 
				(
				setGroupOpen o true
				) 



you could replace the word “objects” with “selection” for it to work on a current selection.

This might not be the best/fastest way, but I think it does the job. Have not really got time to test it im afraid

Good luck!

Rich

thank u very much Rich

Thanks for the quick response.
I will give it a try

I’m self-taught, the rest of things I hit, I come here… that said, there used to be a great file that came with 3ds Max, “demo.ms”, that went over the very basics that would’ve been a good start. The help file itself is full of examples as well (see the “How To…” topics). Beyond that, I’d look into Bobo’s materials.

But why not check out the resources thread? I’m sure the question’s been answered before
http://forums.cgsociety.org/showthread.php?f=98&t=64294