scene.world.WorldTree
scene.world.WorldTree(scene)Builder for the scene world’s shader node tree (lighting & background).
Replaces reaching directly into the MN_world_shader node. Use the convenience properties for the common controls, or :meth:reset to build a world shader from scratch with nodebpy.shader nodes.
from nodebpy import shader as s
canvas.world.hdri_strength = 1.5
canvas.world.background = (0.0, 0.5, 0.5, 1.0)
with canvas.world.reset() as surface:
s.Background(color=(0.05, 0.05, 0.05, 1.0), strength=1.0) >> surfaceAttributes
| Name | Description |
|---|---|
| background | World background color as RGBA in the range [0, 1]. |
| hdri_strength | Strength multiplier for the world lighting. |
Methods
| Name | Description |
|---|---|
| reset | Clear the world shader and build within it. |
reset
scene.world.WorldTree.reset()Clear the world shader and build within it.
Discards the existing shader — including MN_world_shader, so the background/hdri_strength shortcuts stop working until it is rebuilt. Yields the Surface input of the world output to build towards.
with canvas.world.reset() as surface: … s.Background(strength=1.0) >> surface