ControlPoint

ControlPoint is a domain property of Curve.

curve.splines = ControlPoint(self)
class ControlPoint(data_socket, selection=None)
property ID

ID attribute

Returns

Integer

property as_cloud_points

Type cast to CloudPoint.

property as_control_points

Type cast to ControlPoint.

property as_corners

Type cast to Corner.

property as_edges

Type cast to Edge.

property as_faces

Type cast to Face.

property as_insts

Type cast to Instance.

property as_splines

Type cast to Spline.

property as_verts

Type cast to Vertex.

attribute(node)

Define an input node as attribute

Parameters

node (Node) – The node created by the domain

Returns

The node argument

Called when creating an input node in a property getter. Performs two actions:

  • Call the method Node.as_attribute() to tag the node as being an attribute. This will allow the Tree.check_attributes() to see if it is necessary to create a Capture Attribute for this field.

  • Set the nde property field_of to self in order to implement the transfer attribute mechanism.

property count

Count the number of items by return static.max + 1

Returns

Integer

getter: AttributeStatistic setter: read only

duplicate(amount=None)

Duplicate domain.

Node DuplicateElements

Parameters

amount – Integer

Returns

duplicate index

get_named_attribute(name, data_type='FLOAT')

Get a named attribute

Called by methods set_named_xxx:

get_named_boolean(name)

Get named attribute of type BOOLEAN

get_named_color(name)

Get named attribute of type FLOAT_COLOR

get_named_float(name)

Get named attribute of type FLOAT

get_named_integer(name)

Get named attribute of type INT

get_named_vector(name)

Get named attribute of type FLOAT_VECTOR

property handle_align

Align Handle selection

Returns

Boolean

getter: HandleTypeSelection

property handle_auto

Auto Handle selection

Returns

Boolean

getter: HandleTypeSelection

property handle_free

Free Handle selection

Returns

Boolean

getter: HandleTypeSelection

handle_positions(relative=None)

Handle positions node

Parameters

relative (Boolean) – relative

Returns

node CurveHandlePositions

Output sockets:
  • left : Vector

  • right : Vector

property handle_type

Handle type attribute

property handle_vector

Vector Handle selection

Returns

Boolean

getter: HandleTypeSelection

handles_selection(handle_type='AUTO', left=True, right=True)

Handle type selection

Parameters
  • handle_type (str) – in (‘FREE’, ‘AUTO’, ‘VECTOR’, ‘ALIGN’)

  • left (bool) – select left handle

  • right (bool) – select right handle

Returns

Boolean

getter: HandleTypeSelection

property index

Index attribute

Returns

Integer

  • setter: Index

  • setter: Read only

index_transfer(attribute, index=None)

Transfer attribute with INDEX mapping

Parameters
  • attribute (Any) – The attribute to transfer

  • index (Integer) – Index

Returns

Same as attribute

instantiate(instance=None, pick_instance=None, instance_index=None, rotation=None, scale=None)

Put instances on points

Node InstanceOnPoints

Parameters
  • instance – Geometry

  • pick_instance – Boolean

  • instance_index – Integer

  • rotation – Vector

  • scale – Vector

Returns

Instances

Example


mesh.verts(…).instantiate(…) curve.points(…).instantiate(…) cloud.points(…).instantiate(…)

property left_handle_align

Left Align Handle selection

Returns

Boolean

getter: HandleTypeSelection

property left_handle_auto

Left Auto Handle selection

Returns

Boolean

getter: HandleTypeSelection

property left_handle_free

Left Free Handle selection

Returns

Boolean

getter: HandleTypeSelection

property left_handle_offsets

Left handle offsets, write only

property left_handle_positions

Right handle positions, write only

property left_handle_vector

Left Vector Handle selection

Returns

Boolean

getter: HandleTypeSelection

left_handles(relative=None)

Left handle positions

Parameters

relative (Boolean) – relative

Returns

the left output socket of node CurveHandlePositions

Return type

Vector

property left_type

Left handle type attribute

nearest_face_transfer(attribute, source_position=None)

Transfer attribute with NEAREST_FACE_INTERPOLATED mapping

Parameters
  • attribute (Any) – The attribute to transfer

  • source_position (Vector) – Source position socket

Returns

Same as attribute

nearest_transfer(attribute, source_position=None)

Transfer attribute with NEAREST mapping

Parameters
  • attribute (Any) – The attribute to transfer

  • source_position (Vector) – Source position socket

Returns

Same as attribute

property offset

“Offset” attribute (offset socket of SetPosition node)

Returns

Vector

property position

Position attribute

Returns

Vector

property radius

Radius attribute

Returns

Float

getter: Radius setter: :class: ~geonodes.nodes.nodes.SetCurveRadius

property right_handle_align

Right Align Handle selection

Returns

Boolean

getter: HandleTypeSelection

property right_handle_auto

Right Auto Handle selection

Returns

Boolean

getter: HandleTypeSelection

property right_handle_free

Right Free Handle selection

Returns

Boolean

getter: HandleTypeSelection

property right_handle_offsets

Right handle offsets, write only

property right_handle_positions

Right handle positions, write only

property right_handle_vector

Right Vector Handle selection

Returns

Boolean

getter: HandleTypeSelection

right_handles(relative=None)

Right handle positions

Parameters

relative (Boolean) – relative

Returns

the right output socket of node CurveHandlePositions

Return type

Vector

property right_type

Left handle type attribute

select(selection)

Select the domain

Parameters

selection (Boolean) – The selection condition

If a selection is existing, the resulting selection is a logical and betwenn the two

set_handle_positions(position=None, offset=None, mode='LEFT')

Set handle positions

Parameters
  • position (Vector) – Positions

  • offset (Vector) – Offset

  • mode (str) – ‘LEFT’ or ‘RIGHT’

set_handle_type(handle_type='AUTO', mode={'LEFT', 'RIGHT'})

Set handle type

Parameters
  • handle_type (str) – in (‘FREE’, ‘AUTO’, ‘VECTOR’, ‘ALIGN’)

  • mode (set of strs) – {‘LEFT’, ‘RIGHT’}

set_named_attribute(name, value, data_type=None)

Set a named attribute

Called by classes set_named_xxx:

set_named_boolean(name, value)

Set named attribute of type BOOLEAN

set_named_byte_color(name, value)

Set named attribute of type BYTE_COLOR

set_named_color(name, value)

Set named attribute of type FLOAT_COLOR

set_named_float(name, value)

Set named attribute of type FLOAT

set_named_integer(name, value)

Set named attribute of type INT

set_named_vector(name, value)

Set named attribute of type FLOAT_VECTOR

stack(node)

Make the owning socket jump to the output socket of the node passed in argumment.

Parameters

node (Node) – The node to jump to

statistic(attribute, data_type=None)

Attribute statistic

call AttributeStatistic

property tangent

Tangent attribute

Returns

Vector

getter: CurveTangent setter: read only

property tilt

Tilt attribute

Returns

Float

getter: CurveTilt setter: :class: ~geonodes.nodes.nodes.SetCurveTilt

transfer_attribute(attribute, source_position=None, index=None, data_type=None, mapping='NEAREST_FACE_INTERPOLATED')

Transfer attribute

Parameters
  • attribute (Any) – The attribute to transfer

  • source_position (Vector) – Source position socket

  • index (Integer) – Index socket

  • data_type (str) – A valid data type

  • mapping (str) – str in (‘NEAREST’, ‘INDEX’, ‘NEAREST_FACE_INTERPOLATED’).

Returns

As defined by data_type

If data_type is None, it is computed from the attribute type.

This method is called by a DataSocket with a property field_of pointing on the domain:

# Domain Vertex

verts = mesh.verts

# Attribute position: position.field_of = verts

position = verts.position

# Transfer to a var

location = position.index_transfer()

# Which is equivalent to:

location = verts.index_transfer(verts.position)