Asset Pipeline v2 #145
@ -540,7 +540,7 @@ def attribute_clean(obj):
|
||||
if obj.type != "MESH":
|
||||
return
|
||||
attributes = attributes_get_editable(obj.data.attributes)
|
||||
|
||||
attributes_to_remove = []
|
||||
for attribute in attributes:
|
||||
matches = check_transfer_data_entry(
|
||||
obj.transfer_data_ownership,
|
||||
@ -548,8 +548,12 @@ def attribute_clean(obj):
|
||||
constants.ATTRIBUTE_KEY,
|
||||
)
|
||||
if len(matches) == 0:
|
||||
print(f"Cleaning attribute {attribute.name}")
|
||||
obj.data.attributes.remove(attribute)
|
||||
attributes_to_remove.append(attribute.name)
|
||||
|
||||
for attribute_name_to_remove in reversed(attributes_to_remove):
|
||||
attribute_to_remove = obj.data.attributes.get(attribute_name_to_remove)
|
||||
print(f"Cleaning attribute {attribute.name}")
|
||||
obj.data.attributes.remove(attribute_to_remove)
|
||||
|
||||
|
||||
def attribute_is_missing(transfer_data_item):
|
||||
|
Loading…
Reference in New Issue
Block a user