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.
3 changed files with 13 additions and 6 deletions
Showing only changes of commit 1afa4f42c1 - Show all commits

View File

@ -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

View File

@ -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

View File

@ -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'}