ScriptSpot

Forum topic · General Scripting

Convert Groups to Nulls

By lomarx · 2014-12-23

Description

Hi guys,
I use to import Inventor files with 3DS Max and it works very well. The only annoying thing is that it creates groups and sub groups instead of parented null objects, so if i have to select an object, i have to open group, and open sub group ecc ecc.

Is there a script that convert groups to nulls ?

Thank you

Lomarx

Comments (5)

Need Help Please!

JohnLanius · 2017-08-04

(

delete (for obj in helpers where isGroupHead obj collect
(
setGroupOpen obj true
obj.children.parent = in obj.parent Point name:obj.name transform:obj.transform
obj
)
)
select helpers
$.Box = on
max select none

)

I need to have the above code only be applied to selected groups in the scene. Any info would be helpful. Thanks.

Try this:

Swordslayer · 2014-12-28

Try this (be sure to backup your file before that):

delete \
(
	for obj in objects where isGroupHead obj collect with redraw off
	(
		setGroupOpen obj true
		obj.children.parent = dummy name:obj.name pos:obj.pos boxSize:obj.boxSize parent:obj.parent
		obj
	)
)

kirillall · 2017-07-25

Not working in 2016. Can you update it please. Thank you.

fajar · 2014-12-24

null ? no group ?

lomarx · 2014-12-24

Yes,I'd like to convert the group in a null object, where all the objects inside the original group be parented to the new null object..
Sorry for my English, i hope you understand me.