Added sanity check baseline made by claude.
Also changed the location to a panel in VIEW_3D instead of menu.
This commit is contained in:
1 parent
71b1a61b5c
commit
4617c47ad0
33 files changed
+2771
-52
No files matched your search
@@ -0,0 +1,44 @@
|
||||
"""Production contexts a file can be checked against.
|
||||
|
||||
To add a context, append a ``Context`` to ``CONTEXTS`` and list its id in the
|
||||
``contexts`` attribute of the checks that apply to it.
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
GENERAL = "GENERAL"
|
||||
CHAR_MOD = "CHAR_MOD"
|
||||
CHAR_LINEART = "CHAR_LINEART"
|
||||
LAYOUT = "LAYOUT"
|
||||
|
||||
# Every asset context gets the general asset checks.
|
||||
ASSET = frozenset({GENERAL, CHAR_MOD, CHAR_LINEART})
|
||||
CHARACTER = frozenset({CHAR_MOD, CHAR_LINEART})
|
||||
ALL = frozenset({GENERAL, CHAR_MOD, CHAR_LINEART, LAYOUT})
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Context:
|
||||
id: str
|
||||
label: str
|
||||
description: str
|
||||
icon: str = "NONE"
|
||||
|
||||
|
||||
CONTEXTS = [
|
||||
Context(GENERAL, "Asset: General", "Props, sets and generic assets (modeling and lineart)", "MESH_CUBE"),
|
||||
Context(CHAR_MOD, "Character: Modeling", "Character modeling file", "USER"),
|
||||
Context(CHAR_LINEART, "Character: Lineart / Shading", "Character lineart and shading file", "OUTLINER_OB_GREASEPENCIL"),
|
||||
Context(LAYOUT, "Shot: Layout", "Shot layout file", "SEQUENCE"),
|
||||
]
|
||||
|
||||
|
||||
def get_context(context_id):
|
||||
for context in CONTEXTS:
|
||||
if context.id == context_id:
|
||||
return context
|
||||
return None
|
||||
|
||||
|
||||
def enum_items():
|
||||
return [(c.id, c.label, c.description, c.icon, i) for i, c in enumerate(CONTEXTS)]
|
||||
Reference in new issue
Block a user