copy/paste mod and mat

Hello
Anton Berg made a script (http://www.scriptspot.com/forums/3ds-max/scripts-wanted/replace-geometry...)
to copy/paste mod and/or material from one object to another.
My problem :
- I have 10 objects with modifiers (or no) and material applied (or not).Named A01, B01, C01,..
- I have 10 other objects with no modifiers and no material applied, named A02, B02, C02,...
- I want to select some objects with "01" suffix and click a button
and tadaaa
- corresponding objects with suffix "02" have same modifiers and material applied
I mean A01 -> A02, B01 -> B02,...

My solution :
- you
- santa claus
- ?
Thanks for help ! :-))

Comments

Comment viewing options

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

example

-- to select all objects with suffix "01":

select ( for obj in objects where \
	obj.name.count == (findString obj.name "1") and \
	obj.name.count-1 == (findString obj.name "0") collect obj
)

my recent MAXScripts RSS (archive here)

br0t's picture

Hello Anubis, I suggest that

Hello Anubis,
I suggest that the "\" in your code is only used to tell MaxScript that this line of code is continued in the next line? So just to have it more clearly arranged? I have no possibility to look it up myself in the help files right now,so i thought I just ask :)
Greetings

Never get low & slow & out of ideas

titane357's picture

Hello Anubis ! Happy new year

Hello Anubis ! Happy new year !
Thanks for help :-)) : now I can select just objects I need.
I think I'll stop here, because I lake to much script knowledge... :-(

Anubis's picture

Yes

- Yes, Br0t, exactly, the "\" tell that current line is continued in the next line.
- Thanks Titane :)
Happy new year to both!

my recent MAXScripts RSS (archive here)

br0t's picture

Thanks Anubis, and happy new

Thanks Anubis, and happy new year to you as well :)

Never get low & slow & out of ideas

Comment viewing options

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