Asset Pipeline v2 #145
@ -1,6 +1,11 @@
|
||||
import bpy
|
||||
from typing import Dict, Set
|
||||
from .naming import get_target_name, get_basename, get_name_with_asset_prefix
|
||||
from .naming import (
|
||||
get_target_name,
|
||||
get_basename,
|
||||
get_name_with_asset_prefix,
|
||||
task_layer_prefix_basename_get,
|
||||
)
|
||||
from .util import get_storage_of_id
|
||||
from .transfer_data.transfer_util import transfer_data_add_entry
|
||||
from .shared_ids import get_shared_ids
|
||||
@ -180,7 +185,9 @@ class AssetTransferMapping:
|
||||
other_transfer_data_item = None
|
||||
# Find Related Transfer Data Item on Target/Source Object
|
||||
for other_obj_transfer_data_item in other_obj.transfer_data_ownership:
|
||||
if other_obj_transfer_data_item.name == transfer_data_item.name:
|
||||
if task_layer_prefix_basename_get(
|
||||
other_obj_transfer_data_item.name
|
||||
) == task_layer_prefix_basename_get(transfer_data_item.name):
|
||||
other_transfer_data_item = other_obj_transfer_data_item
|
||||
|
||||
# TODO CONSIDER PREFIXES
|
||||
|
@ -162,7 +162,7 @@ def task_layer_prefix_basename_get(name: str) -> str:
|
||||
return name
|
||||
|
||||
|
||||
def task_layer_prefix_update_name(transfer_data_item):
|
||||
def task_layer_prefix_transfer_data_update(transfer_data_item):
|
||||
prefix_types = [constants.MODIFIER_KEY, constants.CONSTRAINT_KEY]
|
||||
if transfer_data_item.type not in prefix_types:
|
||||
return
|
||||
|
@ -2,7 +2,7 @@ import bpy
|
||||
from . import config
|
||||
import os
|
||||
from pathlib import Path
|
||||
from .merge.naming import task_layer_prefix_update_name
|
||||
from .merge.naming import task_layer_prefix_transfer_data_update
|
||||
from .merge.task_layer import (
|
||||
set_local_task_layers,
|
||||
draw_task_layer_selection,
|
||||
@ -445,7 +445,7 @@ class ASSETPIPE_OT_fix_prefixes(bpy.types.Operator):
|
||||
for obj in objs:
|
||||
transfer_data_items = obj.transfer_data_ownership
|
||||
for transfer_data_item in transfer_data_items:
|
||||
if task_layer_prefix_update_name(transfer_data_item):
|
||||
if task_layer_prefix_transfer_data_update(transfer_data_item):
|
||||
self.report(
|
||||
{'INFO'},
|
||||
f"Renamed {transfer_data_item.type} on '{obj.name}'",
|
||||
@ -502,7 +502,7 @@ class ASSETPIPE_OT_update_surrendered_transfer_data(bpy.types.Operator):
|
||||
)
|
||||
return {'CANCELLED'}
|
||||
self._surrendered_transfer_data.surrender = False
|
||||
# TODO RENAME PREFIXES HERE
|
||||
task_layer_prefix_transfer_data_update(self._surrendered_transfer_data)
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user