Blender V4.3
Drawing Class Reference

#include <BKE_grease_pencil.hh>

Inherits GreasePencilDrawing.

Public Member Functions

 Drawing ()
 Drawing (const Drawing &other)
 Drawing (Drawing &&other)
Drawingoperator= (const Drawing &other)
Drawingoperator= (Drawing &&other)
 ~Drawing ()
const bke::CurvesGeometry & strokes () const
bke::CurvesGeometry & strokes_for_write ()
Span< uint3triangles () const
Span< float3curve_plane_normals () const
void tag_texture_matrices_changed ()
void tag_positions_changed ()
void tag_positions_changed (const IndexMask &changed_curves)
void tag_topology_changed ()
void tag_topology_changed (const IndexMask &changed_curves)
Span< float4x2texture_matrices () const
void set_texture_matrices (Span< float4x2 > matrices, const IndexMask &selection)
VArray< floatradii () const
MutableSpan< floatradii_for_write ()
VArray< floatopacities () const
MutableSpan< floatopacities_for_write ()
VArray< ColorGeometry4fvertex_colors () const
MutableSpan< ColorGeometry4fvertex_colors_for_write ()
VArray< ColorGeometry4ffill_colors () const
MutableSpan< ColorGeometry4ffill_colors_for_write ()
void add_user () const
void remove_user () const
bool is_instanced () const
bool has_users () const
int user_count () const

Additional Inherited Members

Public Attributes inherited from GreasePencilDrawing
GreasePencilDrawingBase base
CurvesGeometry geometry
GreasePencilDrawingRuntimeHandleruntime

Detailed Description

Definition at line 82 of file BKE_grease_pencil.hh.

Constructor & Destructor Documentation

◆ Drawing() [1/3]

blender::bke::greasepencil::Drawing::Drawing ( )

Definition at line 311 of file grease_pencil.cc.

◆ Drawing() [2/3]

blender::bke::greasepencil::Drawing::Drawing ( const Drawing & other)

Definition at line 321 of file grease_pencil.cc.

◆ Drawing() [3/3]

blender::bke::greasepencil::Drawing::Drawing ( Drawing && other)

Definition at line 336 of file grease_pencil.cc.

◆ ~Drawing()

blender::bke::greasepencil::Drawing::~Drawing ( )

Definition at line 369 of file grease_pencil.cc.

Member Function Documentation

◆ add_user()

void blender::bke::greasepencil::Drawing::add_user ( ) const
inline

Add a user for this drawing. When a drawing has multiple users, both users are allowed to modify this drawings data.

Definition at line 758 of file BKE_grease_pencil.hh.

Referenced by grease_pencil_transdata_add_drawing_users().

◆ curve_plane_normals()

Span< float3 > blender::bke::greasepencil::Drawing::curve_plane_normals ( ) const

Normal vectors for a plane that fits the stroke.

Definition at line 496 of file grease_pencil.cc.

◆ fill_colors()

VArray< ColorGeometry4f > blender::bke::greasepencil::Drawing::fill_colors ( ) const

Fill colors of the curves. Default is black and fully transparent. This is mixed on top of the base material fill color.

Definition at line 758 of file grease_pencil.cc.

◆ fill_colors_for_write()

MutableSpan< ColorGeometry4f > blender::bke::greasepencil::Drawing::fill_colors_for_write ( )

Definition at line 764 of file grease_pencil.cc.

◆ has_users()

bool blender::bke::greasepencil::Drawing::has_users ( ) const
inline

Return true if this drawing has at least one user.

Definition at line 770 of file BKE_grease_pencil.hh.

◆ is_instanced()

bool blender::bke::greasepencil::Drawing::is_instanced ( ) const
inline

Returns true for when this drawing has more than one user.

Definition at line 766 of file BKE_grease_pencil.hh.

◆ opacities()

VArray< float > blender::bke::greasepencil::Drawing::opacities ( ) const

Opacity array for the points. Used by the render engine as an alpha value so they are expected to be between 0 and 1 inclusive.

Definition at line 732 of file grease_pencil.cc.

◆ opacities_for_write()

MutableSpan< float > blender::bke::greasepencil::Drawing::opacities_for_write ( )

Definition at line 738 of file grease_pencil.cc.

◆ operator=() [1/2]

Drawing & blender::bke::greasepencil::Drawing::operator= ( const Drawing & other)

Definition at line 349 of file grease_pencil.cc.

◆ operator=() [2/2]

Drawing & blender::bke::greasepencil::Drawing::operator= ( Drawing && other)

Definition at line 359 of file grease_pencil.cc.

◆ radii()

VArray< float > blender::bke::greasepencil::Drawing::radii ( ) const

Radii of the points. Values are expected to be in blender units.

Definition at line 720 of file grease_pencil.cc.

◆ radii_for_write()

MutableSpan< float > blender::bke::greasepencil::Drawing::radii_for_write ( )

Definition at line 726 of file grease_pencil.cc.

◆ remove_user()

void blender::bke::greasepencil::Drawing::remove_user ( ) const
inline

Removes a user from this drawing. Note that this does not handle deleting the drawing if it has not users.

Definition at line 762 of file BKE_grease_pencil.hh.

Referenced by grease_pencil_transdata_remove_drawing_users().

◆ set_texture_matrices()

void blender::bke::greasepencil::Drawing::set_texture_matrices ( Span< float4x2 > matrices,
const IndexMask & selection )

Sets the matrices the that transform from a 3D point in layer-space to a 2D point in texture-space

Definition at line 635 of file grease_pencil.cc.

◆ strokes()

const bke::CurvesGeometry & blender::bke::greasepencil::Drawing::strokes ( ) const

Definition at line 710 of file grease_pencil.cc.

◆ strokes_for_write()

bke::CurvesGeometry & blender::bke::greasepencil::Drawing::strokes_for_write ( )

Definition at line 715 of file grease_pencil.cc.

Referenced by BKE_grease_pencil_vgroup_name_update().

◆ tag_positions_changed() [1/2]

void blender::bke::greasepencil::Drawing::tag_positions_changed ( )

Definition at line 777 of file grease_pencil.cc.

◆ tag_positions_changed() [2/2]

void blender::bke::greasepencil::Drawing::tag_positions_changed ( const IndexMask & changed_curves)

Tag only the positions of some curves.

Definition at line 785 of file grease_pencil.cc.

◆ tag_texture_matrices_changed()

void blender::bke::greasepencil::Drawing::tag_texture_matrices_changed ( )

Definition at line 772 of file grease_pencil.cc.

◆ tag_topology_changed() [1/2]

void blender::bke::greasepencil::Drawing::tag_topology_changed ( )

Definition at line 825 of file grease_pencil.cc.

◆ tag_topology_changed() [2/2]

void blender::bke::greasepencil::Drawing::tag_topology_changed ( const IndexMask & changed_curves)

Tag only some curves for a topology change. Do not call this if curves have been added or removed.

Definition at line 832 of file grease_pencil.cc.

◆ texture_matrices()

Span< float4x2 > blender::bke::greasepencil::Drawing::texture_matrices ( ) const

Returns the matrices that transform from a 3D point in layer-space to a 2D point in texture-space. This is stored per curve.

Definition at line 600 of file grease_pencil.cc.

◆ triangles()

Span< uint3 > blender::bke::greasepencil::Drawing::triangles ( ) const

The triangles for fill geometry. Grouped by each stroke.

Definition at line 439 of file grease_pencil.cc.

◆ user_count()

int blender::bke::greasepencil::Drawing::user_count ( ) const
inline

Return the number of users (keyframes) of this drawing.

Definition at line 774 of file BKE_grease_pencil.hh.

◆ vertex_colors()

VArray< ColorGeometry4f > blender::bke::greasepencil::Drawing::vertex_colors ( ) const

Vertex colors of the points. Default is black. This is mixed on top of the base material stroke color.

Definition at line 744 of file grease_pencil.cc.

◆ vertex_colors_for_write()

MutableSpan< ColorGeometry4f > blender::bke::greasepencil::Drawing::vertex_colors_for_write ( )

Definition at line 750 of file grease_pencil.cc.


The documentation for this class was generated from the following files: