Getting material class with VRAY as renderer

Hello,

Im running into a little problem, Im trying to select objects by their material class, these lines below work when I have the default 3dsmax renderer, but when I switch to VRAY, I get an
'Unknown property : "category" in undefined' error.
Can someone please tell me why it's not working?
Thanks!

adkassetobjects = for item in geometry where item.material.category == #Autodesk_Asset collect item
select adkassetobjects

Comments

Comment viewing options

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

undefined material?

The loop looks good to me, but maybe by switching to Vray some of the materials are not being recognised anymore as material? Try to print out the name and class of the material in the loop to identify where it goes wrong and let us know what the listener tells you.

Comment viewing options

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