Class Face#
main - nodes - nodes menus
It uses the ‘FACE’ string domain.
Constructor#
Face(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 | area | as_cloud_points | as_control_points | as_corners | as_edges | as_faces | as_insts | as_splines | as_verts | count | data_socket | domain | domain_index | index | island | island_count | island_index | material | material_index | neighbors | neighbors_face_count | neighbors_vertex_count | normal | position | selection | selection_index | shade_smooth
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 | corners | corners_index | corners_total | delete | delete_all | delete_edges | delete_faces | distribute_points_poisson | distribute_points_random | duplicate | extrude | face_set_boundaries | field_at_index | flip | index_for_sample | interpolate | is_planar | material_selection | named_attribute | named_boolean | named_color | named_float | named_integer | named_vector | pack_uv_islands | proximity | remove_named_attribute | sample_index | sample_nearest | scale_single_axis | scale_uniform | select | separate | set_ID | set_material | set_material_index | set_position | set_shade_smooth | 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 | triangulate | uv_unwrap | 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
area#
Node: Face Area | Blender reference | api reference
Returns:#
node with sockets [‘area’]
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
face_count
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
island#
Node: Mesh Island | Blender reference | api reference
Returns:#
node with sockets [‘island_index’, ‘island_count’]
Go to top - main - nodes - nodes menus
island_count#
Node: Mesh Island | Blender reference | api reference
Returns:#
socket
island_count
Go to top - main - nodes - nodes menus
island_index#
Node: Mesh Island | Blender reference | api reference
Returns:#
socket
island_index
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
neighbors#
Node: Face Neighbors | Blender reference | api reference
Returns:#
node with sockets [‘vertex_count’, ‘face_count’]
Go to top - main - nodes - nodes menus
neighbors_face_count#
Node: Face Neighbors | Blender reference | api reference
Returns:#
socket
face_count
Go to top - main - nodes - nodes menus
neighbors_vertex_count#
Node: Face Neighbors | Blender reference | api reference
Returns:#
socket
vertex_count
Go to top - main - nodes - nodes menus
normal#
Node: Normal | Blender reference | api reference
Returns:#
socket
normal
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
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
shade_smooth#
Node: Is Shade Smooth | Blender reference | api reference
Returns:#
socket
smooth
Setter
Node: Set Shade Smooth | Blender reference | api reference
Node implemented as property setter.
Args:#
attr_value: shade_smooth
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
corners#
def corners(self, weights=None, sort_index=None)
Node: Corners of Face | Blender reference | api reference
Args:#
weights: Float
sort_index: Integer
Returns:#
tuple (’
corner_index
’, ‘total
’)
Go to top - main - nodes - nodes menus
corners_index#
def corners_index(self, weights=None, sort_index=None)
Node: Corners of Face | Blender reference | api reference
Args:#
weights: Float
sort_index: Integer
Returns:#
socket
corner_index
Go to top - main - nodes - nodes menus
corners_total#
def corners_total(self, weights=None, sort_index=None)
Node: Corners of Face | Blender reference | api reference
Args:#
weights: Float
sort_index: Integer
Returns:#
socket
total
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
delete_all#
def delete_all(self)
Node: Delete Geometry | Blender reference | api reference
Returns:#
self
Go to top - main - nodes - nodes menus
delete_edges#
def delete_edges(self)
Node: Delete Geometry | Blender reference | api reference
Returns:#
self
Go to top - main - nodes - nodes menus
delete_faces#
def delete_faces(self)
Node: Delete Geometry | Blender reference | api reference
Returns:#
self
Go to top - main - nodes - nodes menus
distribute_points_poisson#
def distribute_points_poisson(self, distance_min=None, density_max=None, density_factor=None, seed=None)
Args:#
distance_min: Float
density_max: Float
density_factor: Float
seed: Integer
Returns:#
tuple (’
points
’, ‘normal
’, ‘rotation
’)
Go to top - main - nodes - nodes menus
distribute_points_random#
def distribute_points_random(self, density=None, seed=None)
Args:#
density: Float
seed: Integer
Returns:#
tuple (’
points
’, ‘normal
’, ‘rotation
’)
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
extrude#
def extrude(self, offset=None, offset_scale=None, individual=None)
Node: Extrude Mesh | Blender reference | api reference
Args:#
offset: Vector
offset_scale: Float
individual: Boolean
Returns:#
tuple (’
top
’, ‘side
’)
Go to top - main - nodes - nodes menus
face_set_boundaries#
def face_set_boundaries(self)
Returns:#
socket
boundary_edges
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
flip#
def flip(self)
Node: Flip Faces | Blender reference | api reference
Returns:#
self
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
is_planar#
def is_planar(self, threshold=None)
Node: Face is Planar | Blender reference | api reference
Args:#
threshold: Float
Returns:#
socket
planar
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
pack_uv_islands#
def pack_uv_islands(self, uv=None, margin=None, rotate=None)
Node: Pack UV Islands | Blender reference | api reference
Args:#
uv: Vector
margin: Float
rotate: Boolean
Returns:#
socket
uv
Go to top - main - nodes - nodes menus
proximity#
def proximity(self, target=None, source_position=None)
Node: Geometry Proximity | Blender reference | api reference
Args:#
target: Geometry
source_position: Vector
Returns:#
socket
distance
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
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
sample_nearest#
def sample_nearest(self, sample_position=None)
Node: Sample Nearest | Blender reference | api reference
Args:#
sample_position: Vector
Returns:#
socket
index
Go to top - main - nodes - nodes menus
scale_single_axis#
def scale_single_axis(self, scale=None, center=None, axis=None)
Node: Scale Elements | Blender reference | api reference
Args:#
scale: Float
center: Vector
axis: Vector
Returns:#
self
Go to top - main - nodes - nodes menus
scale_uniform#
def scale_uniform(self, scale=None, center=None)
Node: Scale Elements | Blender reference | api reference
Args:#
scale: Float
center: Vector
Returns:#
self
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_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_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_shade_smooth#
def set_shade_smooth(self, shade_smooth=None)
Node: Set Shade Smooth | Blender reference | api reference
Args:#
shade_smooth: Boolean
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
triangulate#
def triangulate(self, minimum_vertices=None, ngon_method='BEAUTY', quad_method='SHORTEST_DIAGONAL')
Node: Triangulate | Blender reference | api reference
Args:#
minimum_vertices: Integer
ngon_method (str): ‘BEAUTY’ in [BEAUTY, CLIP]
quad_method (str): ‘SHORTEST_DIAGONAL’ in [BEAUTY, FIXED, FIXED_ALTERNATE, SHORTEST_DIAGONAL, LONGEST_DIAGONAL]
Returns:#
self
Go to top - main - nodes - nodes menus
uv_unwrap#
def uv_unwrap(self, seam=None, margin=None, fill_holes=None, method='ANGLE_BASED')
Node: UV Unwrap | Blender reference | api reference
Args:#
seam: Boolean
margin: Float
fill_holes: Boolean
method (str): ‘ANGLE_BASED’ in [ANGLE_BASED, CONFORMAL]
Returns:#
socket
uv
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