Blender V5.3
blender::Drawing Class Reference

#include <BKE_grease_pencil.hh>

Inherits blender::GreasePencilDrawing.

Public Member Functions

 Drawing ()
 Drawing (const Drawing &other)
 Drawing (Drawing &&other)
Drawing & operator= (const Drawing &other)
Drawing & operator= (Drawing &&other)
 ~Drawing ()
const bke::CurvesGeometry & strokes () const
bke::CurvesGeometry & strokes_for_write ()
std::optional< GroupedSpan< int > > fills () const
std::optional< GroupedSpan< int3 > > triangles () const
GroupedSpan< float3 > intersection_points () const
Span< float3 > curve_plane_normals () const
void tag_texture_matrices_changed ()
void tag_triangles_changed ()
void tag_fills_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< float4x2 > texture_matrices () const
void set_texture_matrices (Span< float4x2 > matrices, const IndexMask &selection)
VArray< float > radii () const
MutableSpan< float > radii_for_write ()
VArray< float > opacities () const
MutableSpan< float > opacities_for_write ()
VArray< ColorGeometry4f > vertex_colors () const
MutableSpan< ColorGeometry4f > vertex_colors_for_write ()
VArray< ColorGeometry4f > fill_colors () const
MutableSpan< ColorGeometry4f > fill_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 blender::GreasePencilDrawing
GreasePencilDrawingBase base
CurvesGeometry geometry
bke::greasepencil::DrawingRuntime * runtime = nullptr

Detailed Description

Definition at line 136 of file BKE_grease_pencil.hh.

Constructor & Destructor Documentation

◆ Drawing() [1/3]

◆ Drawing() [2/3]

Definition at line 471 of file grease_pencil.cc.

◆ Drawing() [3/3]

Definition at line 486 of file grease_pencil.cc.

◆ ~Drawing()

Member Function Documentation

◆ add_user()

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

Definition at line 858 of file BKE_grease_pencil.hh.

◆ curve_plane_normals()

Normal vectors for a plane that fits the stroke.

Definition at line 854 of file grease_pencil.cc.

◆ fill_colors()

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 1129 of file grease_pencil.cc.

◆ fill_colors_for_write()

◆ fills()

std::optional< GroupedSpan< int > > blender::bke::greasepencil::Drawing::fills ( ) const

Group of curve indices for each fill. Can be nullopt when there are no fills in this drawing.

Definition at line 537 of file grease_pencil.cc.

◆ has_users()

Return true if this drawing has at least one user.

Definition at line 870 of file BKE_grease_pencil.hh.

◆ intersection_points()

The extra points used when fill geometry intersect. Grouped by each fill. Can be empty when there are no fills in this drawing. See fills().

Definition at line 796 of file grease_pencil.cc.

◆ is_instanced()

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

Definition at line 866 of file BKE_grease_pencil.hh.

◆ opacities()

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 1098 of file grease_pencil.cc.

◆ opacities_for_write()

◆ operator=() [1/2]

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

Definition at line 499 of file grease_pencil.cc.

◆ operator=() [2/2]

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

Definition at line 509 of file grease_pencil.cc.

◆ radii()

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

Definition at line 1083 of file grease_pencil.cc.

◆ radii_for_write()

◆ remove_user()

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

Definition at line 862 of file BKE_grease_pencil.hh.

◆ set_texture_matrices()

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

Definition at line 993 of file grease_pencil.cc.

◆ strokes()

◆ strokes_for_write()

◆ tag_fills_changed()

Tag when the fills have changed, e.g. when curves have been filled/unfilled.

Definition at line 1155 of file grease_pencil.cc.

◆ tag_positions_changed() [1/2]

Tag when the positions of points have changed.

Definition at line 1161 of file grease_pencil.cc.

◆ tag_positions_changed() [2/2]

Tag only the positions of some curves.

Definition at line 1295 of file grease_pencil.cc.

◆ tag_texture_matrices_changed()

Tag when the texture coordinates have changed.

Definition at line 1145 of file grease_pencil.cc.

◆ tag_topology_changed() [1/2]

◆ tag_topology_changed() [2/2]

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

Definition at line 1377 of file grease_pencil.cc.

◆ tag_triangles_changed()

◆ texture_matrices()

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 958 of file grease_pencil.cc.

◆ triangles()

The triangles for fill geometry. Grouped by each fill. Can be nullopt when there are no fills in this drawing. See fills().

Definition at line 785 of file grease_pencil.cc.

◆ user_count()

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

Definition at line 874 of file BKE_grease_pencil.hh.

◆ vertex_colors()

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

Definition at line 1113 of file grease_pencil.cc.

◆ vertex_colors_for_write()


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