I want to write a script that can select object by diffuse map name, below is my script, but it didn't work when evaluate all.
clearSelection()
for obj in geometry do
(
if obj.material != undefined then
(
if obj.material.texmap_diffuse != undefined then
(
if obj.material.texmap_diffuse == "vray Wood - Cherry" then selectMore obj
)
)
)It give me an error in maxscript listener as below:
-- Error occurred in obj loop; filename: ; position: 134; line: 6
-- Frame:
-- obj: $Furniture
-- Unknown property: "texmap_diffuse" in RevitMaterialDefinition1615190_1615596:Autodesk_Generic
Hoping someone cloud help me to firgure it out, thank you.
I am 3ds max design 2014 + vray user.
Comments (3)
Comment policy
.
try this
Hi jahman, thank you for your help, i use your code, it didn't show any error in the maxscript listener, but it didn't select anything from the scene...
Oh, sure. Previous version will not work if material is nested inside any other material. This should work: