About this site
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Comments
I thought It was easier! so I
I thought It was easier!
so I will use simply 3 shortkeys
ctrl + g ---> group selected
shift + g ---> open group
alt + g ---> close group
here is some sketch...
...but my advice is to not use that code.
OK, here end the easy part, even above is not very safety. And closing group by selected member is a bit complicated.
What about if selected is closed group and is a part of other currently open group? The script will open selected group or will close its parent group?
If you like to close by member, more easy and safety (take care to not leave sub-groups open) w'd be if navigate (its easy) in the hierarchy using existing hotkeys:
PageUp (select ancesor)
PageDown
(select child)And once you select your group head
is easy to close it.
As for the Open/Close commands,
you can set hotkeys for both, see here:
http://www.theresidentarchitect.com/2009/11/3ds-max-shortcuts-customizat...
my recent MAXScripts RSS (archive here)
indeed!
it is very annoying when if open the group objects are deselected.
not sure about open/close toggle, but we definitely need script to open group and keep objects selected
and here is two scripts which i use instead standard ones:
1. to group (no annoying naming dialog and pivot centered at the bottom of group)
(
on isenabled return selection.count>1
on execute do (
local grname=selection[1].name
local grhead
if selection.count >1 do group selection name:(grname + "_01")
select $(grname + "_01")
for i in selection where (isgrouphead i) do
i.pivot = [($.max.x+$.min.x)/2, ($.max.y+$.min.y)/2, $.min.z]
)
)
2. to close all groups (no need to select)
(for o in objects do if isGroupHead o and isOpenGroupHead o then setGroupOpen o false)
is it possible?
so you need close last opened group by toggle? but if you need to open another group, while any already opened, it will be impossible.
I mean this: I' have a group
I mean this:
I' have a group closed. Select it, press my shortkey, and It's opened.
I' have a group opened. I select one object in the group, or the group, press my shortkey, and It's closed.
So, If I select a group or an object in a group, and I press my shortkey, the behavior, is to close if group is open. and open if the group is closed.
how about subgroups? they
how about subgroups? they also should open/close?