From f7f74a4cc1ca0ef0378f1d0f66d70ad84bd224a5 Mon Sep 17 00:00:00 2001 From: Nicolas Predella Date: Tue, 2 Jun 2026 10:53:05 +0300 Subject: [PATCH] typing --- core/nodeslicer/nodes/base.py | 4 ++-- core/nodeslicer/nodes/gcode.py | 3 ++- core/nodeslicer/nodes/mesh.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/nodeslicer/nodes/base.py b/core/nodeslicer/nodes/base.py index 73a3ae0..829315e 100644 --- a/core/nodeslicer/nodes/base.py +++ b/core/nodeslicer/nodes/base.py @@ -78,8 +78,8 @@ class MathNode(SliceNode): def evaluate_output(self, socket_name: str, **_kwargs) -> math_type: t = self.math_type - a: t = resolve_input(self.inputs[0]) - b: t = resolve_input(self.inputs[1]) + a: t = resolve_input(self.inputs[0]) or 0 + b: t = resolve_input(self.inputs[1]) or 0 op = self.operation try: diff --git a/core/nodeslicer/nodes/gcode.py b/core/nodeslicer/nodes/gcode.py index 7831000..084adc8 100644 --- a/core/nodeslicer/nodes/gcode.py +++ b/core/nodeslicer/nodes/gcode.py @@ -175,7 +175,8 @@ class SLICENODE_JoinGcode(SliceNodeJoiner): from ....infra.blender.blender_slice_nodes_generic import resolve_input gcode_input: list[str] = [] for input in self.inputs: - gcode_input += [resolve_input(input)] or [""] + gc: str = str(resolve_input(input)) + gcode_input += [gc] or [""] return "\n".join(gcode_input) @register_class diff --git a/core/nodeslicer/nodes/mesh.py b/core/nodeslicer/nodes/mesh.py index ec3f95c..6f863f7 100644 --- a/core/nodeslicer/nodes/mesh.py +++ b/core/nodeslicer/nodes/mesh.py @@ -39,7 +39,7 @@ class SLICENODE_JoinMesh(SliceNodeJoiner): def evaluate_output(self, socket_name: str, **_kwargs) -> SlicingCollection: from ....infra.blender.blender_slice_nodes_generic import resolve_input - merged_coll = resolve_input(self.inputs[0]) + merged_coll = resolve_input(self.inputs[0]) or SlicingCollection([],'') for input in self.inputs[1:]: coll = resolve_input(input)