View Full Version : Deleting a caDef from a material

10 October 2009, 02: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!

10 October 2009, 02:54 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.

10 October 2009, 07:20 PM
:) had the same problem last week,

It probably makes sense to do it like that, but not for me :)


CGTalk Moderation
10 October 2009, 07:20 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.