feat: add workflow node registry phase 2

This commit is contained in:
2026-04-07 08:59:27 +02:00
parent 63e35ce807
commit 56ee5fc5bf
8 changed files with 843 additions and 309 deletions
@@ -4,6 +4,7 @@ from copy import deepcopy
from typing import Any
from app.core.process_steps import StepName
from app.domains.rendering.workflow_node_registry import get_node_type_for_step
WorkflowPresetType = str
@@ -16,18 +17,10 @@ _PRESET_TYPES = {
"custom",
}
_STEP_TO_NODE_TYPE: dict[str, str] = {
StepName.RESOLVE_STEP_PATH.value: "inputNode",
StepName.STL_CACHE_GENERATE.value: "convertNode",
StepName.BLENDER_STILL.value: "renderNode",
StepName.BLENDER_TURNTABLE.value: "renderFramesNode",
StepName.OUTPUT_SAVE.value: "outputNode",
StepName.EXPORT_BLEND.value: "outputNode",
}
_NODE_TYPE_TO_STEP: dict[str, str] = {
"inputNode": StepName.RESOLVE_STEP_PATH.value,
"convertNode": StepName.STL_CACHE_GENERATE.value,
"processNode": StepName.ORDER_LINE_SETUP.value,
"renderNode": StepName.BLENDER_STILL.value,
"renderFramesNode": StepName.BLENDER_TURNTABLE.value,
"ffmpegNode": StepName.OUTPUT_SAVE.value,
@@ -50,7 +43,7 @@ def _make_node(
"step": step.value,
"params": deepcopy(params or {}),
"ui": {
"type": node_type or _STEP_TO_NODE_TYPE.get(step.value),
"type": node_type or get_node_type_for_step(step.value),
"position": {"x": x, "y": y},
"label": label,
},