Unknown property Error Seek help

This should be a beginner's question, but I have not really figured out why this is so.

Can someone help me answer this question?

fn SetMaterialTexmap abc =(	
 
	for i in selection do ( 
 
	i.material.abc = "newname"
 
	)
)
 
on Btn pressed do ( 
 
	SetMaterialTexmap name
)  
<code>
 
---------------------------------------------------------------
 
 
 
error:
<code>
MAXScript Rollout Handler Exception:
Unknown property: "abc" in 100:VRayMtl
MAXScript callstack:
thread data: threadID:12184
<code>
AttachmentSize
22.jpg70.01 KB

Comments

Comment viewing options

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

`

If abc variable is a new name - then it should be:

fn SetMaterialTexmap abc = (	
 
	for o in selection where o.material != undefined do ( 
 
		o.material.name = abc
 
	)
)

But this way all materials of selected objects will get same (not unique) name

Comment viewing options

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