Notifications
Clear all
[Closed] Deleting a caDef from a material
Oct 15, 2009 3:21 pm
I am having trouble deleting caDefs from materials in the scene. I can use the exact same code to remove the same def from a node’s baseobject, but when trying on a material it just doesn’t work. Has anybody run into this before and can anybody offer advice for a workaround? Thanks!
2 Replies
Oct 15, 2009 3:21 pm
Just figured it out. For anyone who is wondering, it seems you cannot delete it through the custAttributes.delete method, but you can do it through the material’s attribute virtual array.
deleteItem theMaterial.custAttributes #defName
… should do the trick.
Oct 15, 2009 3:21 pm
had the same problem last week, http://forums.cgsociety.org/showthread.php?f=98&t=813892
It probably makes sense to do it like that, but not for me
-Johan