Panels: colored headers and fixed order
Every WTD panel gets a colored icon in its header (config PANEL_COLORS, the Scene Manager sub-panels share its green) and the sidebar order is set with bl_order: Tools, Rename, Scene Manager, Shot Manager, Sanity Check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3f87904cd1
commit
ce30491cb8
3 files changed
+53
-12
No files matched your search
@@ -56,15 +56,17 @@ blender --command extension build --source-dir path/to/wtd-libreflow-addon
|
|||||||
|
|
||||||
## Where to find the tools
|
## Where to find the tools
|
||||||
|
|
||||||
Open the sidebar of the 3D Viewport (**N**) and click the **WTD** tab.
|
Open the sidebar of the 3D Viewport (**N**) and click the **WTD** tab. The panels come in this order, each with a colored icon in its header:
|
||||||
|
|
||||||
| Panel | Editors |
|
| Panel | Color | Editors |
|
||||||
|---|---|
|
|---|---|---|
|
||||||
| **Sanity Check** | 3D Viewport, Video Sequencer |
|
| **Tools** (Get Oid) | blue | 3D Viewport |
|
||||||
| **Tools** (Get Oid) | 3D Viewport |
|
| **Rename** | yellow | 3D Viewport, Shader Editor |
|
||||||
| **Rename** | 3D Viewport, Shader Editor |
|
| **Scene Manager** (Casting, Loaded, Assetize) | green | 3D Viewport |
|
||||||
| **Shot Manager** | 3D Viewport |
|
| **Shot Manager** | violet | 3D Viewport |
|
||||||
| **Scene Manager** (Casting, Loaded, Assetize) | 3D Viewport |
|
| **Sanity Check** | orange | 3D Viewport, Video Sequencer |
|
||||||
|
|
||||||
|
Panels you drag to another place stay there: a file keeps its own panel order. The colors are `PANEL_COLORS` in the [Configuration](#configuration).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -472,6 +474,7 @@ Name formats use Python's `str.format`: `"sq{:04d}"` turns `10` into `sq0010`. `
|
|||||||
| Sanity Check: assets | `REQUIRED_COLLECTIONS`, `MAX_FACE_SIDES`, `CONCAVE_TOLERANCE`, `NON_MANIFOLD_ALLOW_BOUNDARY`, `UV_NEGATIVE_TOLERANCE`, `ALLOWED_MODIFIERS`, `ALLOWED_MODIFIERS_LINEART`, `APPLY_TRANSFORM`, `APPLY_TRANSFORM_TYPES`, `TRANSFORM_TOLERANCE`, `FORBIDDEN_ASSET_OBJECT_TYPES` |
|
| Sanity Check: assets | `REQUIRED_COLLECTIONS`, `MAX_FACE_SIDES`, `CONCAVE_TOLERANCE`, `NON_MANIFOLD_ALLOW_BOUNDARY`, `UV_NEGATIVE_TOLERANCE`, `ALLOWED_MODIFIERS`, `ALLOWED_MODIFIERS_LINEART`, `APPLY_TRANSFORM`, `APPLY_TRANSFORM_TYPES`, `TRANSFORM_TOLERANCE`, `FORBIDDEN_ASSET_OBJECT_TYPES` |
|
||||||
| Sanity Check: characters | `CHAR_REFERENCE_PATH`, `CHAR_BODY_NAME`, `CHAR_PART_KEYWORDS`, `CHAR_BODY_VERTEX_GROUPS` |
|
| Sanity Check: characters | `CHAR_REFERENCE_PATH`, `CHAR_BODY_NAME`, `CHAR_PART_KEYWORDS`, `CHAR_BODY_VERTEX_GROUPS` |
|
||||||
| Sanity Check: layout | `SET_COLLECTION_PATTERN` |
|
| Sanity Check: layout | `SET_COLLECTION_PATTERN` |
|
||||||
|
| Panels | `PANEL_COLORS` |
|
||||||
| Sanity Check: panel | `CATEGORY_ORDER`, `MAX_ISSUES_DRAWN` |
|
| Sanity Check: panel | `CATEGORY_ORDER`, `MAX_ISSUES_DRAWN` |
|
||||||
| Rename | `RENAME_SEPARATOR`, `RENAME_PADDING`, `RENAME_SIDES`, `RENAME_TYPE_SUFFIXES` (plus `OBJECT_PREFIXES` / `DATABLOCK_PREFIXES` for *By Type* prefixes) |
|
| Rename | `RENAME_SEPARATOR`, `RENAME_PADDING`, `RENAME_SIDES`, `RENAME_TYPE_SUFFIXES` (plus `OBJECT_PREFIXES` / `DATABLOCK_PREFIXES` for *By Type* prefixes) |
|
||||||
| Shot Manager | `SHOT_VIEWER_RIG_GROUPS`, `SHOT_VIEWER_ASSET_TYPE_GROUPS`, `SHOT_NAME_FORMAT`, `SHOT_NUMBER_STEP`, `SHOT_FRAME_START`, `SHOT_DEFAULT_DURATION`, `SEQUENCE_NAME_FORMAT`, `SHOT_CAMERA_NAME_FORMAT`, `SHOT_CAMERA_RIG_NAME_FORMAT`, `SHOT_CAMERA_RIG_MODES` |
|
| Shot Manager | `SHOT_VIEWER_RIG_GROUPS`, `SHOT_VIEWER_ASSET_TYPE_GROUPS`, `SHOT_NAME_FORMAT`, `SHOT_NUMBER_STEP`, `SHOT_FRAME_START`, `SHOT_DEFAULT_DURATION`, `SEQUENCE_NAME_FORMAT`, `SHOT_CAMERA_NAME_FORMAT`, `SHOT_CAMERA_RIG_NAME_FORMAT`, `SHOT_CAMERA_RIG_MODES` |
|
||||||
|
|||||||
@@ -317,6 +317,16 @@ SCENE_MANAGER_ASSETIZE_TASK = "modeling"
|
|||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
# UI
|
# UI
|
||||||
# --------------------------------------------------------------------------- #
|
# --------------------------------------------------------------------------- #
|
||||||
|
# Colored icon in the header of each panel, to tell the tools apart (the Scene Manager
|
||||||
|
# sub-panels use its color). COLLECTION_COLOR_01 to _08: red, orange, yellow, green,
|
||||||
|
# blue, violet, pink, brown. Red is left out: it marks errors in the panels.
|
||||||
|
PANEL_COLORS = {
|
||||||
|
"Tools": "COLLECTION_COLOR_05",
|
||||||
|
"Rename": "COLLECTION_COLOR_03",
|
||||||
|
"Scene Manager": "COLLECTION_COLOR_04",
|
||||||
|
"Shot Manager": "COLLECTION_COLOR_06",
|
||||||
|
"Sanity Check": "COLLECTION_COLOR_02",
|
||||||
|
}
|
||||||
CATEGORY_ORDER = [
|
CATEGORY_ORDER = [
|
||||||
"Scene",
|
"Scene",
|
||||||
"File",
|
"File",
|
||||||
|
|||||||
+32
-4
@@ -166,11 +166,21 @@ def _draw_check(layout, context, check, report, disabled):
|
|||||||
col.separator(factor=0.5)
|
col.separator(factor=0.5)
|
||||||
|
|
||||||
|
|
||||||
|
def _draw_color_header(self, context):
|
||||||
|
"""Colored icon in the panel header (config PANEL_COLORS), to tell the tools apart."""
|
||||||
|
self.layout.label(text="", icon=config.PANEL_COLORS.get(self.color, "NONE"))
|
||||||
|
|
||||||
|
|
||||||
|
# Sidebar order (bl_order), top to bottom: Tools, Rename, Scene Manager, Shot Manager,
|
||||||
|
# Sanity Check.
|
||||||
class _SanityPanel:
|
class _SanityPanel:
|
||||||
bl_region_type = "UI"
|
bl_region_type = "UI"
|
||||||
bl_category = "WTD"
|
bl_category = "WTD"
|
||||||
bl_label = "Sanity Check"
|
bl_label = "Sanity Check"
|
||||||
bl_options = {"DEFAULT_CLOSED"} # panel starts collapsed
|
bl_options = {"DEFAULT_CLOSED"} # panel starts collapsed
|
||||||
|
bl_order = 4
|
||||||
|
color = "Sanity Check"
|
||||||
|
draw_header = _draw_color_header
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
draw_sanity_checks_panel(self, context)
|
draw_sanity_checks_panel(self, context)
|
||||||
@@ -180,6 +190,9 @@ class _ToolsPanel:
|
|||||||
bl_region_type = "UI"
|
bl_region_type = "UI"
|
||||||
bl_category = "WTD"
|
bl_category = "WTD"
|
||||||
bl_label = "Tools"
|
bl_label = "Tools"
|
||||||
|
bl_order = 0
|
||||||
|
color = "Tools"
|
||||||
|
draw_header = _draw_color_header
|
||||||
|
|
||||||
def draw(self, context) -> None:
|
def draw(self, context) -> None:
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -197,6 +210,9 @@ class _RenamePanel:
|
|||||||
bl_category = "WTD"
|
bl_category = "WTD"
|
||||||
bl_label = "Rename"
|
bl_label = "Rename"
|
||||||
bl_options = {"DEFAULT_CLOSED"} # panel starts collapsed
|
bl_options = {"DEFAULT_CLOSED"} # panel starts collapsed
|
||||||
|
bl_order = 1
|
||||||
|
color = "Rename"
|
||||||
|
draw_header = _draw_color_header
|
||||||
|
|
||||||
PREVIEW_COUNT = 10
|
PREVIEW_COUNT = 10
|
||||||
|
|
||||||
@@ -294,6 +310,9 @@ class _ShotViewerPanel:
|
|||||||
bl_category = "WTD"
|
bl_category = "WTD"
|
||||||
bl_label = "Shot Manager"
|
bl_label = "Shot Manager"
|
||||||
bl_options = {"DEFAULT_CLOSED"} # panel starts collapsed
|
bl_options = {"DEFAULT_CLOSED"} # panel starts collapsed
|
||||||
|
bl_order = 3
|
||||||
|
color = "Shot Manager"
|
||||||
|
draw_header = _draw_color_header
|
||||||
|
|
||||||
def draw(self, context) -> None:
|
def draw(self, context) -> None:
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -361,6 +380,9 @@ class _SceneManagerPanel:
|
|||||||
bl_region_type = "UI"
|
bl_region_type = "UI"
|
||||||
bl_category = "WTD"
|
bl_category = "WTD"
|
||||||
bl_label = "Scene Manager"
|
bl_label = "Scene Manager"
|
||||||
|
bl_order = 2
|
||||||
|
color = "Scene Manager"
|
||||||
|
draw_header = _draw_color_header
|
||||||
|
|
||||||
def draw(self, context) -> None:
|
def draw(self, context) -> None:
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -417,6 +439,8 @@ class _SceneCastingPanel:
|
|||||||
bl_region_type = "UI"
|
bl_region_type = "UI"
|
||||||
bl_category = "WTD"
|
bl_category = "WTD"
|
||||||
bl_label = "Casting"
|
bl_label = "Casting"
|
||||||
|
color = "Scene Manager"
|
||||||
|
draw_header = _draw_color_header
|
||||||
bl_parent_id = "WTD_PT_scene_manager_view3d"
|
bl_parent_id = "WTD_PT_scene_manager_view3d"
|
||||||
|
|
||||||
def draw(self, context) -> None:
|
def draw(self, context) -> None:
|
||||||
@@ -509,6 +533,8 @@ class _SceneLoadedPanel:
|
|||||||
bl_region_type = "UI"
|
bl_region_type = "UI"
|
||||||
bl_category = "WTD"
|
bl_category = "WTD"
|
||||||
bl_label = "Loaded"
|
bl_label = "Loaded"
|
||||||
|
color = "Scene Manager"
|
||||||
|
draw_header = _draw_color_header
|
||||||
bl_parent_id = "WTD_PT_scene_manager_view3d"
|
bl_parent_id = "WTD_PT_scene_manager_view3d"
|
||||||
|
|
||||||
def draw(self, context) -> None:
|
def draw(self, context) -> None:
|
||||||
@@ -640,6 +666,8 @@ class _SceneAssetizePanel:
|
|||||||
bl_region_type = "UI"
|
bl_region_type = "UI"
|
||||||
bl_category = "WTD"
|
bl_category = "WTD"
|
||||||
bl_label = "Assetize"
|
bl_label = "Assetize"
|
||||||
|
color = "Scene Manager"
|
||||||
|
draw_header = _draw_color_header
|
||||||
bl_parent_id = "WTD_PT_scene_manager_view3d"
|
bl_parent_id = "WTD_PT_scene_manager_view3d"
|
||||||
bl_options = {"DEFAULT_CLOSED"}
|
bl_options = {"DEFAULT_CLOSED"}
|
||||||
|
|
||||||
@@ -710,15 +738,15 @@ class WTD_PT_sanity_sequencer(_SanityPanel, bpy.types.Panel):
|
|||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
WTD_UL_shots,
|
WTD_UL_shots,
|
||||||
WTD_PT_sanity_view3d,
|
|
||||||
WTD_PT_tools_view3d,
|
WTD_PT_tools_view3d,
|
||||||
WTD_PT_shot_viewer_view3d,
|
WTD_PT_rename_view3d,
|
||||||
|
WTD_PT_rename_node_editor,
|
||||||
WTD_PT_scene_manager_view3d,
|
WTD_PT_scene_manager_view3d,
|
||||||
WTD_PT_scene_casting_view3d,
|
WTD_PT_scene_casting_view3d,
|
||||||
WTD_PT_scene_loaded_view3d,
|
WTD_PT_scene_loaded_view3d,
|
||||||
WTD_PT_scene_assetize_view3d,
|
WTD_PT_scene_assetize_view3d,
|
||||||
WTD_PT_rename_view3d,
|
WTD_PT_shot_viewer_view3d,
|
||||||
WTD_PT_rename_node_editor,
|
WTD_PT_sanity_view3d,
|
||||||
WTD_PT_sanity_sequencer,
|
WTD_PT_sanity_sequencer,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user