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

View File

@ -94,7 +94,7 @@ class AssetTransferMapping:
coll_map: Dict[bpy.types.Collection, bpy.types.Collection] = {} coll_map: Dict[bpy.types.Collection, bpy.types.Collection] = {}
local_tl_names = [ local_tl_names = [
item[1] for item in constants.TASK_LAYER_ITEMS if item[0] in self._local_tls item[1] for item in constants.TASK_LAYER_TYPES if item[0] in self._local_tls
] ]
for local_task_layer_col in self._local_col.children: for local_task_layer_col in self._local_col.children:

View File

@ -1,14 +1,14 @@
# TODO Tie this into props and generate based on JSON file instead # TODO Tie this into props and generate based on JSON file instead
TASK_LAYER_ITEMS = [ TASK_LAYER_TYPES = [
("NONE", "None", ""), ("NONE", "None", ""),
("MODEL", "Modeling", ""), ("MODEL", "Modeling", ""),
("RIG", "Rigging", ""), ("RIG", "Rigging", ""),
("SHADE", "Shading", ""), ("SHADE", "Shading", ""),
] ]
TASK_LAYER_KEYS = [item[0] for item in TASK_LAYER_ITEMS] TASK_LAYER_KEYS = [item[0] for item in TASK_LAYER_TYPES]
TASK_LAYER_NAMES = [item[1] for item in TASK_LAYER_ITEMS] TASK_LAYER_NAMES = [item[1] for item in TASK_LAYER_TYPES]
# KEYS FOR TRANSFER DATA TYPE MATCH NAME OF ICON # KEYS FOR TRANSFER DATA TYPE MATCH NAME OF ICON
TRANSFER_DATA_TYPES = [ TRANSFER_DATA_TYPES = [

View File

@ -54,7 +54,7 @@ def ownership_get(
""" """
invalid_objs = [] invalid_objs = []
task_layer_col_name = get_dict_tuple_item( task_layer_col_name = get_dict_tuple_item(
constants.TASK_LAYER_ITEMS, task_layer_name constants.TASK_LAYER_TYPES, task_layer_name
)[1] )[1]
task_layer_col = local_col.children.get(task_layer_col_name) task_layer_col = local_col.children.get(task_layer_col_name)
for obj in local_col.all_objects: for obj in local_col.all_objects:

View File

@ -35,7 +35,7 @@ from . import constants
class ASSETOWNERSHIP(bpy.types.PropertyGroup): class ASSETOWNERSHIP(bpy.types.PropertyGroup):
owner: bpy.props.EnumProperty( owner: bpy.props.EnumProperty(
name="Transfer Data Owner", name="Transfer Data Owner",
items=constants.TASK_LAYER_ITEMS, items=constants.TASK_LAYER_TYPES,
) )
type: bpy.props.EnumProperty( type: bpy.props.EnumProperty(
name="Transfer Data Type", name="Transfer Data Type",
@ -49,7 +49,7 @@ class TEMP_ASSETOWNERSHIP(bpy.types.PropertyGroup):
owner: bpy.props.EnumProperty( owner: bpy.props.EnumProperty(
name="Transfer Data Owner", name="Transfer Data Owner",
items=constants.TASK_LAYER_ITEMS, items=constants.TASK_LAYER_TYPES,
) )
type: bpy.props.EnumProperty( type: bpy.props.EnumProperty(
name="Transfer Data Type", name="Transfer Data Type",
@ -78,7 +78,7 @@ def register():
bpy.types.Scene.asset_status = bpy.props.PointerProperty(type=ASSET_STATUS) bpy.types.Scene.asset_status = bpy.props.PointerProperty(type=ASSET_STATUS)
bpy.types.Object.asset_id_owner = bpy.props.EnumProperty( bpy.types.Object.asset_id_owner = bpy.props.EnumProperty(
name="ID Owner", name="ID Owner",
items=constants.TASK_LAYER_ITEMS, items=constants.TASK_LAYER_TYPES,
) )
bpy.types.Scene.asset_new = bpy.props.PointerProperty(type=NEW_ASSET) bpy.types.Scene.asset_new = bpy.props.PointerProperty(type=NEW_ASSET)

View File

@ -8,7 +8,7 @@ def draw_transfer_data_type(layout, items):
box = layout.box() box = layout.box()
box.label(text=name, icon=items[0].type) box.label(text=name, icon=items[0].type)
for item in items: for item in items:
owner = core.get_dict_tuple_item(constants.TASK_LAYER_ITEMS, item.owner)[1] owner = core.get_dict_tuple_item(constants.TASK_LAYER_TYPES, item.owner)[1]
box.label(text=f"{item.name}: '{owner}'") box.label(text=f"{item.name}: '{owner}'")

View File

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