From acef6379e83c0c640fc470ce9e9325fda889cd12 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 14 May 2025 11:50:54 +0500 Subject: [PATCH] drawing styles - add descriptions to render types, remove NONE type NONE type removed as it was unused and basically meant the same as 'VIEWPORT'. Example - https://i.imgur.com/7r6CJdg.png --- src/bonsai/bonsai/bim/module/drawing/prop.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/drawing/prop.py b/src/bonsai/bonsai/bim/module/drawing/prop.py index ae95966c31..38f3624bb5 100644 --- a/src/bonsai/bonsai/bim/module/drawing/prop.py +++ b/src/bonsai/bonsai/bim/module/drawing/prop.py @@ -346,7 +346,11 @@ class Sheet(PropertyGroup): is_expanded: bool -RenderType = Literal["NONE", "DEFAULT", "VIEWPORT"] +RenderType = Literal["DEFAULT", "VIEWPORT"] +RENDER_TYPE_ENUM_ITEMS: dict[RenderType, tuple[str, str]] = { + "DEFAULT": ("Default", "Use default Blender render."), + "VIEWPORT": ("Viewport", "Render active viewport."), +} class DrawingStyle(PropertyGroup): @@ -357,7 +361,7 @@ class DrawingStyle(PropertyGroup): default="{}", ) render_type: EnumProperty( - items=[(t, t.capitalize(), "") for t in get_args(RenderType)], + items=[(k, *v) for k, v in RENDER_TYPE_ENUM_ITEMS.items()], name="Render Type", default="VIEWPORT", )