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
This commit is contained in:
Andrej730
2025-05-14 11:50:54 +05:00
parent c2860e6e25
commit acef6379e8
+6 -2
View File
@@ -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",
)