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 27 additions and 1 deletions
Showing only changes of commit 868647d96f - Show all commits

View File

@ -7,11 +7,22 @@ def draw_transfer_data_type(
layout: bpy.types.UILayout, transfer_data: bpy.types.CollectionProperty
) -> None:
"""Draw UI Element for items of a transfer data type"""
asset_pipe = bpy.context.scene.asset_pipeline
if transfer_data == []:
return
name, icon = constants.TRANSFER_DATA_TYPES[transfer_data[0].type]
box = layout.box()
box.label(text=name, icon=icon)
row = box.row()
row.prop(
asset_pipe,
f"{icon}_BOOL",
icon=icon,
text="",
)
row.label(text=name)
if not bool(asset_pipe.get(f"{icon}_BOOL")):
return
scene = bpy.context.scene
for transfer_data_item in transfer_data:
row = box.row()

View File

@ -98,6 +98,21 @@ class AssetPipeline(bpy.types.PropertyGroup):
all_task_layers: bpy.props.CollectionProperty(type=TaskLayerSettings)
local_task_layers: bpy.props.CollectionProperty(type=TaskLayerSettings)
# UI BOOLS
# The names of the bools are the ICON keys for each transfer data type with the name _BOOL appened to it
# TODO See if there is a better way to handle hide/expand panels without creating bools like this
GROUP_VERTEX_BOOL: bpy.props.BoolProperty(
name="Show/Hide Vertex Groups", default=False
)
MODIFIER_BOOL: bpy.props.BoolProperty(name="Show/Hide Modifiers", default=False)
CONSTRAINT_BOOL: bpy.props.BoolProperty(name="Show/Hide Constraints", default=False)
MATERIAL_BOOL: bpy.props.BoolProperty(name="Show/Hide Materials", default=False)
SHAPEKEY_DATA_BOOL: bpy.props.BoolProperty(
name="Show/Hide Shape Keys", default=False
)
EVENT_A_BOOL: bpy.props.BoolProperty(name="Show/Hide Attributes", default=False)
FILE_PARENT_BOOL: bpy.props.BoolProperty(name="Show/Hide Parent", default=False)
classes = (
AssetTransferData,