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
POINTPoint – Attribute on point.EDGEEdge – Attribute on mesh edge.FACEFace – Attribute on mesh faces.CORNERFace Corner – Attribute on mesh face corner.CURVESpline – Attribute on spline.INSTANCEInstance – Attribute on instance.
data_type (enum in ['FLOAT', 'INT', 'FLOAT_VECTOR', 'FLOAT_COLOR', 'BYTE_COLOR', 'STRING', 'BOOLEAN', 'FLOAT2', 'INT8'], (optional)) –
Data Type, Type of data stored in attribute
FLOATFloat – Floating-point value.INTInteger – 32-bit integer.FLOAT_VECTORVector – 3D vector with floating-point values.FLOAT_COLORColor – RGBA color with 32-bit floating-point values.BYTE_COLORByte Color – RGBA color with 8-bit positive integer values.STRINGString – Text string.BOOLEANBoolean – True or false.FLOAT22D Vector – 2D vector with floating-point values.INT88-Bit Integer – Smaller integer with a range from -128 to 127.
- 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'], (optional)) – Mode
domain (enum in ['POINT', 'EDGE', 'FACE', 'CORNER', 'CURVE', 'INSTANCE'], (optional)) –
Domain, Which geometry element to move the attribute to
POINTPoint – Attribute on point.EDGEEdge – Attribute on mesh edge.FACEFace – Attribute on mesh faces.CORNERFace Corner – Attribute on mesh face corner.CURVESpline – Attribute on spline.INSTANCEInstance – Attribute on instance.
data_type (enum in ['FLOAT', 'INT', 'FLOAT_VECTOR', 'FLOAT_COLOR', 'BYTE_COLOR', 'STRING', 'BOOLEAN', 'FLOAT2', 'INT8'], (optional)) –
Data Type
FLOATFloat – Floating-point value.INTInteger – 32-bit integer.FLOAT_VECTORVector – 3D vector with floating-point values.FLOAT_COLORColor – RGBA color with 32-bit floating-point values.BYTE_COLORByte Color – RGBA color with 8-bit positive integer values.STRINGString – Text string.BOOLEANBoolean – True or false.FLOAT22D Vector – 2D vector with floating-point values.INT88-Bit Integer – Smaller integer with a range from -128 to 127.
- bpy.ops.geometry.attribute_remove()
Remove attribute from geometry
- bpy.ops.geometry.color_attribute_add(name='Color', domain='POINT', data_type='COLOR', color=(0.0, 0.0, 0.0, 1.0))
Add color attribute to geometry
- Parameters
name (string, (optional, never None)) – Name, Name of new color attribute
domain (enum in ['POINT', 'CORNER'], (optional)) – Domain, Type of element that attribute is stored on
data_type (enum in ['COLOR', 'BYTE_COLOR'], (optional)) – Data Type, Type of data stored in attribute
color (float array of 4 items in [0, inf], (optional)) – Color, Default fill color
- bpy.ops.geometry.color_attribute_remove()
Remove color attribute from geometry
- bpy.ops.geometry.color_attribute_render_set(name='Color')
Set default color attribute used for rendering
- Parameters
name (string, (optional, never None)) – Name, Name of color attribute