Asset Pipeline v2 #145
@ -136,6 +136,7 @@ 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_index = len(temp_transfer_data)
|
||||||
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,
|
||||||
@ -144,26 +145,27 @@ class AssetTransferMapping:
|
|||||||
)
|
)
|
||||||
name = transfer_info.name + '_' + obj.name
|
name = transfer_info.name + '_' + obj.name
|
||||||
transfer_data_map[name] = {
|
transfer_data_map[name] = {
|
||||||
'transfer_info': temp_info.name, # TODO avoid name collisions
|
'transfer_info_index': temp_info_index,
|
||||||
'source_obj': obj,
|
'source_obj': obj,
|
||||||
'target_obj': target_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:
|
||||||
if (
|
if (
|
||||||
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"
|
||||||
):
|
):
|
||||||
|
temp_info_index = len(temp_transfer_data)
|
||||||
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 + '_' + obj.name
|
||||||
transfer_data_map[name] = {
|
transfer_data_map[name] = {
|
||||||
'transfer_info': temp_info.name, # TODO avoid name collisions
|
'transfer_info_index': temp_info_index,
|
||||||
'source_obj': obj,
|
'source_obj': obj,
|
||||||
'target_obj': target_obj,
|
'target_obj': target_obj,
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ def apply_transfer_data(context: bpy.types.Context, transfer_data_map) -> None:
|
|||||||
for name in transfer_data_map:
|
for name in transfer_data_map:
|
||||||
temp_transfer_data = context.scene.asset_pipeline.temp_transfer_data
|
temp_transfer_data = context.scene.asset_pipeline.temp_transfer_data
|
||||||
transfer_data = transfer_data_map[name]
|
transfer_data = transfer_data_map[name]
|
||||||
transfer_info = temp_transfer_data.get(transfer_data.get('transfer_info'))
|
transfer_info = temp_transfer_data[transfer_data.get('transfer_info_index')]
|
||||||
target_obj = transfer_data.get('target_obj')
|
target_obj = transfer_data.get('target_obj')
|
||||||
source_obj = transfer_data.get('source_obj')
|
source_obj = transfer_data.get('source_obj')
|
||||||
if target_obj is None:
|
if target_obj is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user