|
Blender V4.3
|
#include <ANIM_action.hh>
Inherits ActionLayer.
Public Types | |
| enum class | Flags : uint8_t { Enabled = (1 << 0) } |
| enum class | MixMode : int8_t { Replace = 0 , Offset = 1 , Add = 2 , Subtract = 3 , Multiply = 4 } |
Public Member Functions | |
| Layer ()=default | |
| Layer (const Layer &other)=delete | |
| ~Layer () | |
| Layer * | duplicate_with_shallow_strip_copies (StringRefNull allocation_name) const |
| Flags | flags () const |
| MixMode | mix_mode () const |
| blender::Span< const Strip * > | strips () const |
| blender::Span< Strip * > | strips () |
| const Strip * | strip (int64_t index) const |
| Strip * | strip (int64_t index) |
| Strip & | strip_add (Action &owning_action, Strip::Type strip_type) |
| bool | strip_remove (Action &owning_action, Strip &strip) |
| void | slot_data_remove (Action &owning_action, slot_handle_t slot_handle) |
Protected Member Functions | |
| int64_t | find_strip_index (const Strip &strip) const |
Additional Inherited Members | |
Public Attributes inherited from ActionLayer | |
| char | name [64] |
| float | influence |
| uint8_t | layer_flags |
| int8_t | layer_mix_mode |
| uint8_t | _pad0 [2] |
| struct ActionStrip ** | strip_array |
| int | strip_array_num |
| uint8_t | _pad1 [4] |
Layers can be stacked on top of each other to define the animation. Each layer has a mix mode and an influence (0-1), which define how it is mixed with the layers below it.
Layers contain one or more Strips, which in turn contain the animation data itself.
Temporary limitation: at most one strip may exist on a layer, and it extends from negative to positive infinity.
Definition at line 506 of file ANIM_action.hh.
|
strong |
| Enumerator | |
|---|---|
| Enabled | |
Definition at line 527 of file ANIM_action.hh.
|
strong |
Definition at line 538 of file ANIM_action.hh.
|
default |
|
delete |
| blender::animrig::Layer::~Layer | ( | ) |
Definition at line 892 of file animrig/intern/action.cc.
References MEM_SAFE_FREE, strip(), ActionLayer::strip_array, ActionLayer::strip_array_num, and strips().
| Layer * blender::animrig::Layer::duplicate_with_shallow_strip_copies | ( | StringRefNull | allocation_name | ) | const |
Duplicate the Layer and its Strips, but only make shallow copies of the strips.
Specifically, this doesn't duplicate the strip data that's stored in e.g. Action::strip_keyframe_data_array, and it leaves the fields of the strips themselves exactly as-is.
WARNING: this method is primarily used in the code that makes full duplicates of actions, where the arrays of strip data are copied separately for efficiency. This method's applications are narrow and you probably shouldn't use it unless you really know what you're doing.
Definition at line 876 of file animrig/intern/action.cc.
References blender::StringRefNull::c_str(), copy(), ActionLayer::strip_array, ActionLayer::strip_array_num, and strips().
Referenced by blender::bke::action_copy_data().
Return the strip's index, or -1 if not found in this layer.
Definition at line 962 of file animrig/intern/action.cc.
References strip(), strips(), and visit_strip().
Referenced by strip_remove().
|
inline |
Definition at line 533 of file ANIM_action.hh.
|
inline |
Definition at line 551 of file ANIM_action.hh.
Referenced by blender::animrig::blend_layer_results().
| void blender::animrig::Layer::slot_data_remove | ( | Action & | owning_action, |
| slot_handle_t | slot_handle ) |
Remove all data belonging to the given slot.
This is typically only called from Action::slot_remove().
Definition at line 973 of file animrig/intern/action.cc.
References blender::animrig::Strip::slot_data_remove(), strip(), and strips().
Definition at line 915 of file animrig/intern/action.cc.
References ActionLayer::strip_array.
Definition at line 911 of file animrig/intern/action.cc.
References ActionLayer::strip_array.
Referenced by blender::animrig::tests::add_fcurve_to_action(), blender::animrig::legacy::channelbag_ensure(), find_strip_index(), slot_data_remove(), strip_add(), strip_remove(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and ~Layer().
Add a new Strip of the given type.
Definition at line 920 of file animrig/intern/action.cc.
References blender::animrig::grow_array_and_append(), strip(), ActionLayer::strip_array, and ActionLayer::strip_array_num.
Referenced by blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
Remove the strip from this layer.
After this call, the passed reference is no longer valid, as the memory will have been freed.
Definition at line 936 of file animrig/intern/action.cc.
References ActionStrip::data_index, find_strip_index(), blender::dna::array::remove_index(), strip(), ActionLayer::strip_array, ActionLayer::strip_array_num, blender::animrig::Action::strip_keyframe_data_remove_if_unused(), blender::animrig::strip_ptr_destructor(), and blender::animrig::Strip::type().
| blender::Span< Strip * > blender::animrig::Layer::strips | ( | ) |
Definition at line 906 of file animrig/intern/action.cc.
References ActionLayer::strip_array, and ActionLayer::strip_array_num.
| blender::Span< const Strip * > blender::animrig::Layer::strips | ( | ) | const |
Definition at line 901 of file animrig/intern/action.cc.
References ActionLayer::strip_array, and ActionLayer::strip_array_num.
Referenced by duplicate_with_shallow_strip_copies(), find_strip_index(), blender::animrig::Action::layer_keystrip_ensure(), slot_data_remove(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), and ~Layer().