open/close all/selected groups

1 vote
Version: 
v 0.2
Date Updated: 
04/04/2013

open-close-group

This macro-script is meant to use as a shortcut. It can open or close all or all selected groups in the scene.
I use "STRG + SHIFT + G" to open all groups and "STRG + G" to close all groups but you can change it to whatever you prefer.

 

Additional Info: 

Usage:
1) Run the .mcr file
2) Go to "Customize" -> "Customize User Interface" -> "Keyboard" -> "Category" -> "Custom"
3) define your desired shortcuts

You can also make some button if you like.

The credits belong to "Swordslayer" as i used his code for this macro: http://www.scriptspot.com/forums/3ds-max/general-scripting/open-all-groups-and-sub-groups

When i saw the thread i realised  that this macro could be very helpful. At least for my daily work. So i always have all groups closed and just open all groups for editing an object. As soon i am done i close all groups again. A good timesaver.

 

Update version 0.2:

- added two actions "open visible groups" + "close visible groups"
- added messagebox with info with category name of actions

 

Version Requirement: 
works in max design 2011 + 2013 64 bit.
AttachmentSize
openclose-groups_v02.zip675 bytes

Comments

Comment viewing options

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

why not making open group a

why not assign "open group" a keyboard shortcut let say :
---> costumize -->keyboard --> category [Groups] Group Open --> Assign keyboard to Group Open ex : Ctrl+Shift+R

let select closed group [ multiple selection is OK ] and then press Ctrl+Shift+R...closed group should be opened.....you know what you do next....I guess

ninjutsu3D's picture

not sure I did what you said

not sure I did what you said correctly as it dont seem to work.

But anyway waiting for the script creator to reply!

thx!

tassel's picture

I guess this works (I Dont

I guess this works (I Dont have max here right now, so i have not tested)

for o in group_arr where not o.isHidden do

Integrated in Open All Groups:

macroScript OPEN_ALL_GROUPS Category:"Custom" toolTip:"open all groups" (
	fn openGroupsAll objs toggle= (
		group_arr = for o in objs where isValidNode o AND isGroupHead o collect o
 
		with redraw off (
			for o in group_arr where not o.isHidden do (
				setGroupOpen o toggle
				-- ungroup o
			) -- end for
		)-- end redraw
	) -- end fn
 
	openGroupsAll objects true
)

/ Raymond

ninjutsu3D's picture

question modifs

Hi,

first of all great job this script is really handy for us here.

One thing though, would it be possible to make it so that it don't open the groups that are hidden?

Right now, it opens the groups of objects that are on hidden layer.

Let me know!

Thx!

barigazy's picture

+1

Cool idea. Recently I've been thinking about *Group Manager* tool similar to Layer Manager. Maybe someone can write this soon.
Anyway, keep up the good work.
Cheers!

bga

Comment viewing options

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