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