Notifications
Clear all

[Closed] same name object uvw copy

hello freind i need some help

  1. i selected 10 objects in scene
  2. in scene objects except selected 10 obects ,if object name is same , i would like to apply same uvwmap modfier with selected objects

result

above is auto uvwmap copy script with selected object

3 Replies

This is pretty simple, did you give it a try at creating the script yourself ? we like to see at least some effort from people in this Forums :D.

Cheers,
PePe

sorry i am script beginner
so i can;t upload
this is my ugly code
work didn’t work

can you modify some

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 

																																		
																				

																				)

																			

																						    
								
								
								
								
								
								
														
	                     							 
						 					     	)
												
								 			)
						  
						  )

			     )	

   
)

sorry i am script beginner
so i can;t upload
this is my ugly code
work didn’t work

can you modify some

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 

																																		
																				

																				)

																			

																						    
								
								
								
								
								
								
														
	                     							 
						 					     	)
												
								 			)
						  
						  )

			     )	

   
)