Notifications
Clear all
[Closed] How to remove "SimpleFaceData"?
Apr 15, 2020 2:50 pm
I got a script from online that can remove “day1refCAs”. But how to remove”SimpleFaceData” with the script?
Thank you!
for i = custAttributes.count rootscene to 1 by -1 do custAttributes.delete rootscene 1
Here is the max file.
abc.max (452 KB)
5 Replies
1 Reply
for i = custAttributes.count rootscene to 1 by -1 do custAttributes.delete rootscene i
Apr 15, 2020 2:50 pm
fn deleteCustAttributeInstances ca_class =
(
cas = getclassinstances ca_class
deleted = [cas.count, 0]
for ca in cas do
(
owner = custattributes.getowner ca
if isvalidobj owner do
(
n = finditem owner.custattributes ca
if (n > 0) do
(
deleteitem owner.custattributes n
deleted[2] += 1
)
)
)
deleted
)
/********** using ****************
deleteCustAttributeInstances SimpleFaceData
***************************************/
Apr 15, 2020 2:50 pm
In case anyone visits here…
The SimpleFaceData custom attributes are not scripted custom attributes, rather they are c++ custom attributes. The custattributes struct methods work only on scripted custom attributes.
The SimpleFaceData custom attributes can be removed by running:
for i = rootscene.custattributes.count to 1 by -1 where ((classof rootscene.custattributes[i]) == SimpleFaceData) do
deleteitem rootscene.custattributes i