Move selected group to 0,0,0

Everybody hellow!Pleaze,help, how can i select a group of objects?
1. I select objects
2. Push MAKE GROUP from SELECTION
3. Need a command to select this group or any other group to do SELECTION.POS=[0,0,0]

s = selection
s.pos=[0,0,0]

But it work for each object in a group.

How can i do it for whole GROUP, no for each obj in group?
Thanx for advance)

Comments

Comment viewing options

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

Reader

Selection group and working for the selection group is better. I want to choose uk best essays but i want to study about it. Because i have not more information about it which were not mention in the give page so hope you come and start your work.

fajar's picture

little bit

a=group selection name:"temp_group"
b=point pos:[(a.min.x+a.max.x)/2,(a.min.y+a.max.y)/2,a.min.z]
setGroupHead b true
a.pos= [0,0,a.min.z]--change a.min.z to 0 to perfectly put it 0 
ungroup a

--select something first and run the script....you can make it a function tooo

EPXLSD's picture

Hellow, fajar) Thank u, i've

Hellow, fajar) Thank u, i've already tried this way. Group selection, move group to 0,0,0, and then ungroup. But UNDO function doesnt work! Max crashes((

EPXLSD

miauu's picture

.

(
	function FindTopMostGroupHead obj = if isgroupMember obj do
	(
		while obj != undefined and (not isGroupHead obj or isGroupMember obj) do
			(obj = obj.parent)
		obj
	)
 
	selObjsArr = selection as array
	if selObjsArr.count != 0 do
	(
		for o in selObjsArr do
		(
			grpHead = FindTopMostGroupHead o
			if isValidNode grpHead do
				grpHead.pos = [0,0,0]
		)
	)
)
crystal3d's picture

thank you very much

MIAUU!

subfeel's picture

thanks a lot!!! it works =)

thanks a lot!!! it works =)

Exhibition Design: https://www.behance.net/subfeel

EPXLSD's picture

MIAUU,Thank u very much!!!

MIAUU,Thank u very much!!!

EPXLSD

Comment viewing options

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