nodebpy 520.37.0__tar.gz → 520.38.0__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.37.0 → nodebpy-520.38.0}/PKG-INFO +1 -1
- {nodebpy-520.37.0 → nodebpy-520.38.0}/pyproject.toml +1 -1
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/socket.py +4 -2
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/export/codegen.py +25 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/README.md +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/__main__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/_lookup.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/_skill.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/assets/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/assets/__main__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/assets/_codegen.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/assets/_library.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/assets/_pipeline.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/assets/_textconv.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/_combine.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/_infer.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/_registry.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/_socket_order.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/_utils.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/accessor.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/asset.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/items.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/mixins.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/node.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/builder/tree.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/export/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/export/_floats.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/export/diagram.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/export/parity.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/export/plot.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/export/web_render.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/DESIGN.md +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/api.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/apply.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/balancing.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/build.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/common.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/config.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/digraph.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/dna.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/edits.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/extract.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/feeders.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/long_links.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/model.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/node_size.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/ordering.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/packing.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/pipeline.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/placement.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/priority.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/ranking.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/realize.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/reroutes.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/routing.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/snapping.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/spacing.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/stacking.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/sugiyama.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/layout/zones.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/live.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/_mixins.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/assets.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/color.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/converter.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/distort.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/filter.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/group.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/input.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/interface.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/manual.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/matte.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/output.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/compositor/vector.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/assets.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/attribute.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/color.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/converter.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/geometry.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/grid.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/group.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/groups.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/input.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/interface.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/manual.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/output.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/texture.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/utilities.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/vector.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/geometry/zone.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/__init__.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/assets.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/color.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/converter.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/grid.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/group.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/input.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/manual.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/output.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/script.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/shader.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/texture.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/nodes/shader/vector.py +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/py.typed +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/SKILL.md +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/existing-trees.md +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/shader-compositor.md +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/verifying.md +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/writing-trees.md +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/zones-and-items.md +0 -0
- {nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/types.py +0 -0
|
@@ -15,6 +15,7 @@ Organization (top to bottom):
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
18
|
+
import math
|
|
18
19
|
from collections.abc import Iterable, Iterator, Mapping
|
|
19
20
|
from typing import (
|
|
20
21
|
TYPE_CHECKING,
|
|
@@ -1958,8 +1959,9 @@ class _FloatMixin[IntegerResult: (IntegerSocket, IntegerSocketGrid, IntegerSocke
|
|
|
1958
1959
|
self._assert_output("power")
|
|
1959
1960
|
return self._math.power(self.socket, exponent).o.value # ty: ignore[invalid-return-type]
|
|
1960
1961
|
|
|
1961
|
-
def log(self, base: InputFloat =
|
|
1962
|
-
"""Return the logarithm of this value to *base
|
|
1962
|
+
def log(self, base: InputFloat = math.e) -> Self:
|
|
1963
|
+
"""Return the logarithm of this value to *base*, the natural logarithm
|
|
1964
|
+
by default (as ``math.log``)."""
|
|
1963
1965
|
self._assert_output("log")
|
|
1964
1966
|
return self._math.logarithm(self.socket, base).o.value # ty: ignore[invalid-return-type]
|
|
1965
1967
|
|
|
@@ -3245,6 +3245,24 @@ def _match_socket_method(
|
|
|
3245
3245
|
return None
|
|
3246
3246
|
|
|
3247
3247
|
|
|
3248
|
+
def _method_defaults(receiver: NodeSocket, method: str) -> dict[str, Any]:
|
|
3249
|
+
"""The defaults of the method the receiver's socket class has under the
|
|
3250
|
+
name *method*, by parameter. A ``None`` default leaves the socket as it
|
|
3251
|
+
is, so it is left out, as are methods reached through an accessor
|
|
3252
|
+
(``point.at``)."""
|
|
3253
|
+
from ..builder._registry import _wrap_socket
|
|
3254
|
+
|
|
3255
|
+
cls = type(_wrap_socket(receiver))
|
|
3256
|
+
function = None if "." in method else getattr(cls, method, None)
|
|
3257
|
+
if not callable(function):
|
|
3258
|
+
return {}
|
|
3259
|
+
return {
|
|
3260
|
+
name: parameter.default
|
|
3261
|
+
for name, parameter in inspect.signature(function).parameters.items()
|
|
3262
|
+
if parameter.default not in (inspect.Parameter.empty, None)
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
|
|
3248
3266
|
def _socket_method_val(ctx: EmitContext, node) -> _Val | None:
|
|
3249
3267
|
"""Emit a node as a method call on its receiver socket, if possible."""
|
|
3250
3268
|
dissolve = _DISSOLVE_SPECS.get(node.bl_idname)
|
|
@@ -3261,6 +3279,9 @@ def _socket_method_val(ctx: EmitContext, node) -> _Val | None:
|
|
|
3261
3279
|
link.to_socket.identifier: link for link in ctx.incoming.get(node.name, ())
|
|
3262
3280
|
}
|
|
3263
3281
|
receiver = ctx.socket_expr(incoming[spec.receiver])
|
|
3282
|
+
# An argument left out takes the method's default, which need not be
|
|
3283
|
+
# the node's (log() is natural where Blender's base is 0.5).
|
|
3284
|
+
method_defaults = _method_defaults(incoming[spec.receiver].from_socket, method)
|
|
3264
3285
|
|
|
3265
3286
|
kwargs: dict[str, Expr] = {}
|
|
3266
3287
|
blender_defaults: dict[str, object] | None = None
|
|
@@ -3273,6 +3294,10 @@ def _socket_method_val(ctx: EmitContext, node) -> _Val | None:
|
|
|
3273
3294
|
if socket is None or not hasattr(socket, "default_value"):
|
|
3274
3295
|
continue # pragma: no cover - spec params name real sockets
|
|
3275
3296
|
value = socket.default_value
|
|
3297
|
+
if index >= spec.always_args and method_defaults.get(param) is not None:
|
|
3298
|
+
if not _eq(value, method_defaults[param]):
|
|
3299
|
+
kwargs[param] = Lit(value)
|
|
3300
|
+
continue
|
|
3276
3301
|
if index >= spec.always_args:
|
|
3277
3302
|
if blender_defaults is None:
|
|
3278
3303
|
blender_defaults = _get_blender_socket_defaults(
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/existing-trees.md
RENAMED
|
File without changes
|
{nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/shader-compositor.md
RENAMED
|
File without changes
|
|
File without changes
|
{nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/writing-trees.md
RENAMED
|
File without changes
|
{nodebpy-520.37.0 → nodebpy-520.38.0}/src/nodebpy/skills/nodebpy/references/zones-and-items.md
RENAMED
|
File without changes
|
|
File without changes
|