ScriptSpot home

Forum topic · General Scripting

mat class decide problme

By dussla · 2018-07-02

Description

always thank you
i wonder some ~~ that code is error
in code , isKindOf matxx is right ?
i would like to get material matxx's class

ml2 = loadTempMaterialLibrary "c:\\eamsple.mat"
matxx= ml2[1]

case isKindOf matxx of

(
Standardmaterial :
(

)

VRayMtl :
(
)

)

Comments (4)
fajar

could be like this


thisMat =  selection[1].mat

case of 
(
  (isKindOf thisMat vrayMtl) : (messageBox "This is VrayMaterial")
  (isKindOf thisMat Standard) : (messageBox "This is Standard")
)
Reply to fajar
dussla

thank you for good anwser

really really thank youy ~~

miauu

.



(
	ml2 = loadTempMaterialLibrary "c:\\eamsple.mat"
	matxx= ml2[1]
	
	classOfMat = classOf matxx
	format "classOfMat: % \n" classOfMat

	case classOfMat of

	(
		Standardmaterial :
		(

		)

		VRayMtl :
		(
			
		)

	)
)