Mel script to check if shape has attributes

Hello,

I’m trying to get if a mesh has attributes but this command always return “0” even though the attribute exist :s

if (`attributeExists “vray_displacement” $objs`)

Any help would be great. Thank you!

Jacques.

Hello!
You have most probably mistaken the attribute name. Before using “attributeExists”, you can first try the MEL command “listAttr” to get all attributes for the node or “listAttr -userDefined” to filter only dynamic attributes which Extra V-Ray attributes usually seem to be.

Thank you very much for the quick reply Iliyana!

It now works just fine… I thought “attributeExists” would return any “vray addAttributesFromGroup” name/value.

Jacques.