Asset Pipeline v2 #145
@ -127,7 +127,6 @@ class AssetTransferMapping:
|
|||||||
|
|
||||||
def _gen_transfer_data_map(self):
|
def _gen_transfer_data_map(self):
|
||||||
transfer_data_map: Dict[bpy.types.Collection, bpy.types.Collection] = {}
|
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:
|
for source_obj in self.object_map:
|
||||||
target_obj = self.object_map[source_obj]
|
target_obj = self.object_map[source_obj]
|
||||||
objs = [source_obj, target_obj]
|
objs = [source_obj, target_obj]
|
||||||
@ -135,18 +134,9 @@ class AssetTransferMapping:
|
|||||||
if obj.name.endswith(constants.LOCAL_SUFFIX):
|
if obj.name.endswith(constants.LOCAL_SUFFIX):
|
||||||
for transfer_info in obj.transfer_data_ownership:
|
for transfer_info in obj.transfer_data_ownership:
|
||||||
if transfer_info.owner in self._local_tls:
|
if transfer_info.owner in self._local_tls:
|
||||||
temp_info = transfer_core.transfer_data_add_entry(
|
self._add_transfer_data_item(
|
||||||
transfer_data=temp_transfer_data,
|
transfer_data_map, transfer_info, obj, target_obj
|
||||||
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):
|
if obj.name.endswith(constants.EXTERNAL_SUFFIX):
|
||||||
for transfer_info in obj.transfer_data_ownership:
|
for transfer_info in obj.transfer_data_ownership:
|
||||||
@ -154,16 +144,26 @@ class AssetTransferMapping:
|
|||||||
transfer_info.owner not in self._local_tls
|
transfer_info.owner not in self._local_tls
|
||||||
and transfer_info.owner != "NONE"
|
and transfer_info.owner != "NONE"
|
||||||
):
|
):
|
||||||
|
self._add_transfer_data_item(
|
||||||
|
transfer_data_map, transfer_info, 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(
|
temp_info = transfer_core.transfer_data_add_entry(
|
||||||
transfer_data=temp_transfer_data,
|
transfer_data=temp_transfer_data,
|
||||||
name=transfer_info.name,
|
name=transfer_info.name,
|
||||||
td_type=transfer_info.type,
|
td_type=transfer_info.type,
|
||||||
task_layer_name=transfer_info.owner,
|
task_layer_name=transfer_info.owner,
|
||||||
)
|
)
|
||||||
name = transfer_info.name + '_' + obj.name
|
name = transfer_info.name + '_' + source_obj.name
|
||||||
transfer_data_map[name] = {
|
transfer_data_map[name] = {
|
||||||
'transfer_info': temp_info,
|
'transfer_info': temp_info,
|
||||||
'source_obj': obj,
|
'source_obj': source_obj,
|
||||||
'target_obj': target_obj,
|
'target_obj': target_obj,
|
||||||
}
|
}
|
||||||
return transfer_data_map
|
|
||||||
|
Loading…
Reference in New Issue
Block a user