nodebpy 520.34.0__tar.gz → 520.34.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nodebpy-520.34.0 → nodebpy-520.34.1}/PKG-INFO +1 -1
- {nodebpy-520.34.0 → nodebpy-520.34.1}/pyproject.toml +1 -1
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/export/codegen.py +9 -22
- {nodebpy-520.34.0 → nodebpy-520.34.1}/README.md +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/__main__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/assets/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/assets/__main__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/assets/_codegen.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/assets/_library.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/assets/_pipeline.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/assets/_textconv.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/_registry.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/_socket_order.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/_utils.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/accessor.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/asset.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/items.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/mixins.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/node.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/socket.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/builder/tree.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/export/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/export/_floats.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/export/diagram.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/export/parity.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/export/plot.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/export/web_render.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/DESIGN.md +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/api.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/apply.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/balancing.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/build.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/common.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/config.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/digraph.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/dna.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/edits.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/extract.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/long_links.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/model.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/node_size.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/ordering.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/packing.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/pipeline.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/placement.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/priority.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/ranking.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/realize.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/reroutes.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/routing.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/snapping.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/spacing.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/stacking.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/sugiyama.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/layout/zones.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/live.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/_mixins.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/assets.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/color.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/converter.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/distort.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/filter.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/group.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/input.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/interface.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/manual.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/matte.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/output.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/compositor/vector.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/assets.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/attribute.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/color.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/converter.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/geometry.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/grid.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/group.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/groups.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/input.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/interface.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/manual.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/output.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/texture.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/utilities.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/vector.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/geometry/zone.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/__init__.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/assets.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/color.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/converter.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/grid.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/group.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/input.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/manual.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/output.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/script.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/shader.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/texture.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/nodes/shader/vector.py +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/py.typed +0 -0
- {nodebpy-520.34.0 → nodebpy-520.34.1}/src/nodebpy/types.py +0 -0
|
@@ -1102,9 +1102,6 @@ class EmitContext:
|
|
|
1102
1102
|
pending_lines: list[str] = field(default_factory=list)
|
|
1103
1103
|
zones: dict[str, _ZoneState] = field(default_factory=dict)
|
|
1104
1104
|
collector: _GroupCollector | None = None
|
|
1105
|
-
# Statements emitted after the body — menu interface defaults whose enum is
|
|
1106
|
-
# only populated once the consuming MenuSwitch has been created and linked.
|
|
1107
|
-
iface_deferred: list[str] = field(default_factory=list)
|
|
1108
1105
|
|
|
1109
1106
|
def input_link(self, node: Node, identifier: str) -> _Link | None:
|
|
1110
1107
|
"""The effective link into ``node``'s socket ``identifier``, if any."""
|
|
@@ -3730,16 +3727,13 @@ def _emit_interface(
|
|
|
3730
3727
|
# A socket no effective link touches (e.g. a panel-toggle input, or one
|
|
3731
3728
|
# only read through the modifier UI) still needs its declaration, but the
|
|
3732
3729
|
# variable is never referenced again — prefix it so the generated module
|
|
3733
|
-
# passes lint (F841).
|
|
3734
|
-
# its deferred ``var.default_value = …`` line reads the variable.
|
|
3730
|
+
# passes lint (F841).
|
|
3735
3731
|
if direction == "inputs":
|
|
3736
3732
|
used = any(
|
|
3737
3733
|
link.from_node.bl_idname == "NodeGroupInput"
|
|
3738
3734
|
and link.from_socket.identifier == item.identifier
|
|
3739
3735
|
for link in ctx.links
|
|
3740
3736
|
)
|
|
3741
|
-
if not used and item.socket_type == "NodeSocketMenu":
|
|
3742
|
-
used = bool(getattr(item, "default_value", None))
|
|
3743
3737
|
else:
|
|
3744
3738
|
used = any(
|
|
3745
3739
|
link.to_node.bl_idname == "NodeGroupOutput"
|
|
@@ -3785,11 +3779,12 @@ def _emit_interface(
|
|
|
3785
3779
|
and (factory_default is None or _eq(default, factory_default))
|
|
3786
3780
|
):
|
|
3787
3781
|
default = None
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3782
|
+
# A menu default is emitted inline: the builder defers applying it to
|
|
3783
|
+
# context exit, once the MenuSwitch defining its enum items is linked.
|
|
3784
|
+
# An empty one (no linked MenuSwitch) has nothing to restore.
|
|
3785
|
+
if item.socket_type == "NodeSocketMenu" and not default:
|
|
3786
|
+
default = None
|
|
3787
|
+
if default is not None:
|
|
3793
3788
|
args.append(_fmt(default))
|
|
3794
3789
|
description = getattr(item, "description", "")
|
|
3795
3790
|
if description:
|
|
@@ -4312,7 +4307,6 @@ def _assemble_tree_body(emission: _TreeEmission) -> list[str]:
|
|
|
4312
4307
|
emission.body_lines,
|
|
4313
4308
|
emission.out_lines,
|
|
4314
4309
|
)
|
|
4315
|
-
deferred = emission.deferred_lines
|
|
4316
4310
|
lines = list(iface_lines)
|
|
4317
4311
|
if iface_lines and (body or out_lines):
|
|
4318
4312
|
lines.append("")
|
|
@@ -4321,11 +4315,7 @@ def _assemble_tree_body(emission: _TreeEmission) -> list[str]:
|
|
|
4321
4315
|
if body:
|
|
4322
4316
|
lines.append("")
|
|
4323
4317
|
lines.extend(out_lines)
|
|
4324
|
-
if
|
|
4325
|
-
if iface_lines or body or out_lines:
|
|
4326
|
-
lines.append("")
|
|
4327
|
-
lines.extend(deferred)
|
|
4328
|
-
if not (iface_lines or body or out_lines or deferred):
|
|
4318
|
+
if not (iface_lines or body or out_lines):
|
|
4329
4319
|
lines.append(" pass")
|
|
4330
4320
|
return lines
|
|
4331
4321
|
|
|
@@ -4340,7 +4330,6 @@ class _TreeEmission:
|
|
|
4340
4330
|
body_lines: list[str]
|
|
4341
4331
|
out_lines: list[str]
|
|
4342
4332
|
used_aliases: set[str]
|
|
4343
|
-
deferred_lines: list[str] = field(default_factory=list)
|
|
4344
4333
|
|
|
4345
4334
|
|
|
4346
4335
|
@dataclass
|
|
@@ -4962,9 +4951,7 @@ def _emit_tree(node_tree, collector: _GroupCollector) -> _TreeEmission:
|
|
|
4962
4951
|
source = ctx.upstream_expr(link, pipeline=True)
|
|
4963
4952
|
out_lines.extend(_stmt_lines(BinOp(">>", source, out_ref.require_expr())))
|
|
4964
4953
|
|
|
4965
|
-
return _TreeEmission(
|
|
4966
|
-
iface_lines, body, out_lines, ctx.used_aliases, ctx.iface_deferred
|
|
4967
|
-
)
|
|
4954
|
+
return _TreeEmission(iface_lines, body, out_lines, ctx.used_aliases)
|
|
4968
4955
|
|
|
4969
4956
|
|
|
4970
4957
|
# ---------------------------------------------------------------------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|