Hi,
I'm stucked here. How can i select all object with Vray materials in a max scene?
This does not work:
vmats = for o in objects where (findItem vray_materials (classof o.material)) > 0 collect o
Edit: I'm usin 3ds max 2012 and Vray1.5
Forum topic · General Scripting
By Raymond Homme Ingebretsen · 2011-09-19
Hi,
I'm stucked here. How can i select all object with Vray materials in a max scene?
This does not work:
vmats = for o in objects where (findItem vray_materials (classof o.material)) > 0 collect o
Edit: I'm usin 3ds max 2012 and Vray1.5
Comments (3)
Comment policy
In case someone needs a script for the same purpose.
Here is a fast, dirty and functional script (thanks to Anubis)
The solution you came up with did the job, so i used this with VRay:
Thank you so much :)
EDIT: The purpose was to select all objects in the scene with Vray materials, and fix them to arc_and_design for rendering with Mentalray.
try .category
What your
array hold? If their're classes then your code would work fine. Also may try ".category" property of the material. Examples:
I not work with VRay, so just select 1 vr-mat and get the category from it ;) Cheers!