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', 'INT8'], (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 32-bit floating-point values.

    • BYTE_COLOR Byte Color – RGBA color with 8-bit positive integer values.

    • STRING String – Text string.

    • BOOLEAN Boolean – True or false.

    • FLOAT2 2D Vector – 2D vector with floating-point values.

    • INT8 8-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

    • 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', 'INT8'], (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 32-bit floating-point values.

    • BYTE_COLOR Byte Color – RGBA color with 8-bit positive integer values.

    • STRING String – Text string.

    • BOOLEAN Boolean – True or false.

    • FLOAT2 2D Vector – 2D vector with floating-point values.

    • INT8 8-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