ScriptSpot

Forum topic · Scripts Wanted

copy/paste mod and mat

By titane357 · 2010-01-13

Description

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

example

Anubis · 2010-01-14

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

titane357 · 2010-01-15

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... :-(

Yes

Anubis · 2010-01-16

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

br0t · 2010-01-16

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

br0t · 2010-01-16

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