|
Blender V5.0
|
#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) |
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.
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 669 of file ANIM_action.hh.
|
strong |
| Enumerator | |
|---|---|
| Enabled | |
Definition at line 690 of file ANIM_action.hh.
|
strong |
Definition at line 701 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 932 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 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 916 of file animrig/intern/action.cc.
References blender::StringRefNull::c_str(), copy(), i, Layer(), MEM_calloc_arrayN(), MEM_callocN(), 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 1002 of file animrig/intern/action.cc.
References strip(), strips(), and visit_strip().
Referenced by strip_remove().
|
inline |
Definition at line 696 of file ANIM_action.hh.
References ActionLayer::layer_flags.
|
inline |
Definition at line 714 of file ANIM_action.hh.
References ActionLayer::layer_mix_mode.
Referenced by blender::animrig::blend_layer_results().
Definition at line 955 of file animrig/intern/action.cc.
References ActionLayer::strip_array.
Definition at line 951 of file animrig/intern/action.cc.
References ActionLayer::strip_array.
Referenced by blender::animrig::tests::add_fcurve_to_action(), blender::animrig::assert_baklava_phase_1_invariants(), blender::animrig::legacy::channelbag_ensure(), blender::animrig::fcurve_find_in_action(), find_strip_index(), blender::io::fbx::import_animations(), blender::animrig::insert_key_layer(), 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(), 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.
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 960 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::legacy::channelbag_ensure(), blender::animrig::versioning::convert_legacy_animato_action(), blender::animrig::convert_to_layered_action(), blender::animrig::tests::PoseTest::SetUp(), 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 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 976 of file animrig/intern/action.cc.
References 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(), and blender::animrig::strip_ptr_destructor().
Referenced by blender::animrig::tests::TEST_F(), and blender::animrig::tests::TEST_F().
| blender::Span< Strip * > blender::animrig::Layer::strips | ( | ) |
Definition at line 946 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 941 of file animrig/intern/action.cc.
References ActionLayer::strip_array, and ActionLayer::strip_array_num.
Referenced by blender::animrig::assert_baklava_phase_1_invariants(), blender::animrig::legacy::channelbag_ensure(), duplicate_with_shallow_strip_copies(), blender::animrig::internal::evaluate_layer(), blender::animrig::fcurve_find_by_rna_path(), find_strip_index(), blender::animrig::insert_key_layer(), blender::animrig::Action::layer_keystrip_ensure(), 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().