Asset Pipeline v2 #145
@ -94,7 +94,7 @@ class AssetTransferMapping:
|
||||
coll_map: Dict[bpy.types.Collection, bpy.types.Collection] = {}
|
||||
|
||||
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:
|
||||
|
@ -1,14 +1,14 @@
|
||||
# TODO Tie this into props and generate based on JSON file instead
|
||||
|
||||
TASK_LAYER_ITEMS = [
|
||||
TASK_LAYER_TYPES = [
|
||||
("NONE", "None", ""),
|
||||
("MODEL", "Modeling", ""),
|
||||
("RIG", "Rigging", ""),
|
||||
("SHADE", "Shading", ""),
|
||||
]
|
||||
|
||||
TASK_LAYER_KEYS = [item[0] for item in TASK_LAYER_ITEMS]
|
||||
TASK_LAYER_NAMES = [item[1] 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_TYPES]
|
||||
|
||||
# KEYS FOR TRANSFER DATA TYPE MATCH NAME OF ICON
|
||||
TRANSFER_DATA_TYPES = [
|
||||
|
@ -54,7 +54,7 @@ def ownership_get(
|
||||
"""
|
||||
invalid_objs = []
|
||||
task_layer_col_name = get_dict_tuple_item(
|
||||
constants.TASK_LAYER_ITEMS, task_layer_name
|
||||
constants.TASK_LAYER_TYPES, task_layer_name
|
||||
)[1]
|
||||
task_layer_col = local_col.children.get(task_layer_col_name)
|
||||
for obj in local_col.all_objects:
|
||||
|
@ -35,7 +35,7 @@ from . import constants
|
||||
class ASSETOWNERSHIP(bpy.types.PropertyGroup):
|
||||
owner: bpy.props.EnumProperty(
|
||||
name="Transfer Data Owner",
|
||||
items=constants.TASK_LAYER_ITEMS,
|
||||
items=constants.TASK_LAYER_TYPES,
|
||||
)
|
||||
type: bpy.props.EnumProperty(
|
||||
name="Transfer Data Type",
|
||||
@ -49,7 +49,7 @@ class TEMP_ASSETOWNERSHIP(bpy.types.PropertyGroup):
|
||||
|
||||
owner: bpy.props.EnumProperty(
|
||||
name="Transfer Data Owner",
|
||||
items=constants.TASK_LAYER_ITEMS,
|
||||
items=constants.TASK_LAYER_TYPES,
|
||||
)
|
||||
type: bpy.props.EnumProperty(
|
||||
name="Transfer Data Type",
|
||||
@ -78,7 +78,7 @@ def register():
|
||||
bpy.types.Scene.asset_status = bpy.props.PointerProperty(type=ASSET_STATUS)
|
||||
bpy.types.Object.asset_id_owner = bpy.props.EnumProperty(
|
||||
name="ID Owner",
|
||||
items=constants.TASK_LAYER_ITEMS,
|
||||
items=constants.TASK_LAYER_TYPES,
|
||||
)
|
||||
bpy.types.Scene.asset_new = bpy.props.PointerProperty(type=NEW_ASSET)
|
||||
|
||||
|
@ -8,7 +8,7 @@ def draw_transfer_data_type(layout, items):
|
||||
box = layout.box()
|
||||
box.label(text=name, icon=items[0].type)
|
||||
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}'")
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ class ASSETPIPE_ownership_inspector(bpy.types.Panel):
|
||||
ownership = obj.transfer_data_ownership
|
||||
layout = layout.box()
|
||||
owner = core.get_dict_tuple_item(
|
||||
constants.TASK_LAYER_ITEMS, obj.asset_id_owner
|
||||
constants.TASK_LAYER_TYPES, obj.asset_id_owner
|
||||
)[1]
|
||||
layout.label(text=f"{obj.name}: '{owner}'", icon="OBJECT_DATA")
|
||||
transfer_ui.draw_transfer_data(ownership, layout)
|
||||
|
Loading…
Reference in New Issue
Block a user