|
Blender V4.5
|
#include <BKE_grease_pencil.hh>
Inherits GreasePencilLayer.
Public Types | |
| using | SortedKeysIterator = const int * |
Public Member Functions | |
| Layer () | |
| Layer (StringRef name) | |
| Layer (const Layer &other) | |
| ~Layer () | |
| 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 |
| SortedKeysIterator | sorted_keys_iterator_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 | tag_frames_map_changed () |
| void | tag_frames_map_keys_changed () |
| void | prepare_for_dna_write () |
| void | update_from_dna_read () |
| float4x4 | parent_inverse () const |
| float4x4 | local_transform () 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 (StringRef new_name) |
| StringRefNull | view_layer_name () const |
| void | set_view_layer_name (StringRef new_name) |
Public Attributes | |
| TREENODE_COMMON_METHODS | |
| Public Attributes inherited from GreasePencilLayer | |
| GreasePencilLayerTreeNode | base |
| GreasePencilLayerFramesMapStorage | frames_storage |
| int8_t | blend_mode |
| char | _pad [3] |
| float | opacity |
| ListBase | masks |
| int | active_mask_index |
| char | _pad2 [4] |
| struct Object * | parent |
| char * | parsubstr |
| float | parentinv [4][4] |
| float | translation [3] |
| float | rotation [3] |
| float | scale [3] |
| char | _pad3 [4] |
| char * | viewlayername |
| GreasePencilLayerRuntimeHandle * | runtime |
A layer maps drawings to scene frames. It can be thought of as one independent channel in the timeline.
Definition at line 450 of file BKE_grease_pencil.hh.
| using blender::bke::greasepencil::Layer::SortedKeysIterator = const int * |
Definition at line 452 of file BKE_grease_pencil.hh.
Definition at line 1154 of file grease_pencil.cc.
|
explicit |
Definition at line 1182 of file grease_pencil.cc.
| blender::bke::greasepencil::Layer::Layer | ( | const Layer & | other | ) |
Definition at line 1187 of file grease_pencil.cc.
Definition at line 1219 of file grease_pencil.cc.
| GreasePencilFrame * blender::bke::greasepencil::Layer::add_frame | ( | FramesMapKeyT | key, |
| int | duration = 0 ) |
Adds a new frame into the layer frames map. Fails if there already exists a frame at key that is not an end-frame. End-frame at key and subsequent end-frames are removed.
If duration is 0, the frame is marked as an implicit hold (see GP_FRAME_IMPLICIT_HOLD). Otherwise adds an additional end-frame at key + duration, if necessary, to indicate the end of the added frame.
Definition at line 1278 of file grease_pencil.cc.
|
inline |
Definition at line 887 of file BKE_grease_pencil.hh.
|
inline |
Definition at line 883 of file BKE_grease_pencil.hh.
Referenced by rearrange_grease_pencil_channels().
| int blender::bke::greasepencil::Layer::drawing_index_at | ( | const int | frame_number | ) | const |
Definition at line 1451 of file grease_pencil.cc.
| GreasePencilFrame * blender::bke::greasepencil::Layer::frame_at | ( | const int | frame_number | ) |
Definition at line 1431 of file grease_pencil.cc.
| const GreasePencilFrame * blender::bke::greasepencil::Layer::frame_at | ( | const int | frame_number | ) | const |
Definition at line 1411 of file grease_pencil.cc.
Referenced by blender::io::grease_pencil::GreasePencilExporter::is_selected_frame().
| const Map< int, GreasePencilFrame > & blender::bke::greasepencil::Layer::frames | ( | ) | const |
Definition at line 1238 of file grease_pencil.cc.
Referenced by actkeys_framejump_exec(), and insert_grease_pencil_key().
Definition at line 1243 of file grease_pencil.cc.
| int blender::bke::greasepencil::Layer::get_frame_duration_at | ( | const int | frame_number | ) | const |
Definition at line 1462 of file grease_pencil.cc.
| bool blender::bke::greasepencil::Layer::has_drawing_at | ( | const int | frame_number | ) | const |
Definition at line 1457 of file grease_pencil.cc.
|
inline |
Definition at line 893 of file BKE_grease_pencil.hh.
The local transform of the layer (in layer space, not object space).
Definition at line 1588 of file grease_pencil.cc.
Returns the name of the parent bone. Should only be used in case the parent object is an armature.
Definition at line 1554 of file grease_pencil.cc.
|
inline |
Definition at line 901 of file BKE_grease_pencil.hh.
|
inline |
Definition at line 897 of file BKE_grease_pencil.hh.
Definition at line 1583 of file grease_pencil.cc.
Prepare the DNA GreasePencilLayer data before blend-file writing.
Definition at line 1494 of file grease_pencil.cc.
| bool blender::bke::greasepencil::Layer::remove_frame | ( | FramesMapKeyT | key | ) |
Removes a frame with key from the frames map.
Fails if the map does not contain a frame with key or in the specific case where the previous frame has a fixed duration (is not marked as an implicit hold) and the frame to remove is an end frame.
Will remove end frame(s) after the frame to remove.
Definition at line 1308 of file grease_pencil.cc.
| void blender::bke::greasepencil::Layer::set_local_transform | ( | const float4x4 & | transform | ) |
Updates the local transform of the layer based on the matrix.
Definition at line 1594 of file grease_pencil.cc.
| void blender::bke::greasepencil::Layer::set_parent_bone_name | ( | StringRef | new_name | ) |
Definition at line 1559 of file grease_pencil.cc.
| void blender::bke::greasepencil::Layer::set_view_layer_name | ( | StringRef | new_name | ) |
Definition at line 1607 of file grease_pencil.cc.
| Span< FramesMapKeyT > blender::bke::greasepencil::Layer::sorted_keys | ( | ) | const |
Returns the sorted keys (start frame numbers) of the frames of this layer.
Definition at line 1347 of file grease_pencil.cc.
Referenced by get_grease_pencil_layer_bounds().
| int blender::bke::greasepencil::Layer::sorted_keys_index_at | ( | int | frame_number | ) | const |
Definition at line 1402 of file grease_pencil.cc.
| Layer::SortedKeysIterator blender::bke::greasepencil::Layer::sorted_keys_iterator_at | ( | int | frame_number | ) | const |
Definition at line 1360 of file grease_pencil.cc.
| std::optional< int > blender::bke::greasepencil::Layer::start_frame_at | ( | int | frame_number | ) | const |
Definition at line 1392 of file grease_pencil.cc.
Referenced by insert_grease_pencil_key().
Definition at line 1483 of file grease_pencil.cc.
Should be called whenever the keys in the frames map have changed. E.g. when new keys were added, removed or updated.
Definition at line 1488 of file grease_pencil.cc.
| float4x4 blender::bke::greasepencil::Layer::to_object_space | ( | const Object & | object | ) | const |
Returns the transformation from layer space to object space.
Definition at line 1544 of file grease_pencil.cc.
| float4x4 blender::bke::greasepencil::Layer::to_world_space | ( | const Object & | object | ) | const |
Returns the transformation from layer space to world space.
Definition at line 1535 of file grease_pencil.cc.
Update from DNA GreasePencilLayer data after blend-file reading.
Definition at line 1518 of file grease_pencil.cc.
Returns the view layer name that this layer should be rendered in or an empty StringRefNull if no such name is set.
Definition at line 1602 of file grease_pencil.cc.
Definition at line 460 of file BKE_grease_pencil.hh.