Move Grouped Object using max script

I am new to max and problem that i am facing is I have objects that are grouped togother there are 3 objects a box , a frame surrounding the box which has UV map and some rivets like objects on the frame. and name this group as storage
When I try to move the grouped object using max script all the objects inside the group moves move individually rather than moving as a whole like a whole.
Is there any other possible solution to do this or a method though which i can achieve the same.I my script wrong!!!

select $Storage
maxOps.cloneNodes (selection as array) cloneType:#instance newNodes:&nnl #nodialog
select nnl
nnl.pos =  [1,2,1];

Comments

Comment viewing options

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

Really informative.. It is so

Really informative.. It is so interesting for a newbie in programming like me.

barigazy's picture

...

You welcome.
This and cgTalk forum is best place for starters.
Feel free to ask anything here. There are many members who can show you the right direction.

barigazy

barigazy's picture

The simplest solution in your

The simplest solution in your case is to use first member of "nnl" array which is group helper itself and move it.

maxOps.cloneNodes (selection as array) cloneType:#instance newNodes:&nnl #nodialog
nnl[1].pos =  [1,2,1]

barigazy

dendenny01's picture

Thanks a lot barigazy you

Thanks a lot barigazy you saved my day (:D)

miauu's picture

.

(
	--	select the group, then
	in coordsys world $.pos = [0, 0, 0]
)

Comment viewing options

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