Asset Pipeline v2 #145
@ -203,7 +203,7 @@ def transfer_data_add_entry(
|
||||
return transfer_info
|
||||
|
||||
|
||||
def get_transfer_data_by_name(transfer_data, td_type):
|
||||
def get_transfer_data_as_names(transfer_data, td_type):
|
||||
return [
|
||||
transfer_info.name
|
||||
for transfer_info in transfer_data
|
||||
@ -212,7 +212,9 @@ def get_transfer_data_by_name(transfer_data, td_type):
|
||||
|
||||
|
||||
def transfer_info_clean(obj, list, td_type):
|
||||
transfer_data_list = get_transfer_data_by_name(obj.transfer_data_ownership, td_type)
|
||||
transfer_data_list = get_transfer_data_as_names(
|
||||
obj.transfer_data_ownership, td_type
|
||||
)
|
||||
for item in list:
|
||||
if not asset_suffix.get_basename(item.name) in transfer_data_list:
|
||||
list.remove(item)
|
||||
|
@ -277,7 +277,7 @@ def transfer_constraint(constraint_name, target_obj, source_obj):
|
||||
def material_slot_clean(obj):
|
||||
# Material slots cannot use generic transfer_info_clean() function
|
||||
context = util.get_stored_context()
|
||||
transfer_data_list = transfer_core.get_transfer_data_by_name(
|
||||
transfer_data_list = transfer_core.get_transfer_data_as_names(
|
||||
obj.transfer_data_ownership, constants.MATERIAL_SLOT_KEY
|
||||
)
|
||||
for mat_slot in obj.material_slots:
|
||||
@ -397,7 +397,7 @@ def shape_keys_clean(obj):
|
||||
context = util.get_stored_context()
|
||||
if obj.type != "MESH" or obj.data.shape_keys is None:
|
||||
return
|
||||
transfer_data_list = transfer_core.get_transfer_data_by_name(
|
||||
transfer_data_list = transfer_core.get_transfer_data_as_names(
|
||||
obj.transfer_data_ownership, constants.SHAPE_KEY_KEY
|
||||
)
|
||||
for shape_key in obj.data.shape_keys.key_blocks:
|
||||
@ -512,7 +512,7 @@ def attribute_clean(obj):
|
||||
if obj.type != "MESH":
|
||||
return
|
||||
attributes = attributes_get_editable(obj.data.attributes)
|
||||
transfer_data_list = transfer_core.get_transfer_data_by_name(
|
||||
transfer_data_list = transfer_core.get_transfer_data_as_names(
|
||||
obj.transfer_data_ownership, constants.ATTRIBUTE_KEY
|
||||
)
|
||||
for item in attributes:
|
||||
|
Loading…
Reference in New Issue
Block a user