Asset Pipeline v2 #145

Closed
Nick Alberelli wants to merge 431 commits from (deleted):feature/asset-pipeline-v2 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit d67df7a5f9 - Show all commits

View File

@ -127,6 +127,7 @@ class AssetTransferMapping:
def _gen_transfer_data_map(self):
transfer_data_map: Dict[bpy.types.Collection, bpy.types.Collection] = {}
temp_transfer_data = bpy.context.scene.temp_transfer_data_ownership
for source_obj in self.object_map:
target_obj = self.object_map[source_obj]
objs = [source_obj, target_obj]
@ -134,9 +135,18 @@ class AssetTransferMapping:
if obj.name.endswith(constants.LOCAL_SUFFIX):
for transfer_info in obj.transfer_data_ownership:
if transfer_info.owner in self._local_tls:
self._add_transfer_data_item(
transfer_data_map, transfer_info, obj, target_obj
temp_info = transfer_core.transfer_data_add_entry(
transfer_data=temp_transfer_data,
name=transfer_info.name,
td_type=transfer_info.type,
task_layer_name=transfer_info.owner,
)
name = transfer_info.name + '_' + obj.name
transfer_data_map[name] = {
'transfer_info': temp_info,
'source_obj': obj,
'target_obj': target_obj,
}
if obj.name.endswith(constants.EXTERNAL_SUFFIX):
for transfer_info in obj.transfer_data_ownership:
@ -144,26 +154,16 @@ class AssetTransferMapping:
transfer_info.owner not in self._local_tls
and transfer_info.owner != "NONE"
):
self._add_transfer_data_item(
transfer_data_map, transfer_info, obj, target_obj
temp_info = transfer_core.transfer_data_add_entry(
transfer_data=temp_transfer_data,
name=transfer_info.name,
td_type=transfer_info.type,
task_layer_name=transfer_info.owner,
)
name = transfer_info.name + '_' + obj.name
transfer_data_map[name] = {
'transfer_info': temp_info,
'source_obj': obj,
'target_obj': target_obj,
}
return transfer_data_map
def _add_transfer_data_item(
self, transfer_data_map, transfer_info, source_obj, target_obj
):
temp_transfer_data = bpy.context.scene.temp_transfer_data_ownership
temp_info = transfer_core.transfer_data_add_entry(
transfer_data=temp_transfer_data,
name=transfer_info.name,
td_type=transfer_info.type,
task_layer_name=transfer_info.owner,
)
name = transfer_info.name + '_' + source_obj.name
transfer_data_map[name] = {
'transfer_info': temp_info,
'source_obj': source_obj,
'target_obj': target_obj,
}