Asset Pipeline v2 #145
@ -7,11 +7,22 @@ def draw_transfer_data_type(
|
|||||||
layout: bpy.types.UILayout, transfer_data: bpy.types.CollectionProperty
|
layout: bpy.types.UILayout, transfer_data: bpy.types.CollectionProperty
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Draw UI Element for items of a transfer data type"""
|
"""Draw UI Element for items of a transfer data type"""
|
||||||
|
asset_pipe = bpy.context.scene.asset_pipeline
|
||||||
if transfer_data == []:
|
if transfer_data == []:
|
||||||
return
|
return
|
||||||
name, icon = constants.TRANSFER_DATA_TYPES[transfer_data[0].type]
|
name, icon = constants.TRANSFER_DATA_TYPES[transfer_data[0].type]
|
||||||
box = layout.box()
|
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
|
scene = bpy.context.scene
|
||||||
for transfer_data_item in transfer_data:
|
for transfer_data_item in transfer_data:
|
||||||
row = box.row()
|
row = box.row()
|
||||||
|
@ -98,6 +98,21 @@ class AssetPipeline(bpy.types.PropertyGroup):
|
|||||||
all_task_layers: bpy.props.CollectionProperty(type=TaskLayerSettings)
|
all_task_layers: bpy.props.CollectionProperty(type=TaskLayerSettings)
|
||||||
local_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 = (
|
classes = (
|
||||||
AssetTransferData,
|
AssetTransferData,
|
||||||
|
Loading…
Reference in New Issue
Block a user