|
Blender V5.3
|
#include <BKE_grease_pencil.hh>
Inherits blender::GreasePencilLayer.
Public Types | |
| using | SortedKeysIterator = const int * |
Public Attributes | |
| TREENODE_COMMON_METHODS | |
| Public Attributes inherited from blender::GreasePencilLayer | |
| GreasePencilLayerTreeNode | base |
| GreasePencilLayerFramesMapStorage | frames_storage |
| GreasePencilLayerBlendMode | blend_mode = GP_LAYER_BLEND_NONE |
| char | _pad [3] = {} |
| float | opacity = 0 |
| ListBaseT< GreasePencilLayerMask > | masks = {nullptr, nullptr} |
| int | active_mask_index = 0 |
| char | _pad2 [4] = {} |
| struct Object * | parent = nullptr |
| char * | parsubstr = nullptr |
| float | parentinv [4][4] = {} |
| float | translation [3] = {} |
| float | rotation [3] = {} |
| float | scale [3] = {1.0f, 1.0f, 1.0f} |
| char | _pad3 [4] = {} |
| char * | viewlayername = nullptr |
| bke::greasepencil::LayerRuntime * | runtime = nullptr |
A layer maps drawings to scene frames. It can be thought of as one independent channel in the timeline.
Definition at line 521 of file BKE_grease_pencil.hh.
| using blender::bke::greasepencil::Layer::SortedKeysIterator = const int * |
Definition at line 523 of file BKE_grease_pencil.hh.
Definition at line 1613 of file grease_pencil.cc.
|
explicit |
Definition at line 1641 of file grease_pencil.cc.
| blender::bke::greasepencil::Layer::Layer | ( | const Layer & | other | ) |
Definition at line 1646 of file grease_pencil.cc.
Definition at line 1682 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 1741 of file grease_pencil.cc.
|
inline |
Definition at line 959 of file BKE_grease_pencil.hh.
|
inline |
Definition at line 955 of file BKE_grease_pencil.hh.
| int blender::bke::greasepencil::Layer::drawing_index_at | ( | const int | frame_number | ) | const |
Definition at line 1916 of file grease_pencil.cc.
| GreasePencilFrame * blender::bke::greasepencil::Layer::frame_at | ( | const int | frame_number | ) |
Definition at line 1896 of file grease_pencil.cc.
| const GreasePencilFrame * blender::bke::greasepencil::Layer::frame_at | ( | const int | frame_number | ) | const |
Definition at line 1876 of file grease_pencil.cc.
| const Map< int, GreasePencilFrame > & blender::bke::greasepencil::Layer::frames | ( | ) | const |
Definition at line 1701 of file grease_pencil.cc.
Definition at line 1706 of file grease_pencil.cc.
| int blender::bke::greasepencil::Layer::get_frame_duration_at | ( | const int | frame_number | ) | const |
Definition at line 1927 of file grease_pencil.cc.
| bool blender::bke::greasepencil::Layer::has_drawing_at | ( | const int | frame_number | ) | const |
Definition at line 1922 of file grease_pencil.cc.
|
inline |
Definition at line 965 of file BKE_grease_pencil.hh.
The local transform of the layer (in layer space, not object space).
Definition at line 2057 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 2023 of file grease_pencil.cc.
Definition at line 973 of file BKE_grease_pencil.hh.
|
inline |
Definition at line 969 of file BKE_grease_pencil.hh.
Definition at line 2052 of file grease_pencil.cc.
Prepare the DNA GreasePencilLayer data before blend-file writing.
Definition at line 1963 of file grease_pencil.cc.
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 1772 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 2063 of file grease_pencil.cc.
| void blender::bke::greasepencil::Layer::set_parent_bone_name | ( | StringRef | new_name | ) |
Definition at line 2028 of file grease_pencil.cc.
| void blender::bke::greasepencil::Layer::set_view_layer_name | ( | StringRef | new_name | ) |
Definition at line 2076 of file grease_pencil.cc.
Returns the sorted keys (start frame numbers) of the frames of this layer.
Definition at line 1812 of file grease_pencil.cc.
| int blender::bke::greasepencil::Layer::sorted_keys_index_at | ( | int | frame_number | ) | const |
Definition at line 1867 of file grease_pencil.cc.
| Layer::SortedKeysIterator blender::bke::greasepencil::Layer::sorted_keys_iterator_at | ( | int | frame_number | ) | const |
Definition at line 1825 of file grease_pencil.cc.
| std::optional< int > blender::bke::greasepencil::Layer::start_frame_at | ( | int | frame_number | ) | const |
Definition at line 1857 of file grease_pencil.cc.
Definition at line 1952 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 1957 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 2013 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 2004 of file grease_pencil.cc.
Update from DNA GreasePencilLayer data after blend-file reading.
Definition at line 1987 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 2071 of file grease_pencil.cc.
Definition at line 531 of file BKE_grease_pencil.hh.