Asset Pipeline v2 #145
@ -127,6 +127,7 @@ 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]
|
||||||
@ -134,9 +135,18 @@ 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:
|
||||||
self._add_transfer_data_item(
|
temp_info = transfer_core.transfer_data_add_entry(
|
||||||
transfer_data_map, transfer_info, obj, target_obj
|
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):
|
if obj.name.endswith(constants.EXTERNAL_SUFFIX):
|
||||||
for transfer_info in obj.transfer_data_ownership:
|
for transfer_info in obj.transfer_data_ownership:
|
||||||
@ -144,26 +154,16 @@ 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(
|
temp_info = transfer_core.transfer_data_add_entry(
|
||||||
transfer_data_map, transfer_info, obj, target_obj
|
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
|
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,
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user