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.
4 changed files with 9 additions and 7 deletions
Showing only changes of commit 0e2ce0de82 - Show all commits

View File

@ -198,7 +198,7 @@ def get_task_layer_name_from_file():
return task_layer_name
def get_enum_item(enum, key):
for item in enum:
def get_dict_tuple_item(dict: dict, key: str) -> tuple:
for item in dict:
if item[0] == key:
return item

View File

@ -178,7 +178,7 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
error_msg = core.merge_task_layer(
context,
local_tls=[task_layer_name],
target_file=sync_target,
external_file=sync_target,
)
if error_msg:
@ -212,7 +212,7 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
error_msg = core.merge_task_layer(
context,
local_tls=local_tls,
target_file=current_file,
external_file=current_file,
)
if error_msg:
bpy.ops.wm.open_mainfile(filepath=current_file.__str__())

View File

@ -4,11 +4,11 @@ from .. import constants, core
def draw_transfer_data_type(layout, items):
if items == []:
return
name = core.get_enum_item(constants.TRANSFER_DATA_TYPES, items[0].type)[1]
name = core.get_dict_tuple_item(constants.TRANSFER_DATA_TYPES, items[0].type)[1]
box = layout.box()
box.label(text=name, icon=items[0].type)
for item in items:
owner = core.get_enum_item(constants.TASK_LAYER_ITEMS, item.owner)[1]
owner = core.get_dict_tuple_item(constants.TASK_LAYER_ITEMS, item.owner)[1]
box.label(text=f"{item.name}: '{owner}'")

View File

@ -53,7 +53,9 @@ class ASSETPIPE_ownership_inspector(bpy.types.Panel):
obj = context.active_object
ownership = obj.transfer_data_ownership
layout = layout.box()
owner = core.get_enum_item(constants.TASK_LAYER_ITEMS, obj.asset_id_owner)[1]
owner = core.get_dict_tuple_item(
constants.TASK_LAYER_ITEMS, obj.asset_id_owner
)[1]
layout.label(text=f"{obj.name}: '{owner}'", icon="OBJECT_DATA")
transfer_ui.draw_transfer_data(ownership, layout)