Blender V4.3
/usr/src/RPM/BUILD/blender-4.3.0/source/blender/blenkernel/BKE_grease_pencil.hh

This Map maps a scene frame number (key) to a GreasePencilFrame. This struct holds an index (drawing_index) to the drawing in the GreasePencil->drawings array. The frame number indicates the first frame the drawing is shown. The end time is implicitly defined by the next greater frame number (key) in the map. If the value mapped to (index) is -1, no drawing is shown at this frame. Frames with such a value are GreasePencilFrame::end() in the code.

{0: 0, 5: 1, 10: -1, 12: 2, 16: -1}

In this example there are three drawings (drawing #0, drawing #1 and drawing #2). The first drawing starts at frame 0 and ends at frame 5 (exclusive). The second drawing starts at frame 5 and ends at frame 10. Finally, the third drawing starts at frame 12 and ends at frame 16.

          | | | | | | | | | | |1|1|1|1|1|1|1|

Scene Frame: |0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|... Drawing: [#0 ][#1 ] [#2 ]

Note
If a drawing references another data-block, all of the drawings in that data-block are mapped sequentially to the frames (frame-by-frame). If another frame starts, the rest of the referenced drawings are discarded. If the frame is longer than the number of referenced drawings, then the last referenced drawing is held for the rest of the duration.
/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include <atomic>
#include "BLI_color.hh"
#include "BLI_map.hh"
struct Main;
struct Depsgraph;
struct Scene;
struct Object;
struct Material;
namespace blender::bke::bake {
struct BakeMaterialsList;
}
namespace blender::bke {
namespace greasepencil {
/* Previously, Grease Pencil used a radius convention where 1 `px` = 0.001 units. This `px`
* was the brush size which would be stored in the stroke thickness and then scaled by the
* point pressure factor. Finally, the render engine would divide this thickness value by
* 2000 (we're going from a thickness to a radius, hence the factor of two) to convert back
* into blender units. With Grease Pencil 3, the radius is no longer stored in `px` space,
* but in blender units (world space) directly. Also note that there is no longer a stroke
* "thickness" attribute, the radii are directly stored on the points.
* For compatibility, legacy thickness values have to be multiplied by this factor. */
constexpr float LEGACY_RADIUS_CONVERSION_FACTOR = 1.0f / 2000.0f;
class DrawingRuntime {
public:
mutable SharedCache<Vector<int>> triangle_offsets_cache;
mutable SharedCache<Vector<uint3>> triangles_cache;
mutable SharedCache<Vector<float3>> curve_plane_normals_cache;
/*
* Matrices that transform from a 3D point in layer-space to a 2D point in texture-space. This is
* stored per curve.
*/
mutable SharedCache<Vector<float4x2>> curve_texture_matrices;
mutable std::atomic<int> user_count = 1;
};
class Drawing : public ::GreasePencilDrawing {
public:
Drawing(const Drawing &other);
Drawing(Drawing &&other);
Drawing &operator=(const Drawing &other);
const bke::CurvesGeometry &strokes() const;
bke::CurvesGeometry &strokes_for_write();
Span<uint3> triangles() const;
Span<float3> curve_plane_normals() const;
void tag_positions_changed(const IndexMask &changed_curves);
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;
private:
OffsetIndices<int> triangle_offsets() const;
};
static_assert(sizeof(Drawing) == sizeof(::GreasePencilDrawing));
class DrawingReference : public ::GreasePencilDrawingReference {
public:
};
static_assert(sizeof(DrawingReference) == sizeof(::GreasePencilDrawingReference));
void copy_drawing_array(Span<const GreasePencilDrawingBase *> src_drawings,
MutableSpan<GreasePencilDrawingBase *> dst_drawings);
class LayerGroup;
class Layer;
/* Defines the common functions used by #TreeNode, #Layer, and #LayerGroup.
* NOTE: Because we cannot mix C-style and C++ inheritance (all of these three classes wrap a
* C-struct that already uses "inheritance"), we define and implement these methods on all these
* classes individually. This just means that we can call `layer->name()` directly instead of
* having to write `layer->as_node().name()`. For #Layer and #LayerGroup the calls are just
* forwarded to #TreeNode. */
#define TREENODE_COMMON_METHODS \
StringRefNull name() const; \
void set_name(StringRefNull new_name); \
bool is_visible() const; \
void set_visible(bool visible); \
bool is_locked() const; \
void set_locked(bool locked); \
bool is_editable() const; \
bool is_selected() const; \
void set_selected(bool selected); \
bool use_onion_skinning() const; \
bool use_masks() const; \
bool ignore_locked_materials() const; \
bool is_child_of(const LayerGroup &group) const;
/* Implements the forwarding of the methods defined by #TREENODE_COMMON_METHODS. */
#define TREENODE_COMMON_METHODS_FORWARD_IMPL(class_name) \
inline StringRefNull class_name::name() const \
{ \
return this->as_node().name(); \
} \
inline void class_name::set_name(StringRefNull new_name) \
{ \
return this->as_node().set_name(new_name); \
} \
inline bool class_name::is_visible() const \
{ \
return this->as_node().is_visible(); \
} \
inline void class_name::set_visible(const bool visible) \
{ \
this->as_node().set_visible(visible); \
} \
inline bool class_name::is_locked() const \
{ \
return this->as_node().is_locked(); \
} \
inline void class_name::set_locked(const bool locked) \
{ \
this->as_node().set_locked(locked); \
} \
inline bool class_name::is_editable() const \
{ \
return this->as_node().is_editable(); \
} \
inline bool class_name::is_selected() const \
{ \
return this->as_node().is_selected(); \
} \
inline void class_name::set_selected(const bool selected) \
{ \
this->as_node().set_selected(selected); \
} \
inline bool class_name::use_onion_skinning() const \
{ \
return this->as_node().use_onion_skinning(); \
} \
inline bool class_name::use_masks() const \
{ \
return this->as_node().use_masks(); \
} \
inline bool class_name::ignore_locked_materials() const \
{ \
return this->as_node().ignore_locked_materials(); \
} \
inline bool class_name::is_child_of(const LayerGroup &group) const \
{ \
return this->as_node().is_child_of(group); \
}
class TreeNode : public ::GreasePencilLayerTreeNode {
public:
explicit TreeNode(GreasePencilLayerTreeNodeType type, StringRefNull name);
TreeNode(const TreeNode &other);
public:
/* Define the common functions for #TreeNode. */
bool is_group() const;
bool is_layer() const;
const Layer &as_layer() const;
Layer &as_layer();
const LayerGroup &as_group() const;
LayerGroup &as_group();
const LayerGroup *parent_group() const;
LayerGroup *parent_group();
const TreeNode *parent_node() const;
int64_t depth() const;
};
static_assert(sizeof(TreeNode) == sizeof(::GreasePencilLayerTreeNode));
class LayerMask : public ::GreasePencilLayerMask {
public:
explicit LayerMask(StringRefNull name);
LayerMask(const LayerMask &other);
};
static_assert(sizeof(LayerMask) == sizeof(::GreasePencilLayerMask));
struct LayerTransformData {
/* Map of frame keys describing the transformation of the frames. Keys of the map are the source
* frame indices, and the values of the map are the destination frame indices. */
Map<int, int> frames_destination;
/* Copy of the layer frames, stored in two separate maps :
* - frames_static contains the frames not affected by the transformation,
* - frames_transformed contains the frames affected by the transformation.
* This allows to display the transformation while running, without removing any drawing.
*/
Map<int, GreasePencilFrame> frames_static;
Map<int, GreasePencilFrame> frames_transformed;
/* Map containing the duration (in frames) for each frame in the layer that has a fixed duration,
* i.e. each frame that is not an implicit hold. */
Map<int, int> frames_duration;
/* Temporary copy of duplicated frames before we decide on a place to insert them.
* Used in the move+duplicate operator. */
Map<int, GreasePencilFrame> duplicated_frames_buffer;
};
/*
* The key type for a `GreasePencilFrame` in the frames map.
*
* This is either the start or end frame (scene time) of a `GreasePencilFrame`.
*
* If the key refers to a end frame, the value in the map for this key is
* `GreasePencilFrame::end()`.
* Note that end frame is exclusive with regards to the frame duration. E.g. if a frame starts at
* 10 and the end frame is at 15, then the duration is 4.
*/
using FramesMapKeyT = int;
class LayerRuntime {
public:
Map<FramesMapKeyT, GreasePencilFrame> frames_;
mutable SharedCache<Vector<FramesMapKeyT>> sorted_keys_cache_;
Vector<LayerMask> masks_;
/* Runtime data used for frame transformations. */
LayerTransformData trans_data_;
public:
/* Reset all runtime data. */
void clear();
};
class Layer : public ::GreasePencilLayer {
public:
using SortedKeysIterator = const int *;
Layer();
explicit Layer(StringRefNull name);
Layer(const Layer &other);
~Layer();
/* Define the common functions for #TreeNode. */
const TreeNode &as_node() const;
TreeNode &as_node();
const LayerGroup &parent_group() const;
LayerGroup &parent_group();
const Map<FramesMapKeyT, GreasePencilFrame> &frames() const;
Map<FramesMapKeyT, GreasePencilFrame> &frames_for_write();
bool is_empty() const;
GreasePencilFrame *add_frame(FramesMapKeyT key, int duration = 0);
bool remove_frame(FramesMapKeyT key);
Span<FramesMapKeyT> sorted_keys() const;
int drawing_index_at(const int frame_number) const;
bool has_drawing_at(const int frame_number) const;
std::optional<int> start_frame_at(int frame_number) const;
int sorted_keys_index_at(int frame_number) const;
const GreasePencilFrame *frame_at(const int frame_number) const;
GreasePencilFrame *frame_at(const int frame_number);
int get_frame_duration_at(const int frame_number) const;
void set_local_transform(const float4x4 &transform);
float4x4 to_object_space(const Object &object) const;
float4x4 to_world_space(const Object &object) const;
StringRefNull parent_bone_name() const;
void set_parent_bone_name(const char *new_name);
StringRefNull view_layer_name() const;
void set_view_layer_name(const char *new_name);
private:
std::optional<FramesMapKeyT> frame_key_at(int frame_number) const;
GreasePencilFrame *add_frame_internal(int frame_number);
SortedKeysIterator remove_leading_end_frames_in_range(SortedKeysIterator begin,
float4x4 parent_to_world(const Object &parent) const;
};
static_assert(sizeof(Layer) == sizeof(::GreasePencilLayer));
class LayerGroupRuntime {
public:
mutable CacheMutex nodes_cache_mutex_;
mutable Vector<TreeNode *> nodes_cache_;
mutable Vector<Layer *> layer_cache_;
mutable Vector<LayerGroup *> layer_group_cache_;
};
class LayerGroup : public ::GreasePencilLayerTreeGroup {
friend struct ::GreasePencil;
public:
explicit LayerGroup(StringRefNull name);
LayerGroup(const LayerGroup &other);
public:
/* Define the common functions for #TreeNode. */
const TreeNode &as_node() const;
TreeNode &as_node();
bool is_empty() const;
Span<const TreeNode *> nodes() const;
Span<TreeNode *> nodes_for_write();
Span<const Layer *> layers() const;
Span<Layer *> layers_for_write();
Span<const LayerGroup *> groups() const;
Span<LayerGroup *> groups_for_write();
const TreeNode *find_node_by_name(StringRefNull name) const;
TreeNode *find_node_by_name(StringRefNull name);
void print_nodes(StringRefNull header) const;
protected:
TreeNode &add_node(TreeNode &node);
void add_node_before(TreeNode &node, TreeNode &link);
void add_node_after(TreeNode &node, TreeNode &link);
void move_node_up(TreeNode &node, int step = 1);
void move_node_down(TreeNode &node, int step = 1);
void move_node_top(TreeNode &node);
void move_node_bottom(TreeNode &node);
bool unlink_node(TreeNode &link, bool keep_children = false);
private:
void ensure_nodes_cache() const;
void tag_nodes_cache_dirty() const;
};
static_assert(sizeof(LayerGroup) == sizeof(::GreasePencilLayerTreeGroup));
inline void Drawing::add_user() const
{
this->runtime->user_count.fetch_add(1, std::memory_order_relaxed);
}
inline void Drawing::remove_user() const
{
this->runtime->user_count.fetch_sub(1, std::memory_order_relaxed);
}
inline bool Drawing::is_instanced() const
{
return this->runtime->user_count.load(std::memory_order_relaxed) > 1;
}
inline bool Drawing::has_users() const
{
return this->runtime->user_count.load(std::memory_order_relaxed) > 0;
}
inline int Drawing::user_count() const
{
return this->runtime->user_count.load(std::memory_order_relaxed);
}
inline bool TreeNode::is_group() const
{
return this->type == GP_LAYER_TREE_GROUP;
}
inline bool TreeNode::is_layer() const
{
return this->type == GP_LAYER_TREE_LEAF;
}
inline bool TreeNode::is_visible() const
{
return ((this->flag & GP_LAYER_TREE_NODE_HIDE) == 0) &&
(!this->parent_group() || this->parent_group()->as_node().is_visible());
}
inline void TreeNode::set_visible(const bool visible)
{
}
inline bool TreeNode::is_locked() const
{
return ((this->flag & GP_LAYER_TREE_NODE_LOCKED) != 0) ||
(this->parent_group() && this->parent_group()->as_node().is_locked());
}
inline void TreeNode::set_locked(const bool locked)
{
}
inline bool TreeNode::is_editable() const
{
return this->is_visible() && !this->is_locked();
}
inline bool TreeNode::is_selected() const
{
return (this->flag & GP_LAYER_TREE_NODE_SELECT) != 0;
}
inline void TreeNode::set_selected(const bool selected)
{
}
inline bool TreeNode::use_onion_skinning() const
{
return ((this->flag & GP_LAYER_TREE_NODE_HIDE_ONION_SKINNING) == 0) &&
(!this->parent_group() || this->parent_group()->as_node().use_onion_skinning());
}
inline bool TreeNode::use_masks() const
{
return ((this->flag & GP_LAYER_TREE_NODE_HIDE_MASKS) == 0) &&
(!this->parent_group() || this->parent_group()->as_node().use_masks());
}
inline bool TreeNode::ignore_locked_materials() const
{
}
inline bool TreeNode::is_child_of(const LayerGroup &group) const
{
if (const LayerGroup *parent = this->parent_group()) {
if (parent == &group) {
return true;
}
return parent->is_child_of(group);
}
return false;
}
inline StringRefNull TreeNode::name() const
{
return (this->GreasePencilLayerTreeNode::name != nullptr) ?
StringRefNull();
}
inline const TreeNode &LayerGroup::as_node() const
{
return *reinterpret_cast<const TreeNode *>(this);
}
inline TreeNode &LayerGroup::as_node()
{
return *reinterpret_cast<TreeNode *>(this);
}
inline bool LayerGroup::is_empty() const
{
}
inline const TreeNode &Layer::as_node() const
{
return *reinterpret_cast<const TreeNode *>(this);
}
inline TreeNode &Layer::as_node()
{
return *reinterpret_cast<TreeNode *>(this);
}
inline bool Layer::is_empty() const
{
return (this->frames().is_empty());
}
inline const LayerGroup &Layer::parent_group() const
{
return *this->as_node().parent_group();
}
inline LayerGroup &Layer::parent_group()
{
return *this->as_node().parent_group();
}
} // namespace greasepencil
class GreasePencilRuntime {
public:
void *batch_cache = nullptr;
int eval_frame = 0;
bool is_drawing_stroke = false;
bool temp_use_eraser = false;
float temp_eraser_size = 0.0f;
std::unique_ptr<bake::BakeMaterialsList> bake_materials;
public:
};
class GreasePencilDrawingEditHints {
public:
const greasepencil::Drawing *drawing_orig;
ImplicitSharingPtrAndData positions_data;
std::optional<Span<float3>> positions() const;
std::optional<MutableSpan<float3>> positions_for_write();
};
class GreasePencilEditHints {
public:
{
}
std::optional<Array<GreasePencilDrawingEditHints>> drawing_hints;
};
} // namespace blender::bke
inline blender::bke::greasepencil::Drawing &GreasePencilDrawing::wrap()
{
return *reinterpret_cast<blender::bke::greasepencil::Drawing *>(this);
}
inline const blender::bke::greasepencil::Drawing &GreasePencilDrawing::wrap() const
{
return *reinterpret_cast<const blender::bke::greasepencil::Drawing *>(this);
}
inline blender::bke::greasepencil::DrawingReference &GreasePencilDrawingReference::wrap()
{
return *reinterpret_cast<blender::bke::greasepencil::DrawingReference *>(this);
}
inline const blender::bke::greasepencil::DrawingReference &GreasePencilDrawingReference::wrap()
const
{
return *reinterpret_cast<const blender::bke::greasepencil::DrawingReference *>(this);
}
inline GreasePencilFrame GreasePencilFrame::end()
{
return GreasePencilFrame{-1, 0, 0};
}
inline bool GreasePencilFrame::is_end() const
{
return this->drawing_index == -1;
}
inline bool GreasePencilFrame::is_implicit_hold() const
{
return (this->flag & GP_FRAME_IMPLICIT_HOLD) != 0;
}
inline bool GreasePencilFrame::is_selected() const
{
return (this->flag & GP_FRAME_SELECTED) != 0;
}
inline blender::bke::greasepencil::TreeNode &GreasePencilLayerTreeNode::wrap()
{
return *reinterpret_cast<blender::bke::greasepencil::TreeNode *>(this);
}
inline const blender::bke::greasepencil::TreeNode &GreasePencilLayerTreeNode::wrap() const
{
return *reinterpret_cast<const blender::bke::greasepencil::TreeNode *>(this);
}
inline blender::bke::greasepencil::Layer &GreasePencilLayer::wrap()
{
return *reinterpret_cast<blender::bke::greasepencil::Layer *>(this);
}
inline const blender::bke::greasepencil::Layer &GreasePencilLayer::wrap() const
{
return *reinterpret_cast<const blender::bke::greasepencil::Layer *>(this);
}
inline blender::bke::greasepencil::LayerGroup &GreasePencilLayerTreeGroup::wrap()
{
return *reinterpret_cast<blender::bke::greasepencil::LayerGroup *>(this);
}
inline const blender::bke::greasepencil::LayerGroup &GreasePencilLayerTreeGroup::wrap() const
{
return *reinterpret_cast<const blender::bke::greasepencil::LayerGroup *>(this);
}
inline const GreasePencilDrawingBase *GreasePencil::drawing(const int64_t index) const
{
BLI_assert(index >= 0 && index < this->drawings().size());
return this->drawings()[index];
}
inline GreasePencilDrawingBase *GreasePencil::drawing(const int64_t index)
{
BLI_assert(index >= 0 && index < this->drawings().size());
return this->drawings()[index];
}
inline const blender::bke::greasepencil::Layer &GreasePencil::layer(const int64_t index) const
{
return *this->layers()[index];
}
inline blender::bke::greasepencil::Layer &GreasePencil::layer(const int64_t index)
{
return *this->layers_for_write()[index];
}
inline const blender::bke::greasepencil::LayerGroup &GreasePencil::root_group() const
{
return this->root_group_ptr->wrap();
}
inline blender::bke::greasepencil::LayerGroup &GreasePencil::root_group()
{
return this->root_group_ptr->wrap();
}
inline bool GreasePencil::has_active_layer() const
{
return (this->active_node != nullptr) && (this->active_node->wrap().is_layer());
}
inline bool GreasePencil::has_active_group() const
{
return (this->active_node != nullptr) && (this->active_node->wrap().is_group());
}
void *BKE_grease_pencil_add(Main *bmain, const char *name);
GreasePencil *grease_pencil_dst);
void BKE_grease_pencil_vgroup_name_update(Object *ob, const char *old_name, const char *new_name);
void BKE_grease_pencil_data_update(Depsgraph *depsgraph, Scene *scene, Object *object);
GreasePencil *grease_pencil_dst);
/* This is used when doing "move only origin" in object_data_transform.cc.
* radius is needs to be stored here as it is tied to object scale. */
float co[3];
float radius;
};
const blender::float4x4 &mat);
Object *ob,
const char *name,
int *r_index);
Object *ob,
const char *name,
int *r_index);
Object *ob,
Brush *brush);
Object *ob,
Brush *brush);
void BKE_grease_pencil_material_remap(GreasePencil *grease_pencil, const uint *remap, int totcol);
void BKE_grease_pencil_material_index_remove(GreasePencil *grease_pencil, int index);
const GreasePencil *grease_pencil);
bool BKE_grease_pencil_material_index_used(GreasePencil *grease_pencil, int index);
void BKE_grease_pencil_point_coords_get(const GreasePencil &grease_pencil, GreasePencilPointCoordinates *elem_data)
void * BKE_grease_pencil_add(Main *bmain, const char *name)
#define TREENODE_COMMON_METHODS_FORWARD_IMPL(class_name)
Material * BKE_grease_pencil_object_material_ensure_from_active_input_brush(Main *bmain, Object *ob, Brush *brush)
void BKE_grease_pencil_copy_parameters(const GreasePencil &src, GreasePencil &dst)
void BKE_grease_pencil_material_remap(GreasePencil *grease_pencil, const uint *remap, int totcol)
void BKE_grease_pencil_material_index_remove(GreasePencil *grease_pencil, int index)
Material * BKE_grease_pencil_object_material_ensure_active(Object *ob)
void BKE_grease_pencil_point_coords_apply_with_mat4(GreasePencil &grease_pencil, GreasePencilPointCoordinates *elem_data, const blender::float4x4 &mat)
void BKE_grease_pencil_vgroup_name_update(Object *ob, const char *old_name, const char *new_name)
void BKE_grease_pencil_point_coords_apply(GreasePencil &grease_pencil, GreasePencilPointCoordinates *elem_data)
bool BKE_grease_pencil_references_cyclic_check(const GreasePencil *id_reference, const GreasePencil *grease_pencil)
Material * BKE_grease_pencil_object_material_new(Main *bmain, Object *ob, const char *name, int *r_index)
Material * BKE_grease_pencil_object_material_ensure_from_brush(Main *bmain, Object *ob, Brush *brush)
void BKE_grease_pencil_data_update(Depsgraph *depsgraph, Scene *scene, Object *object)
void BKE_grease_pencil_nomain_to_grease_pencil(GreasePencil *grease_pencil_src, GreasePencil *grease_pencil_dst)
bool BKE_grease_pencil_drawing_attribute_required(const GreasePencilDrawing *, const char *name)
Material * BKE_grease_pencil_object_material_ensure_from_active_input_material(Object *ob)
void BKE_grease_pencil_duplicate_drawing_array(const GreasePencil *grease_pencil_src, GreasePencil *grease_pencil_dst)
Material * BKE_grease_pencil_object_material_from_brush_get(Object *ob, Brush *brush)
Material * BKE_grease_pencil_brush_material_get(Brush *brush)
int BKE_grease_pencil_stroke_point_count(const GreasePencil &grease_pencil)
GreasePencil * BKE_grease_pencil_new_nomain()
void BKE_grease_pencil_copy_layer_parameters(const blender::bke::greasepencil::Layer &src, blender::bke::greasepencil::Layer &dst)
void BKE_grease_pencil_copy_layer_group_parameters(const blender::bke::greasepencil::LayerGroup &src, blender::bke::greasepencil::LayerGroup &dst)
GreasePencil * BKE_grease_pencil_copy_for_eval(const GreasePencil *grease_pencil_src)
bool BKE_grease_pencil_material_index_used(GreasePencil *grease_pencil, int index)
int BKE_grease_pencil_object_material_index_get_by_name(Object *ob, const char *name)
Material * BKE_grease_pencil_object_material_ensure_by_name(Main *bmain, Object *ob, const char *name, int *r_index)
#define BLI_assert(a)
Definition BLI_assert.h:50
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
unsigned int uint
#define SET_FLAG_FROM_TEST(value, test, flag)
GreasePencilLayerTreeNodeType
@ GP_LAYER_TREE_GROUP
@ GP_FRAME_IMPLICIT_HOLD
@ GP_LAYER_TREE_NODE_IGNORE_LOCKED_MATERIALS
@ GP_LAYER_TREE_NODE_LOCKED
@ GP_LAYER_TREE_NODE_HIDE
@ GP_LAYER_TREE_NODE_SELECT
@ GP_LAYER_TREE_NODE_HIDE_ONION_SKINNING
@ GP_LAYER_TREE_NODE_HIDE_MASKS
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
std::optional< MutableSpan< float3 > > positions_for_write()
std::optional< Span< float3 > > positions() const
GreasePencilEditHints(const GreasePencil &grease_pencil_id_orig)
std::optional< Array< GreasePencilDrawingEditHints > > drawing_hints
std::unique_ptr< bake::BakeMaterialsList > bake_materials
SharedCache< Vector< float3 > > curve_plane_normals_cache
SharedCache< Vector< int > > triangle_offsets_cache
SharedCache< Vector< float4x2 > > curve_texture_matrices
SharedCache< Vector< uint3 > > triangles_cache
VArray< ColorGeometry4f > vertex_colors() const
Drawing & operator=(const Drawing &other)
Span< float3 > curve_plane_normals() const
MutableSpan< float > opacities_for_write()
Span< float4x2 > texture_matrices() const
MutableSpan< float > radii_for_write()
bke::CurvesGeometry & strokes_for_write()
const bke::CurvesGeometry & strokes() const
VArray< ColorGeometry4f > fill_colors() const
VArray< float > opacities() const
MutableSpan< ColorGeometry4f > fill_colors_for_write()
MutableSpan< ColorGeometry4f > vertex_colors_for_write()
void set_texture_matrices(Span< float4x2 > matrices, const IndexMask &selection)
TreeNode & add_node(TreeNode &node)
void move_node_down(TreeNode &node, int step=1)
bool unlink_node(TreeNode &link, bool keep_children=false)
Span< const Layer * > layers() const
void add_node_before(TreeNode &node, TreeNode &link)
void add_node_after(TreeNode &node, TreeNode &link)
void move_node_up(TreeNode &node, int step=1)
void print_nodes(StringRefNull header) const
LayerGroup & operator=(const LayerGroup &other)
Span< const LayerGroup * > groups() const
Span< const TreeNode * > nodes() const
const TreeNode * find_node_by_name(StringRefNull name) const
SharedCache< Vector< FramesMapKeyT > > sorted_keys_cache_
Map< FramesMapKeyT, GreasePencilFrame > frames_
SortedKeysIterator sorted_keys_iterator_at(int frame_number) const
void set_parent_bone_name(const char *new_name)
StringRefNull parent_bone_name() const
int sorted_keys_index_at(int frame_number) const
float4x4 to_world_space(const Object &object) const
StringRefNull view_layer_name() const
void set_local_transform(const float4x4 &transform)
void set_view_layer_name(const char *new_name)
bool remove_frame(FramesMapKeyT key)
const Map< FramesMapKeyT, GreasePencilFrame > & frames() const
GreasePencilFrame * add_frame(FramesMapKeyT key, int duration=0)
const GreasePencilFrame * frame_at(const int frame_number) const
bool has_drawing_at(const int frame_number) const
int drawing_index_at(const int frame_number) const
int get_frame_duration_at(const int frame_number) const
std::optional< int > start_frame_at(int frame_number) const
float4x4 to_object_space(const Object &object) const
Span< FramesMapKeyT > sorted_keys() const
const LayerGroup & parent_group() const
Map< FramesMapKeyT, GreasePencilFrame > & frames_for_write()
const TreeNode * parent_node() const
const LayerGroup & as_group() const
const LayerGroup * parent_group() const
const Depsgraph * depsgraph
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
constexpr float LEGACY_RADIUS_CONVERSION_FACTOR
void copy_drawing_array(Span< const GreasePencilDrawingBase * > src_drawings, MutableSpan< GreasePencilDrawingBase * > dst_drawings)
MatBase< float, 4, 4 > float4x4
__int64 int64_t
Definition stdint.h:89
GreasePencilDrawingRuntimeHandle * runtime
struct GreasePencilLayerTreeGroup * parent
Map< int, GreasePencilFrame > duplicated_frames_buffer
uint8_t flag
Definition wm_window.cc:138