script request - attach objects with same materials

Hi all

I have a script idea that would be of tremendous help and time saving.

I always do my modelling in sketchup and then import it into 3DS Max (using VRAY as the renderer). Now in sketchup, when you apply materials, the material name remains the same when imported into sketchup.

So my usual workflow would be this:

1 - Model in sketchup and apply placeholder materials (ie glass/woods) and then i group them by material in sketchup.
2 - Import the sketchup file into 3DS Max
3 - In 3DS, i open the material editor, select an object in the scene (ie the glass material) and within the material editor, i press the 'select by material' and this selects all the window panels which have the glass material applied (which I had done in sketchup). I then isolate this, attach them all and then go on to the next material and do the same.

This process in quiet time consuming and I was hoping someone could develop this script? Id be more than happy to pay for your time?

So the idea of the script will be to:

1 - attach all imported objects by material name (so for instance, if i colour pick 'GLASS' material, it will search the scene for any objects with the material name 'glass' and attach them. The prep work in sketchup needs to be accurate and one must name the materials properly in sketchup for this script to work obviously.

2 - re-applying a specific material from the 3DS Max Library (ie pre-created VRAY glass material)

3 - alternate option to apply an auto UVW MAP

If this is somehting you can assit with id be very grateful. Like i said id be more than happy to pay for such a script.

Thanks

Comments

Comment viewing options

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

attach with same material

Hi, there was similar request before.

Take a look on this script:

http://www.scriptspot.com/forums/3ds-max/scripts-wanted/attach-all-objec...

Best,

AttachmentSize
attach_objects_with_the_same_material.ms 463 bytes
pixamoon's picture

attach with same name + apply mat

Actually something more like this:

(
	clearSelection()
 
	uObjNames = #()
	for o in objects do appendifunique uObjNames (o.name as name)
 
	for OName in uObjNames do 
	(
		a = convertToPoly(getNodebyname Oname)
		for o in objects where a != o and o.name as name == OName do a.attach o a
	)	
	for m in currentMaterialLibrary do 
		for o in objects where o.name as name == m.name as name do o.material = m
 
)

This will attach all objects with the same name (not case sensitive) + apply material with same name form current mat library

And what kind of UV maps you want to apply ? Just regular box or Real World ?

Best,

AttachmentSize
attach_objects_with_same_name.ms 386 bytes

Comment viewing options

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