same name object find and...

sorry many ask
always i have a question ~~

today qeustion is

1.i selcted many objects

2. there is same name objects

3. example) first box1 object( there is extrude modifer)
second box1 object ( there is no modier)

4. i would like to apply same name objects to same extrude modifier in selected objects

can you understand ?

Comments

Comment viewing options

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

this is my work code

i made today
but that didn;t work

can you some modify

S=#()

tst = #()
tst2 = #()
sel= $

for z in selection do

(

for h in z.modifiers do (if classof h == uvwmap then (append tst h))

for o in objects do

(

if z.name==o.name then

(

if tst.count > 1 then
(
tmp = copy z.modifiers[#UVW_Mapping]
deleteModifier z z.uvw_mapping
--addmodifier o tmp

)

else

(

if tst.count == 0 then
(

tmp = copy z.modifiers[#UVW_Mapping]

for h in o.modifiers do (if classof h == uvwmap then (append tst2 h))

if tst2.count <= 1 then
(

deleteModifier o o.uvw_mapping
)
else
(
if tst2.count == 0 then
addmodifier o tmp
deleteModifier o o.uvw_mapping

)

)

)

)

)

)

Comment viewing options

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