This commit is contained in:
Nicolas Predella 2026-05-16 19:14:51 +03:00
parent e01e1d2e94
commit 6174dbce4a
4 changed files with 25 additions and 2 deletions

View file

@ -751,6 +751,20 @@ class SLICENODE_JoinGcode(SliceNodeJoiner):
return "\n".join(gcode_input)
@register_class
class SLICENODE_JoinOverrides(SliceNodeJoiner):
bl_label = "Join Overrides"
socket_type = "SLICESOCK_Overrides"
output_socket_type = "SLICESOCK_OverridesRo"
def evaluate_output(self, socket_name: str, **_kwargs) -> dict[str, str]:
merged: dict[str, str] = {}
for input in self.inputs:
val = resolve_input(input)
if isinstance(val, dict):
merged.update(val)
return merged
@register_class
class SLICENODE_JoinSlices(SliceNodeJoiner):
bl_label = "Join Slices"

View file

@ -158,8 +158,8 @@ class CollectionInputNodeSocket(InputNodeSocket):
else:
break
@register_class
class SLICESOCK_Overrides(CollectionInputNodeSocket):
class SLICESOCK_Overrides_Common(CollectionInputNodeSocket):
bl_label = "Overrides"
items: CollectionProperty(type=SLICENODE_OverrideItem) # pyright: ignore[reportInvalidTypeForm]
@ -185,6 +185,11 @@ class SLICESOCK_Overrides(CollectionInputNodeSocket):
overrides[item.field] = item.value_str
return overrides
@register_class
class SLICESOCK_Overrides(SLICESOCK_Overrides_Common): ...
@register_class
class SLICESOCK_OverridesRo(ReadonlySocket, SLICESOCK_Overrides_Common): ...
@register_class
class SLICESOCK_ExecutionLink(LabelNodeSocket):
bl_label = "Execution Link"

View file

@ -163,6 +163,7 @@ class SLICENODE_MT_Menu(Menu):
layout.operator("node.add_node", text="Join Gcode").type = "SLICENODE_JoinGcode"
layout.operator("node.add_node", text="Join Mesh").type = "SLICENODE_JoinMesh"
layout.operator("node.add_node", text="Join Paths").type = "SLICENODE_JoinPaths"
layout.operator("node.add_node", text="Join Overrides").type = "SLICENODE_JoinOverrides"
layout.operator("node.add_node", text="Join Execution").type = "SLICENODE_JoinExecution"
layout.operator("node.add_node", text="Boolean Paths").type = "SLICENODE_JoinSlices"
layout.separator()

View file

@ -12,6 +12,8 @@
| `SLICESOCK_Mesh` | `SlicingObject` | NumPy NDArray (Triangles) | Internal mesh data (Transformed/Scaled) |
| `SLICESOCK_Paths` | `SlicePaths` (list) | List of paths (N, 3) + groups | Generic toolpaths or slice boundaries |
| `SLICESOCK_Gcode` | `str` | Multi-line string | Generated G-code text |
| `SLICESOCK_Overrides` | `dict[str, str]` | Python dictionary | Mapping of configuration fields to values |
| `SLICESOCK_OverridesRo` | `dict[str, str]` | Python dictionary | Read-only merged configuration overrides |
## Detailed Data Types
@ -64,6 +66,7 @@ All nodes are found in the **Add (Shift+A)** menu under the **SliceNodes** categ
- **Join Mesh**: Merges multiple `SlicingObject` instances into one.
- **Join Paths**: Combines multiple `SlicePaths`. Supports Sequential or Interleaved modes.
- **Join Gcode**: Concatenates multiple G-code strings.
- **Join Overrides**: Sequentially merges multiple override dictionaries. Later inputs overwrite earlier ones for matching keys.
- **Integer Math**: Simple integer operations (Add, Multiply, etc.).
### Action & I/O