nodes.shader.manual
manual
Classes
| Name | Description |
|---|---|
| Attribute | Retrieve attributes attached to objects or geometry |
| MenuSwitch | Node builder for the Menu Switch node (Shader tree) |
Attribute
Attribute(attribute_type='GEOMETRY', attribute_name='')Retrieve attributes attached to objects or geometry
Attributes
| Name | Description |
|---|---|
attribute_name |
|
attribute_type |
|
i |
Input socket accessor. Subclasses narrow the return type via TYPE_CHECKING. |
name |
The name of the node being wrapped by this instance. |
node |
|
o |
|
outputs |
|
tree |
The TreeBuilder instance this node belongs to and is being built within. |
Methods
| Name | Description |
|---|---|
| geometry | Create Attribute with operation ‘Geometry’. |
| instancer | Create Attribute with operation ‘Instancer’. |
| object | Create Attribute with operation ‘Object’. |
| view_layer | Create Attribute with operation ‘View Layer’. |
geometry
geometry(attribute_name='')Create Attribute with operation ‘Geometry’.
instancer
instancer(attribute_name='')Create Attribute with operation ‘Instancer’.
object
object(attribute_name='')Create Attribute with operation ‘Object’.
view_layer
view_layer(attribute_name='')Create Attribute with operation ‘View Layer’.
MenuSwitch
MenuSwitch(menu=None, items=None, *, data_type='FLOAT')Node builder for the Menu Switch node (Shader tree)
Attributes
| Name | Description |
|---|---|
data_type |
Input socket: Data Type |
i |
|
name |
The name of the node being wrapped by this instance. |
node |
|
o |
|
outputs |
|
tree |
Methods
| Name | Description |
|---|---|
| add_item | Add a single item and return its handle. |
| add_items | Add an item per mapping entry and return their handles by name. |
| boolean | |
| bundle | |
| capture | Add an item linked from value and return its output socket. |
| closure | |
| color | |
| float | |
| integer | |
| is_selected | Gets the boolean output socket that is True when the named menu item is selected. |
| menu | |
| shader | |
| vector |
add_item
add_item(name, value=None, *, type=None)Add a single item and return its handle.
value may be a linkable (linked to the item’s input) or a plain default value; otherwise type (a socket-type string such as "FLOAT") declares the item unlinked.
add_items
add_items(items)Add an item per mapping entry and return their handles by name.
Values may be linkables (linked to the new item’s input) or socket-type strings such as "FLOAT" (declare an unlinked item).
boolean
boolean(menu=None, items={})bundle
bundle(menu=None, items={})capture
capture(value, *, name=None)Add an item linked from value and return its output socket.
The item is auto-named after the source socket unless name is given.
closure
closure(menu=None, items={})color
color(menu=None, items={})float
float(menu=None, items={})integer
integer(menu=None, items={})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. |
shader
shader(menu=None, items={})vector
vector(menu=None, items={})Functions
| Name | Description |
|---|---|
| material | |
| tree |
material
material(
name='New Material',
*,
collapse=False,
arrange='sugiyama',
fake_user=False,
)tree
tree(
name='Shader Nodes',
*,
collapse=False,
arrange='sugiyama',
fake_user=False,
)