|
Blender V5.3
|
#include <ANIM_action.hh>
Inherits blender::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 |
| Span< const Strip * > | strips () const |
| 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) |
Protected Member Functions | |
| int64_t | find_strip_index (const Strip &strip) const |
Additional Inherited Members | |
| Public Attributes inherited from blender::ActionLayer | |
| char | name [64] = "" |
| float | influence = 1.0f |
| uint8_t | layer_flags = 0 |
| int8_t | layer_mix_mode = 0 |
| uint8_t | _pad0 [2] = {} |
| struct ActionStrip ** | strip_array = nullptr |
| int | strip_array_num = 0 |
| 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.
Note: the invariants around multiple strips (such as strip overlap, ordering within the strip array, etc.) have not yet been decided. These will be decided and documented when support for multiple strips is added.
Definition at line 620 of file ANIM_action.hh.
|
strong |
| Enumerator | |
|---|---|
| Enabled | |
Definition at line 641 of file ANIM_action.hh.
|
strong |
Definition at line 651 of file ANIM_action.hh.
|
default |
Referenced by duplicate_with_shallow_strip_copies(), and Layer().
|
delete |
References duplicate_with_shallow_strip_copies(), and Layer().
| blender::animrig::Layer::~Layer | ( | ) |
Definition at line 900 of file animrig/intern/action.cc.
References strip(), blender::ActionLayer::strip_array, blender::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 the layer's owning action, leaving 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 884 of file animrig/intern/action.cc.
References blender::StringRefNull::c_str(), Layer(), blender::MEM_new_array_zeroed(), blender::ActionLayer::strip_array_num, and strips().
Referenced by blender::bke::action_copy_data(), and Layer().
Return the index of strip in this layer's strip array, or -1 if not found in this layer.
Definition at line 969 of file animrig/intern/action.cc.
References strip(), and strips().
Referenced by strip_remove().
|
inline |
Definition at line 646 of file ANIM_action.hh.
References blender::ActionLayer::layer_flags.
|
inline |
Definition at line 664 of file ANIM_action.hh.
References blender::ActionLayer::layer_mix_mode.
Referenced by blender::animrig::blend_layer_results().
Definition at line 921 of file animrig/intern/action.cc.
References blender::ActionLayer::strip_array.
Definition at line 917 of file animrig/intern/action.cc.
References blender::ActionLayer::strip_array.
Referenced by blender::animrig::action_channelbag_ensure(), blender::animrig::action_fcurve_attach(), blender::animrig::tests::add_fcurve_to_action(), find_strip_index(), blender::io::fbx::import_animations(), blender::animrig::move_slot(), 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(), blender::animrig::tests::TEST_F(), and ~Layer().
| Strip & blender::animrig::Layer::strip_add | ( | Action & | owning_action, |
| Strip::Type | strip_type ) |
Add a new Strip of the given type.
This creates a new infinite strip and appends it to the end of the layer's strip array. It does no validation of invariants, and it is up to the caller to ensure that invariants hold.
Definition at line 926 of file animrig/intern/action.cc.
References blender::animrig::Strip::create(), blender::animrig::grow_array_and_append(), strip(), blender::ActionLayer::strip_array, and blender::ActionLayer::strip_array_num.
Referenced by blender::animrig::tests::TEST_F(), blender::animrig::tests::TEST_F(), 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 943 of file animrig/intern/action.cc.
References blender::ActionStrip::data_index, find_strip_index(), blender::animrig::Strip::Keyframe, blender::dna::array::remove_index(), strip(), blender::ActionLayer::strip_array, blender::ActionLayer::strip_array_num, blender::animrig::Action::strip_keyframe_data_remove_if_unused(), blender::animrig::strip_ptr_destructor(), and blender::animrig::Strip::type().
Definition at line 913 of file animrig/intern/action.cc.
References blender::ActionLayer::strip_array, and blender::ActionLayer::strip_array_num.
Definition at line 909 of file animrig/intern/action.cc.
References blender::ActionLayer::strip_array, and blender::ActionLayer::strip_array_num.
Referenced by duplicate_with_shallow_strip_copies(), find_strip_index(), blender::animrig::move_slot(), blender::animrig::Action::strip_keyframe_data_remove_if_unused(), 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().