ScriptSpot

Forum topic · General Scripting

Unknown property Error Seek help

By 499748065 · 2018-10-15

Downloads
Description

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
)

---------------------------------------------------------------

error:

MAXScript Rollout Handler Exception:
Unknown property: "abc" in 100:VRayMtl
MAXScript callstack:
thread data: threadID:12184

Comments (1)

`

pixamoon · 2018-10-24

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