nodes.shader.manual
manual
Attributes
| Name | Description |
|---|---|
tree |
Classes
| Name | Description |
|---|---|
| MenuSwitch | Node builder for the Menu Switch node (Shader tree) |
MenuSwitch
MenuSwitch(menu=None, items=None, *, data_type=None)Node builder for the Menu Switch node (Shader tree)
Attributes
| Name | Description |
|---|---|
data_type |
Input socket: Data Type |
i |
|
items |
The menu’s items, one input socket each. |
name |
The name of the node being wrapped by this instance. |
node |
|
o |
|
tree |
Methods
| Name | Description |
|---|---|
| add_item | Deprecated: use items.new(value, name, type=). |
| add_items | Deprecated: use items.new(value, name) per item. |
| boolean | |
| bundle | |
| capture | Deprecated: use items.new(value, name).output. |
| closure | |
| color | |
| float | |
| integer | |
| is_selected | Gets the boolean output socket that is True when the named menu item is selected. |
| item | Deprecated: use items.new(value, name, description=). |
| menu | |
| shader | |
| vector |
add_item
add_item(name, value=None, *, type=None)Deprecated: use items.new(value, name, type=).
add_items
add_items(items)Deprecated: use items.new(value, name) per item.
boolean
boolean(menu=None, items=None)bundle
bundle(menu=None, items=None)capture
capture(value, *, name=None)Deprecated: use items.new(value, name).output.
closure
closure(menu=None, items=None)color
color(menu=None, items=None)float
float(menu=None, items=None)integer
integer(menu=None, items=None)is_selected
is_selected(name)Gets the boolean output socket that is True when the named menu item is selected.
Cannot be used with the “Output” name as this refers to the output socket itself.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | The name of the menu item to get the selected socket for. | required |
Returns
| Name | Type | Description |
|---|---|---|
| BooleanSocket | The boolean output socket that is True when the named menu item is selected. |
item
item(name, value=None, *, description=None)Deprecated: use items.new(value, name, description=).
shader
shader(menu=None, items=None)vector
vector(menu=None, items=None)Functions
| Name | Description |
|---|---|
| material | |
| world | Build a world’s node tree; scene=True makes it the active scene’s world. |
material
material(
name='New Material',
*,
collapse=False,
arrange='sugiyama',
fake_user=False,
clear=False,
keep_edits=None,
)world
world(
name='World',
*,
collapse=False,
arrange='sugiyama',
fake_user=False,
clear=False,
keep_edits=None,
scene=False,
)Build a world’s node tree; scene=True makes it the active scene’s world.
with s.world("Studio", clear=True, scene=True): then add a Background linked into a World Output, as in a material.