Geometry Operators
- bpy.ops.geometry.attribute_add(name='Attribute', domain='POINT', data_type='FLOAT')
Add attribute to geometry
- Parameters
name (string, (optional, never None)) – Name, Name of new attribute
domain (enum in ['POINT', 'EDGE', 'FACE', 'CORNER', 'CURVE', 'INSTANCE'], (optional)) –
Domain, Type of element that attribute is stored on
POINT
Point – Attribute on point.EDGE
Edge – Attribute on mesh edge.FACE
Face – Attribute on mesh faces.CORNER
Face Corner – Attribute on mesh face corner.CURVE
Spline – Attribute on spline.INSTANCE
Instance – Attribute on instance.
data_type (enum in ['FLOAT', 'INT', 'FLOAT_VECTOR', 'FLOAT_COLOR', 'BYTE_COLOR', 'STRING', 'BOOLEAN', 'FLOAT2'], (optional)) –
Data Type, Type of data stored in attribute
FLOAT
Float – Floating-point value.INT
Integer – 32-bit integer.FLOAT_VECTOR
Vector – 3D vector with floating-point values.FLOAT_COLOR
Color – RGBA color with floating-point values.BYTE_COLOR
Byte Color – RGBA color with 8-bit values.STRING
String – Text string.BOOLEAN
Boolean – True or false.FLOAT2
2D Vector – 2D vector with floating-point values.
- bpy.ops.geometry.attribute_convert(mode='GENERIC', domain='POINT', data_type='FLOAT')
Change how the attribute is stored
- Parameters
mode (enum in ['GENERIC', 'UV_MAP', 'VERTEX_GROUP', 'VERTEX_COLOR'], (optional)) – Mode
domain (enum in ['POINT', 'EDGE', 'FACE', 'CORNER', 'CURVE', 'INSTANCE'], (optional)) –
Domain, Which geometry element to move the attribute to
POINT
Point – Attribute on point.EDGE
Edge – Attribute on mesh edge.FACE
Face – Attribute on mesh faces.CORNER
Face Corner – Attribute on mesh face corner.CURVE
Spline – Attribute on spline.INSTANCE
Instance – Attribute on instance.
data_type (enum in ['FLOAT', 'INT', 'FLOAT_VECTOR', 'FLOAT_COLOR', 'BYTE_COLOR', 'STRING', 'BOOLEAN', 'FLOAT2'], (optional)) –
Data Type
FLOAT
Float – Floating-point value.INT
Integer – 32-bit integer.FLOAT_VECTOR
Vector – 3D vector with floating-point values.FLOAT_COLOR
Color – RGBA color with floating-point values.BYTE_COLOR
Byte Color – RGBA color with 8-bit values.STRING
String – Text string.BOOLEAN
Boolean – True or false.FLOAT2
2D Vector – 2D vector with floating-point values.
- bpy.ops.geometry.attribute_remove()
Remove attribute from geometry