GreasePencilDrawing(bpy_struct)#

base class — bpy_struct

class bpy.types.GreasePencilDrawing(bpy_struct)#

A Grease Pencil drawing

attributes#

Geometry attributes

Type:

AttributeGroupGreasePencilDrawing bpy_prop_collection of Attribute, (readonly)

color_attributes#

Geometry color attributes

Type:

AttributeGroupGreasePencilDrawing bpy_prop_collection of Attribute, (readonly)

curve_offsets#

Offset indices of the first point of each curve

Type:

bpy_prop_collection of IntAttributeValue, (readonly)

type#

Drawing type

Type:

enum in [‘DRAWING’, ‘REFERENCE’], default ‘DRAWING’, (readonly)

user_count#

The number of keyframes this drawing is used by

Type:

int in [-inf, inf], default 0, (readonly)

add_curves(sizes)#

Add new curves with provided sizes at the end

Parameters:

sizes (int array of 64 items in [1, inf]) – Sizes, The number of points in each curve

remove_curves(indices=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))#

Remove all curves. If indices are provided, remove only the curves with the given indices.

Parameters:

indices (int array of 64 items in [0, inf], (optional)) – Indices, The indices of the curves to remove

resize_curves(sizes, indices=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))#

Resize all existing curves. If indices are provided, resize only the curves with the given indices. If the new size for a curve is smaller, the curve is trimmed. If the new size for a curve is larger, the new end values are default initialized.

Parameters:
  • sizes (int array of 64 items in [1, inf]) – Sizes, The number of points in each curve

  • indices (int array of 64 items in [0, inf], (optional)) – Indices, The indices of the curves to resize

classmethod bl_rna_get_subclass(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties#

Inherited Functions#

References#