ScriptSpot

Forum topic · General Scripting

Move Grouped Object using max script

By dendenny01 · 2014-12-14

Description

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 (5)

victorgilbert · 2014-12-16

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

barigazy · 2014-12-16

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 · 2014-12-14

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]

dendenny01 · 2014-12-15

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

.

miauu · 2014-12-14


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