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.
2 changed files with 6 additions and 10 deletions
Showing only changes of commit 9de9f5ff31 - Show all commits

View File

@ -8,6 +8,8 @@ from .asset_mapping import AssetTransferMapping
from . import constants
# TODO Add UI to warn about un-assigned objects
def remove_old_ownership(obj, task_layer_name):
ownership = obj.transfer_data_ownership
@ -61,13 +63,13 @@ def update_task_layer_objects(
def merge_task_layer(
context: bpy.types.Context,
col_base_name: str,
local_tls: list[str],
target_file: Path,
):
local_col = bpy.data.collections.get(col_base_name)
local_col = context.scene.asset_status.asset_collection
if not local_col:
return "Current File Name doesn't contain valid task layer"
return "Unable to find Asset Collection"
col_base_name = local_col.name
local_suffix = constants.LOCAL_SUFFIX
external_suffix = constants.EXTERNAL_SUFFIX
asset_suffix.add_suffix_to_hierarchy(local_col, local_suffix)

View File

@ -6,10 +6,6 @@ from . import constants
from .transfer_data import transfer_ui
def get_parent_col_name():
return "CH-chr_test" # TODO Replace Hard Coded Value
class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
bl_idname = "assetpipe.sync_with_publish"
bl_label = "Sync with Publish"
@ -37,7 +33,7 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
self._temp_ownership = context.scene.temp_transfer_data_ownership
self._temp_ownership.clear()
local_col = bpy.data.collections.get(get_parent_col_name())
local_col = context.scene.asset_status.asset_collection
if not local_col:
self.report({'ERROR'}, "Top level collection could not be found")
return {'CANCELLED'}
@ -87,7 +83,6 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
if self.pull:
error_msg = core.merge_task_layer(
context,
col_base_name=get_parent_col_name(),
local_tls=[task_layer_name],
target_file=sync_target,
)
@ -120,7 +115,6 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
error_msg = core.merge_task_layer(
context,
col_base_name=get_parent_col_name(),
local_tls=local_tls,
target_file=current_file,
)