Asset Pipeline: Improve Performance #235
@ -20,14 +20,16 @@ from .transfer_util import (
|
||||
|
||||
|
||||
# TODO use logging module here
|
||||
def copy_transfer_data_ownership(td_type_key: str, transfer_data_dict: dict) -> None:
|
||||
def copy_transfer_data_ownership(
|
||||
td_type_key: str, target_obj: bpy.types.Object, transfer_data_dict: dict
|
||||
) -> None:
|
||||
"""Copy Transferable Data item to object if non entry exists
|
||||
|
||||
Args:
|
||||
transfer_data_item: Item of bpy.types.CollectionProperty from source object
|
||||
target_obj (bpy.types.Object): Object to add Transferable Data item to
|
||||
"""
|
||||
transfer_data = transfer_data_dict["target_obj"].transfer_data_ownership
|
||||
transfer_data = target_obj.transfer_data_ownership
|
||||
matches = check_transfer_data_entry(
|
||||
transfer_data,
|
||||
transfer_data_dict["name"],
|
||||
@ -112,7 +114,7 @@ def apply_transfer_data_items(
|
||||
return
|
||||
|
||||
for transfer_data_dict in transfer_data_dicts:
|
||||
copy_transfer_data_ownership(td_type_key, transfer_data_dict)
|
||||
copy_transfer_data_ownership(td_type_key, target_obj, transfer_data_dict)
|
||||
|
||||
# if TD Source is Target, restore the ownership data but don't transfer anything
|
||||
if source_obj == target_obj:
|
||||
|
Loading…
Reference in New Issue
Block a user