Blender V4.3
blender::bke::greasepencil Namespace Reference

Namespaces

namespace  convert
 
namespace  tests
 

Classes

class  Drawing
 
class  DrawingReference
 
class  DrawingRuntime
 
class  Layer
 
class  LayerGroup
 
class  LayerGroupRuntime
 
class  LayerMask
 
class  LayerRuntime
 
struct  LayerTransformData
 
class  TreeNode
 

Typedefs

using FramesMapKeyT = int
 

Functions

void copy_drawing_array (Span< const GreasePencilDrawingBase * > src_drawings, MutableSpan< GreasePencilDrawingBase * > dst_drawings)
 
 TREENODE_COMMON_METHODS_FORWARD_IMPL (Layer)
 
 TREENODE_COMMON_METHODS_FORWARD_IMPL (LayerGroup)
 
static int domain_num (const CurvesGeometry &curves, const AttrDomain domain)
 
static CustomDatadomain_custom_data (CurvesGeometry &curves, const AttrDomain domain)
 
template<typename T >
static MutableSpan< Tget_mutable_attribute (CurvesGeometry &curves, const AttrDomain domain, const StringRef name, const T default_value=T())
 
static void update_triangle_cache (const Span< float3 > positions, const Span< float3 > normals, const OffsetIndices< int > points_by_curve, const OffsetIndices< int > triangle_offsets, const IndexMask &curve_mask, MutableSpan< uint3 > triangles)
 
static void update_curve_plane_normal_cache (const Span< float3 > positions, const OffsetIndices< int > points_by_curve, const IndexMask &curve_mask, MutableSpan< float3 > normals)
 
static float4x2 get_local_to_stroke_matrix (const Span< float3 > positions, const float3 normal)
 
static float3x2 get_stroke_to_texture_matrix (const float uv_rotation, const float2 uv_translation, const float2 uv_scale)
 
static float4x3 expand_4x2_mat (float4x2 strokemat)
 
Vertex groups in drawings
void validate_drawing_vertex_groups (GreasePencil &grease_pencil)
 
int ensure_vertex_group (const StringRef name, ListBase &vertex_group_names)
 
void assign_to_vertex_group (Drawing &drawing, StringRef name, float weight)
 
void assign_to_vertex_group_from_mask (CurvesGeometry &curves, const IndexMask &mask, StringRef name, float weight)
 
bool remove_from_vertex_group (Drawing &drawing, StringRef name, bool use_selection)
 
void clear_vertex_groups (GreasePencil &grease_pencil)
 
void select_from_group (Drawing &drawing, const AttrDomain selection_domain, StringRef name, bool select)
 

Variables

constexpr float LEGACY_RADIUS_CONVERSION_FACTOR = 1.0f / 2000.0f
 
static const std::string ATTR_RADIUS = "radius"
 
static const std::string ATTR_OPACITY = "opacity"
 
static const std::string ATTR_VERTEX_COLOR = "vertex_color"
 
static const std::string ATTR_FILL_COLOR = "fill_color"
 

Typedef Documentation

◆ FramesMapKeyT

Function Documentation

◆ assign_to_vertex_group()

◆ assign_to_vertex_group_from_mask()

void blender::bke::greasepencil::assign_to_vertex_group_from_mask ( bke::CurvesGeometry & curves,
const IndexMask & mask,
StringRef name,
float weight )

◆ clear_vertex_groups()

void blender::bke::greasepencil::clear_vertex_groups ( GreasePencil & grease_pencil)

◆ copy_drawing_array()

void blender::bke::greasepencil::copy_drawing_array ( Span< const GreasePencilDrawingBase * > src_drawings,
MutableSpan< GreasePencilDrawingBase * > dst_drawings )

Copies the drawings from one array to another. Assumes that dst_drawings is allocated but not initialized, e.g. it will allocate new drawings and store the pointers.

Examples
/usr/src/RPM/BUILD/blender-4.3.0/source/blender/blenkernel/BKE_grease_pencil.hh.

Definition at line 912 of file grease_pencil.cc.

References BLI_assert, copy_drawing_array(), GP_DRAWING, GP_DRAWING_REFERENCE, blender::Span< T >::index_range(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), and GreasePencilDrawingBase::type.

Referenced by BKE_grease_pencil_duplicate_drawing_array(), and copy_drawing_array().

◆ domain_custom_data()

static CustomData & blender::bke::greasepencil::domain_custom_data ( CurvesGeometry & curves,
const AttrDomain domain )
static

Definition at line 282 of file grease_pencil.cc.

References blender::bke::Point.

Referenced by get_mutable_attribute().

◆ domain_num()

static int blender::bke::greasepencil::domain_num ( const CurvesGeometry & curves,
const AttrDomain domain )
static

Definition at line 278 of file grease_pencil.cc.

References blender::bke::Point.

Referenced by get_mutable_attribute().

◆ ensure_vertex_group()

int blender::bke::greasepencil::ensure_vertex_group ( const StringRef name,
ListBase & vertex_group_names )

Find or create a vertex group in a drawing.

Definition at line 55 of file grease_pencil_vertex_groups.cc.

References BKE_defgroup_name_index(), BLI_addtail(), BLI_assert, BLI_listbase_count(), and bDeformGroup::name.

◆ expand_4x2_mat()

static float4x3 blender::bke::greasepencil::expand_4x2_mat ( float4x2 strokemat)
static

◆ get_local_to_stroke_matrix()

static float4x2 blender::bke::greasepencil::get_local_to_stroke_matrix ( const Span< float3 > positions,
const float3 normal )
static

◆ get_mutable_attribute()

template<typename T >
static MutableSpan< T > blender::bke::greasepencil::get_mutable_attribute ( CurvesGeometry & curves,
const AttrDomain domain,
const StringRef name,
const T default_value = T() )
static

◆ get_stroke_to_texture_matrix()

static float3x2 blender::bke::greasepencil::get_stroke_to_texture_matrix ( const float uv_rotation,
const float2 uv_translation,
const float2 uv_scale )
static

◆ remove_from_vertex_group()

bool blender::bke::greasepencil::remove_from_vertex_group ( Drawing & drawing,
StringRef name,
bool use_selection )

◆ select_from_group()

void blender::bke::greasepencil::select_from_group ( Drawing & drawing,
const AttrDomain selection_domain,
StringRef name,
bool select )

◆ TREENODE_COMMON_METHODS_FORWARD_IMPL() [1/2]

blender::bke::greasepencil::TREENODE_COMMON_METHODS_FORWARD_IMPL ( Layer )

◆ TREENODE_COMMON_METHODS_FORWARD_IMPL() [2/2]

blender::bke::greasepencil::TREENODE_COMMON_METHODS_FORWARD_IMPL ( LayerGroup )

◆ update_curve_plane_normal_cache()

◆ update_triangle_cache()

◆ validate_drawing_vertex_groups()

Variable Documentation

◆ ATTR_FILL_COLOR

const std::string blender::bke::greasepencil::ATTR_FILL_COLOR = "fill_color"
static

◆ ATTR_OPACITY

const std::string blender::bke::greasepencil::ATTR_OPACITY = "opacity"
static

◆ ATTR_RADIUS

const std::string blender::bke::greasepencil::ATTR_RADIUS = "radius"
static

Definition at line 272 of file grease_pencil.cc.

◆ ATTR_VERTEX_COLOR

const std::string blender::bke::greasepencil::ATTR_VERTEX_COLOR = "vertex_color"
static

◆ LEGACY_RADIUS_CONVERSION_FACTOR