Class Spline#
main - nodes - nodes menus
It uses the ‘SPLINE’ string domain. (‘CURVE’ for some nodes)
Constructor#
Spline(self, data_socket, selection=None)
Args:#
data_socket (DataSocket): the data class the domain belongs to
selection (any): the selection to use
Content#
Properties
ID | as_cloud_points | as_control_points | as_corners | as_edges | as_faces | as_insts | as_splines | as_verts | count | cyclic | data_socket | domain | domain_index | index | length | material | material_index | normal | position | resolution | selection | selection_index | type
Class and static methods
random_boolean | random_float | random_integer | random_vector
Methods
accumulate_field | attribute_max | attribute_mean | attribute_median | attribute_min | attribute_node | attribute_range | attribute_statistic | attribute_std | attribute_sum | attribute_var | capture_attribute | delete | duplicate | field_at_index | index_for_sample | interpolate | material_selection | named_attribute | named_boolean | named_color | named_float | named_integer | named_vector | points | remove_named_attribute | resample | resample_count | resample_evaluated | resample_length | sample_index | select | separate | set_ID | set_cyclic | set_material | set_material_index | set_normal | set_position | set_resolution | set_type | socket_stack | store_named_attribute | store_named_attribute_no_selection | store_named_boolean | store_named_color | store_named_float | store_named_integer | store_named_vector | view | viewer
Properties#
ID#
Node: ID | Blender reference | api reference
Returns:#
socket
ID
Setter
Node: Set ID | Blender reference | api reference
Node implemented as property setter.
Args:#
attr_value: ID
Go to top - main - nodes - nodes menus
as_cloud_points#
Type cast to CloudPoint.
Go to top - main - nodes - nodes menus
as_control_points#
Type cast to ControlPoint.
Go to top - main - nodes - nodes menus
as_corners#
Type cast to Corner.
Go to top - main - nodes - nodes menus
as_edges#
Type cast to Edge.
Go to top - main - nodes - nodes menus
as_faces#
Type cast to Face.
Go to top - main - nodes - nodes menus
as_insts#
Type cast to Instance.
Go to top - main - nodes - nodes menus
as_splines#
Type cast to Spline.
Go to top - main - nodes - nodes menus
as_verts#
Type cast to Vertex.
Go to top - main - nodes - nodes menus
count#
Node: Domain Size | Blender reference | api reference
Returns:#
socket
spline_count
Go to top - main - nodes - nodes menus
cyclic#
Node: Is Spline Cyclic | Blender reference | api reference
Returns:#
socket
cyclic
Setter
Node: Set Spline Cyclic | Blender reference | api reference
Node implemented as property setter.
Args:#
attr_value: cyclic
Go to top - main - nodes - nodes menus
data_socket#
Returns the data socket it belongs to.
Returns:#
DataSocket
Go to top - main - nodes - nodes menus
domain#
Gives the Geometry Nodes domain string to use in the generated nodes.
Vertex : ‘POINT’,
Edge : ‘EDGE’,
Face : ‘FACE’,
Corner : ‘CORNER’,
ControlPoint : ‘POINT’,
Spline : ‘CURVE’,
CloudPoint : ‘POINT’,
Instance : ‘INSTANCE’,
Returns:#
domain string (str)
Go to top - main - nodes - nodes menus
domain_index#
Node: Index | Blender reference | api reference
Returns:#
socket
index
Go to top - main - nodes - nodes menus
index#
Node: Index | Blender reference | api reference
Returns:#
socket
index
Go to top - main - nodes - nodes menus
length#
Node: Spline Length | Blender reference | api reference
Returns:#
tuple (’
length
’, ‘point_count
’)
Go to top - main - nodes - nodes menus
material#
Node: Set Material | Blender reference | api reference
‘material’ is a write only property. Raise an exception if attempt to read.
Setter
Node: Set Material | Blender reference | api reference
Node implemented as property setter.
Args:#
attr_value: material
Go to top - main - nodes - nodes menus
material_index#
Node: Material Index | Blender reference | api reference
Returns:#
socket
material_index
Setter
Node: Set Material Index | Blender reference | api reference
Node implemented as property setter.
Args:#
attr_value: material_index
Go to top - main - nodes - nodes menus
normal#
Node: Normal | Blender reference | api reference
Returns:#
socket
normal
Setter
Node: Set Curve Normal | Blender reference | api reference
Node implemented as property setter.
Args:#
attr_value: mode
Go to top - main - nodes - nodes menus
position#
Node: Position | Blender reference | api reference
Returns:#
socket
position
Setter
Node: Set Position | Blender reference | api reference
Node implemented as property setter.
Args:#
attr_value: position
Go to top - main - nodes - nodes menus
resolution#
Node: Spline Resolution | Blender reference | api reference
Returns:#
socket
resolution
Setter
Node implemented as property setter.
Args:#
attr_value: resolution
Go to top - main - nodes - nodes menus
selection#
Returns the selection value to use in nodes with a Selection socket.
Returns:#
Boolean
Go to top - main - nodes - nodes menus
selection_index#
Returns the selection index.
CAUTION: raise an error if the selection is not a integer.
Returns:#
Integer
Go to top - main - nodes - nodes menus
type#
Node: Set Spline Type | Blender reference | api reference
‘type’ is a write only property. Raise an exception if attempt to read.
Setter
Node: Set Spline Type | Blender reference | api reference
Node implemented as property setter.
Args:#
attr_value: spline_type
Go to top - main - nodes - nodes menus
Class and static methods#
random_boolean#
@staticmethod
def random_boolean(probability=None, ID=None, seed=None)
Node: Random Value | Blender reference | api reference
Args:#
probability: Float
ID: Integer
seed: Integer
Returns:#
socket
value
Go to top - main - nodes - nodes menus
random_float#
@staticmethod
def random_float(min=None, max=None, ID=None, seed=None)
Node: Random Value | Blender reference | api reference
Args:#
min: [‘Vector’, ‘Float’, ‘Integer’]
max: [‘Vector’, ‘Float’, ‘Integer’]
ID: Integer
seed: Integer
Returns:#
socket
value
Go to top - main - nodes - nodes menus
random_integer#
@staticmethod
def random_integer(min=None, max=None, ID=None, seed=None)
Node: Random Value | Blender reference | api reference
Args:#
min: [‘Vector’, ‘Float’, ‘Integer’]
max: [‘Vector’, ‘Float’, ‘Integer’]
ID: Integer
seed: Integer
Returns:#
socket
value
Go to top - main - nodes - nodes menus
random_vector#
@staticmethod
def random_vector(min=None, max=None, ID=None, seed=None)
Node: Random Value | Blender reference | api reference
Args:#
min: [‘Vector’, ‘Float’, ‘Integer’]
max: [‘Vector’, ‘Float’, ‘Integer’]
ID: Integer
seed: Integer
Returns:#
socket
value
Go to top - main - nodes - nodes menus
Methods#
accumulate_field#
def accumulate_field(self, value=None, group_index=None)
Node: Accumulate Field | Blender reference | api reference
Args:#
value: [‘Vector’, ‘Float’, ‘Integer’]
group_index: Integer
Returns:#
tuple (’
leading
’, ‘trailing
’, ‘total
’)
Go to top - main - nodes - nodes menus
attribute_max#
def attribute_max(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
socket
max
Go to top - main - nodes - nodes menus
attribute_mean#
def attribute_mean(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
socket
mean
Go to top - main - nodes - nodes menus
attribute_median#
def attribute_median(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
socket
median
Go to top - main - nodes - nodes menus
attribute_min#
def attribute_min(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
socket
min
Go to top - main - nodes - nodes menus
attribute_node#
def attribute_node(self, node)
Define an input node as attribute
Called when creating an input node in a property getter. Performs two actions:
- Call the method :func:`Node.as_attribute` to tag the node as being an attribute.
This will allow the :func:`Tree.check_attributes` to see if it is necessary to create
a *Capture Attribute* for this field.
- Set the nde property :attr:`field_of` to self in order to implement the transfer attribute
mechanism.
Args:#
node (Node): The node created by the domain
Returns:#
The node argument
Go to top - main - nodes - nodes menus
attribute_range#
def attribute_range(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
socket
range
Go to top - main - nodes - nodes menus
attribute_statistic#
def attribute_statistic(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
node with sockets [‘mean’, ‘median’, ‘sum’, ‘min’, ‘max’, ‘range’, ‘standard_deviation’, ‘variance’]
Go to top - main - nodes - nodes menus
attribute_std#
def attribute_std(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
socket
standard_deviation
Go to top - main - nodes - nodes menus
attribute_sum#
def attribute_sum(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
socket
sum
Go to top - main - nodes - nodes menus
attribute_var#
def attribute_var(self, attribute=None)
Args:#
attribute: [‘Float’, ‘Vector’]
Returns:#
socket
variance
Go to top - main - nodes - nodes menus
capture_attribute#
def capture_attribute(self, value=None)
Node: Capture Attribute | Blender reference | api reference
Args:#
value: [‘Vector’, ‘Float’, ‘Color’, ‘Boolean’, ‘Integer’]
Returns:#
socket
attribute
Go to top - main - nodes - nodes menus
delete#
def delete(self, mode='ALL')
Node: Delete Geometry | Blender reference | api reference
Args:#
mode (str): ‘ALL’ in [ALL, EDGE_FACE, ONLY_FACE]
Returns:#
self
Go to top - main - nodes - nodes menus
duplicate#
def duplicate(self, amount=None)
Node: Duplicate Elements | Blender reference | api reference
Args:#
amount: Integer
Returns:#
socket
duplicate_index
Go to top - main - nodes - nodes menus
field_at_index#
def field_at_index(self, index=None, value=None)
Node: Field at Index | Blender reference | api reference
Args:#
index: Integer
value: [‘Float’, ‘Integer’, ‘Vector’, ‘Color’, ‘Boolean’]
Returns:#
socket
value
Go to top - main - nodes - nodes menus
index_for_sample#
def index_for_sample(self, default=None)
Return default if not None or Input index socket.
The node ‘Sample Index’ has an input with default value to 0. If mehod argument is None, create a node ‘Input Index’ as input.
sample_index method is implemented:
def sample_index(self, value=None, index=None, clamp=False):
return nodes.SampleIndex(..., index=self.index_for_sample(index), ...)
Returns:#
default or Input index
Go to top - main - nodes - nodes menus
interpolate#
def interpolate(self, value=None)
Node: Interpolate Domain | Blender reference | api reference
Args:#
value: [‘Float’, ‘Integer’, ‘Vector’, ‘Color’, ‘Boolean’]
Returns:#
socket
value
Go to top - main - nodes - nodes menus
material_selection#
def material_selection(self, material=None)
Node: Material Selection | Blender reference | api reference
Args:#
material: Material
Returns:#
socket
selection
Go to top - main - nodes - nodes menus
named_attribute#
def named_attribute(self, name=None, data_type='FLOAT')
Node: Named Attribute | Blender reference | api reference
Args:#
name: String
data_type (str): ‘FLOAT’ in [FLOAT, INT, FLOAT_VECTOR, FLOAT_COLOR, BOOLEAN]
Returns:#
socket
attribute
Go to top - main - nodes - nodes menus
named_boolean#
def named_boolean(self, name=None)
Node: Named Attribute | Blender reference | api reference
Args:#
name: String
Returns:#
socket
attribute
Go to top - main - nodes - nodes menus
named_color#
def named_color(self, name=None)
Node: Named Attribute | Blender reference | api reference
Args:#
name: String
Returns:#
socket
attribute
Go to top - main - nodes - nodes menus
named_float#
def named_float(self, name=None)
Node: Named Attribute | Blender reference | api reference
Args:#
name: String
Returns:#
socket
attribute
Go to top - main - nodes - nodes menus
named_integer#
def named_integer(self, name=None)
Node: Named Attribute | Blender reference | api reference
Args:#
name: String
Returns:#
socket
attribute
Go to top - main - nodes - nodes menus
named_vector#
def named_vector(self, name=None)
Node: Named Attribute | Blender reference | api reference
Args:#
name: String
Returns:#
socket
attribute
Go to top - main - nodes - nodes menus
points#
def points(self, weights=None, sort_index=None)
Node: Points of Curve | Blender reference | api reference
Args:#
weights: Float
sort_index: Integer
Returns:#
tuple (’
point_index
’, ‘total
’)
Go to top - main - nodes - nodes menus
remove_named_attribute#
def remove_named_attribute(self, name=None)
Args:#
name: String
Returns:#
self
Go to top - main - nodes - nodes menus
resample#
def resample(self, count=None, length=None, mode='COUNT')
Node: Resample Curve | Blender reference | api reference
Args:#
count: Integer
length: Float
mode (str): ‘COUNT’ in [EVALUATED, COUNT, LENGTH]
Returns:#
self
Go to top - main - nodes - nodes menus
resample_count#
def resample_count(self, count=None)
Node: Resample Curve | Blender reference | api reference
Args:#
count: Integer
Returns:#
self
Go to top - main - nodes - nodes menus
resample_evaluated#
def resample_evaluated(self)
Node: Resample Curve | Blender reference | api reference
Returns:#
self
Go to top - main - nodes - nodes menus
resample_length#
def resample_length(self, length=None)
Node: Resample Curve | Blender reference | api reference
Args:#
length: Float
Returns:#
self
Go to top - main - nodes - nodes menus
sample_index#
def sample_index(self, value=None, index=None, clamp=False)
Node: Sample Index | Blender reference | api reference
Args:#
value: [‘Float’, ‘Integer’, ‘Vector’, ‘Color’, ‘Boolean’]
index: Integer
clamp (bool): False
Returns:#
socket
value
Go to top - main - nodes - nodes menus
select#
def select(self, selection)
Select the domain
If the method is called on a Domain which already has a selection, the two selections are combined:
verts = mesh.verts[10:20] # Selection of vertices from 10 to 20
v = verts.select((verts.index % 2).equal(0)) # Even indices in the previous selection
Args:#
selection (Boolean or Integer): The selection condition
Returns:#
Domain with the given selection (Domain)
If a selection is existing, the resulting selection is a logical and betwenn the two
Go to top - main - nodes - nodes menus
separate#
def separate(self)
Node: Separate Geometry | Blender reference | api reference
Returns:#
tuple (’
selection
’, ‘inverted
’)
Go to top - main - nodes - nodes menus
set_ID#
def set_ID(self, ID=None)
Node: Set ID | Blender reference | api reference
Args:#
ID: Integer
Returns:#
self
Go to top - main - nodes - nodes menus
set_cyclic#
def set_cyclic(self, cyclic=None)
Node: Set Spline Cyclic | Blender reference | api reference
Args:#
cyclic: Boolean
Returns:#
self
Go to top - main - nodes - nodes menus
set_material#
def set_material(self, material=None)
Node: Set Material | Blender reference | api reference
Args:#
material: Material
Returns:#
self
Go to top - main - nodes - nodes menus
set_material_index#
def set_material_index(self, material_index=None)
Node: Set Material Index | Blender reference | api reference
Args:#
material_index: Integer
Returns:#
self
Go to top - main - nodes - nodes menus
set_normal#
def set_normal(self, mode='MINIMUM_TWIST')
Node: Set Curve Normal | Blender reference | api reference
Args:#
mode (str): ‘MINIMUM_TWIST’ in [MINIMUM_TWIST, Z_UP]
Returns:#
self
Go to top - main - nodes - nodes menus
set_position#
def set_position(self, position=None, offset=None)
Node: Set Position | Blender reference | api reference
Args:#
position: Vector
offset: Vector
Returns:#
self
Go to top - main - nodes - nodes menus
set_resolution#
def set_resolution(self, resolution=None)
Args:#
resolution: Integer
Returns:#
self
Go to top - main - nodes - nodes menus
set_type#
def set_type(self, spline_type='POLY')
Node: Set Spline Type | Blender reference | api reference
Args:#
spline_type (str): ‘POLY’ in [CATMULL_ROM, POLY, BEZIER, NURBS]
Returns:#
self
Go to top - main - nodes - nodes menus
socket_stack#
def socket_stack(self, node, socket_name=None)
Make the owning socket jump to the output socket of the node passed in argumment.
Args:#
node (Node): The node to jump to
socket_name: The name of the output socket (first one if None)
Go to top - main - nodes - nodes menus
store_named_attribute#
def store_named_attribute(self, name=None, value=None, data_type=None)
Store a named attribute
If selection exists, create an intermediary cloud of points to update selectively the items.
Args:#
name (str): name of the attribute
value (any): value of the attribute
data_type (str): valeu data type
Returns:#
data socket (DataSocket)
Go to top - main - nodes - nodes menus
store_named_attribute_no_selection#
def store_named_attribute_no_selection(self, name=None, value=None)
Args:#
name: String
value: [‘Vector’, ‘Float’, ‘Color’, ‘Boolean’, ‘Integer’]
Returns:#
self
Go to top - main - nodes - nodes menus
store_named_boolean#
def store_named_boolean(self, name, value)
Store a named attribute of type Boolean
Args:#
name (str): the attribute name
value (float): the value to store
Returns:#
Data socket (DataSocket)
Go to top - main - nodes - nodes menus
store_named_color#
def store_named_color(self, name, value)
Store a named attribute of type Color
Args:#
name (str): the attribute name
value (float): the value to store
Returns:#
Data socket (DataSocket)
Go to top - main - nodes - nodes menus
store_named_float#
def store_named_float(self, name, value)
Store a named attribute of type Float
Args:#
name (str): the attribute name
value (float): the value to store
Returns:#
Data socket (DataSocket)
Go to top - main - nodes - nodes menus
store_named_integer#
def store_named_integer(self, name, value)
Store a named attribute of type Integer
Args:#
name (str): the attribute name
value (float): the value to store
Returns:#
Data socket (DataSocket)
Go to top - main - nodes - nodes menus
store_named_vector#
def store_named_vector(self, name, value)
Store a named attribute of type Vector
Args:#
name (str): the attribute name
value (float): the value to store
Returns:#
Data socket (DataSocket)
Go to top - main - nodes - nodes menus
view#
def view(self, value=None)
Node: Viewer | Blender reference | api reference
Args:#
value: [‘Float’, ‘Vector’, ‘Color’, ‘Integer’, ‘Boolean’]
Returns:#
node with sockets []
Go to top - main - nodes - nodes menus
viewer#
def viewer(self, value=None)
Node: Viewer | Blender reference | api reference
Args:#
value: [‘Float’, ‘Vector’, ‘Color’, ‘Integer’, ‘Boolean’]
Returns:#
node with sockets []
Go to top - main - nodes - nodes menus