|
Blender V4.3
|
#include <cfloat>#include <cmath>#include <cstddef>#include <cstdio>#include <cstdlib>#include <cstring>#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "BLI_ghash.h"#include "BLI_listbase.h"#include "BLI_string.h"#include "BLI_string_utils.hh"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "DNA_anim_types.h"#include "DNA_scene_types.h"#include "DNA_sound_types.h"#include "DNA_speaker_types.h"#include "BKE_action.hh"#include "BKE_anim_data.hh"#include "BKE_fcurve.hh"#include "BKE_global.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_main.hh"#include "BKE_nla.hh"#include "BKE_sound.h"#include "BLO_read_write.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "ANIM_nla.hh"#include "nla_private.h"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
| namespace | blender::bke::nla |
Macros | |
| #define | STASH_TRACK_NAME DATA_("[Action Stash]") |
Variables | |
| static CLG_LogRef | LOG = {"bke.nla"} |
Definition at line 2067 of file blenkernel/intern/nla.cc.
Referenced by BKE_nla_action_is_stashed(), and BKE_nla_action_stash().
Check if an action is "stashed" in the NLA already
The criteria for this are: 1) The action in question lives in a "stash" track. 2) We only check first-level strips. That is, we will not check inside meta strips.
Definition at line 2069 of file blenkernel/intern/nla.cc.
References LISTBASE_FOREACH, AnimData::nla_tracks, STASH_TRACK_NAME, and NlaStrip::strips.
Referenced by BKE_nla_action_stash().
| void BKE_nla_action_pushdown | ( | OwnedAnimData | owned_adt, |
| bool | is_liboverride ) |
For the given AnimData block, add the active action to the NLA stack (i.e. 'push-down' action). The UI should only allow this for normal editing only (i.e. not in edit-mode for some strip's action), so no checks for this are performed.
TODO: maybe we should have checks for this too.
Definition at line 2158 of file blenkernel/intern/nla.cc.
References AnimData::act_blendmode, AnimData::act_extendmode, AnimData::act_influence, AnimData::action, OwnedAnimData::adt, blender::animrig::nla::assign_action_slot_handle(), BKE_nlastack_add_strip(), BKE_nlastrip_set_active(), BKE_nlastrip_validate_fcurves(), NlaStrip::blendmode, BLI_assert_msg, CLOG_ERROR, ELEM, NlaStrip::extendmode, NlaStrip::flag, blender::animrig::Action::has_keyframes(), NlaStrip::influence, LOG, NLASTRIP_FLAG_USR_INFLUENCE, OwnedAnimData::owner_id, AnimData::slot_handle, blender::animrig::unassign_action(), and UNUSED_VARS_NDEBUG.
Referenced by action_pushdown_exec(), and nlatracks_pushdown_exec().
| bool BKE_nla_action_stash | ( | OwnedAnimData | owned_adt, |
| bool | is_liboverride ) |
"Stash" an action (i.e. store it as a track/layer in the NLA, but non-contributing) to retain it in the file for future uses.
Definition at line 2084 of file blenkernel/intern/nla.cc.
References AnimData::action, OwnedAnimData::adt, blender::animrig::nla::assign_action_slot_handle(), BKE_nla_action_is_stashed(), BKE_nlastrip_new(), BKE_nlastrip_validate_name(), BKE_nlatrack_add_strip(), BKE_nlatrack_new_after(), BKE_nlatrack_set_active(), BLI_addhead(), BLI_assert, BLI_remlink(), BLI_uniquename(), CLOG_ERROR, ELEM, NlaStrip::flag, NlaTrack::flag, ListBase::last, LOG, NlaTrack::name, AnimData::nla_tracks, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_SYNC_LENGTH, NLATRACK_MUTED, NLATRACK_PROTECTED, offsetof, OwnedAnimData::owner_id, NlaTrack::prev, AnimData::slot_handle, STASH_TRACK_NAME, and STRNCPY.
Referenced by action_new_exec(), action_stash_create_exec(), and action_stash_exec().
Add a NLA Strip referencing the given speaker's sound.
Definition at line 559 of file blenkernel/intern/nla.cc.
References BKE_sound_info_get(), ceil(), NlaStrip::end, NlaStrip::extendmode, NlaStrip::flag, float, FPS, SoundInfo::length, MEM_callocN, NLASTRIP_EXTEND_NOTHING, NLASTRIP_FLAG_SELECT, NLASTRIP_TYPE_SOUND, NlaStrip::repeat, NlaStrip::scale, Speaker::sound, NlaStrip::type, and UNUSED_VARS.
Referenced by nlaedit_add_sound_exec(), and blender::ed::object::object_speaker_add_exec().
| void BKE_nla_blend_read_data | ( | BlendDataReader * | reader, |
| ID * | id_owner, | ||
| ListBase * | tracks ) |
Definition at line 2622 of file blenkernel/intern/nla.cc.
References blend_data_read_nla_strips(), BLO_read_struct_list, ID_IS_LINKED, LISTBASE_FOREACH, and NlaStrip::strips.
Referenced by BKE_animdata_blend_read_data().
| void BKE_nla_blend_write | ( | BlendWriter * | writer, |
| ListBase * | tracks ) |
Definition at line 2610 of file blenkernel/intern/nla.cc.
References blend_write_nla_strips(), BLO_write_struct, and LISTBASE_FOREACH.
Referenced by BKE_animdata_blend_write().
Ensure the passed range has non-zero length, using the same logic as BKE_nla_clip_length_get_nonzero to determine the new non-zero length.
See the documentation for BKE_nla_clip_length_get_nonzero for the reason this function exists and the issues around its use.
Usage: both actstart and r_actend should already be set to the start/end values of a strip's clip. r_actend will be modified if necessary to ensure the range is non-zero in length.
Definition at line 462 of file blenkernel/intern/nla.cc.
Referenced by animsys_create_action_track_strip(), BKE_nlastrip_new(), BKE_nlastrip_recalculate_bounds_sync_action(), draw_nla_main_data(), and blender::bke::tests::TEST().
Compute the length of the passed strip's clip, unless the clip length is zero in which case a non-zero value is returned.
WARNING: this function is very narrow and special-cased in its application. It was introduced as part of the fix for issue #107030, as a way to collect a bunch of whack-a-mole inline applications of this logic in one place. The logic itself isn't principled in any way, and should almost certainly not be used anywhere that it isn't already, short of one of those whack-a-mole inline places being overlooked.
The underlying purpose of this function is to ensure that the computed clip length for an NLA strip is (in certain places) never zero, in order to avoid the strip's scale having to be infinity. In other words, it's a hack. But at least now it's a hack collected in one place.
Definition at line 454 of file blenkernel/intern/nla.cc.
References NlaStrip::actend, and NlaStrip::actstart.
Referenced by BKE_nlastrip_recalculate_bounds(), nlastrip_get_frame_actionclip(), and blender::bke::tests::TEST().
Print the ADT flags, NLA tracks, strips, their flags, and other info, to the console.
| adt | the ADT to show. If NULL, it will be determined from owner_id. |
| owner_id | the ID that owns this ADT. If given, its name will be printed in the console output. If NULL, that won't happen. |
Either of the parameters can be NULL, but not both.
Definition at line 2482 of file blenkernel/intern/nla.cc.
References AnimData::act_track, AnimData::actstrip, ADT_NLA_EDIT_NOMAP, ADT_NLA_EDIT_ON, ADT_NLA_EVAL_OFF, ADT_NLA_EVAL_UPPER_TRACKS, ADT_NLA_SKEYS_COLLAPSED, ADT_NLA_SOLO_TRACK, BKE_animdata_from_id(), BLI_listbase_is_empty(), AnimData::flag, NlaTrack::index, LISTBASE_FOREACH, ID::name, NlaStrip::name, NlaTrack::name, AnimData::nla_tracks, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_AUTO_BLENDS, NLASTRIP_FLAG_EDIT_TOUCHED, NLASTRIP_FLAG_INVALID_LOCATION, NLASTRIP_FLAG_MUTED, NLASTRIP_FLAG_NO_TIME_MAP, NLASTRIP_FLAG_REVERSE, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_SYNC_LENGTH, NLASTRIP_FLAG_TEMP_META, NLASTRIP_FLAG_TWEAKUSER, NLASTRIP_FLAG_USR_INFLUENCE, NLASTRIP_FLAG_USR_TIME, NLASTRIP_FLAG_USR_TIME_CYCLIC, NLATRACK_ACTIVE, NLATRACK_DISABLED, NLATRACK_MUTED, NLATRACK_OVERRIDELIBRARY_LOCAL, NLATRACK_PROTECTED, NLATRACK_SELECTED, NLATRACK_SOLO, NLATRACK_TEMPORARILY_ADDED, printf, and NlaStrip::strips.
Ensure NLA Tweak Mode related flags & pointers are consistent.
This may mean that tweak mode is exited, if not all relevant pointers can be set correctly.
Definition at line 2638 of file blenkernel/intern/nla.cc.
References AnimData::act_track, AnimData::actstrip, ADT_NLA_EDIT_ON, BKE_nla_tweakmode_exit(), BLI_assert, BLI_listbase_is_empty(), AnimData::flag, AnimData::nla_tracks, nla_tweakmode_find_active(), and UNUSED_VARS_NDEBUG.
Referenced by BKE_animdata_liboverride_post_process().
| void BKE_nla_strip_foreach_id | ( | NlaStrip * | strip, |
| LibraryForeachIDData * | data ) |
Callback used by lib_query to walk over all ID usages (mimics foreach_id callback of IDTypeInfo structure).
Definition at line 595 of file blenkernel/intern/nla.cc.
References NlaStrip::act, BKE_fcurve_foreach_id(), BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_nla_strip_foreach_id(), NlaStrip::fcurves, IDWALK_CB_USER, LISTBASE_FOREACH, and NlaStrip::strips.
Referenced by BKE_animdata_foreach_id(), and BKE_nla_strip_foreach_id().
Copy all NLA data.
| flag | Control ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.hh |
Definition at line 218 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_copy(), BLI_addtail(), BLI_listbase_clear(), ELEM, flag, and LISTBASE_FOREACH.
Referenced by BKE_animdata_merge_copy(), and BKE_nla_tracks_copy_from_adt().
| void BKE_nla_tracks_copy_from_adt | ( | Main * | bmain, |
| AnimData * | adt_dest, | ||
| const AnimData * | adt_source, | ||
| int | flag ) |
Copy NLA tracks from #adt_source to #adt_dest, and update the active track/strip pointers to point at those copies.
Definition at line 331 of file blenkernel/intern/nla.cc.
References AnimData::act_track, AnimData::actstrip, BKE_nla_tracks_copy(), flag, AnimData::nla_tracks, and update_active_track().
Referenced by BKE_animdata_copy_in_lib().
| void BKE_nla_tracks_free | ( | ListBase * | tracks, |
| bool | do_id_user ) |
Free the elements of type NLA Tracks provided in the given list, but do not free the list itself since that is not free-standing
Definition at line 119 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_remove_and_free(), BLI_listbase_clear(), ELEM, and NlaTrack::next.
Referenced by BKE_animdata_free().
Non clipped mapping for strip-time <-> global time: mode = eNlaTime_ConvertModes -> NLATIME_CONVERT_*
Public API method - perform this mapping using the given AnimData block and perform any necessary sanity checks on the value
Definition at line 735 of file blenkernel/intern/nla.cc.
References AnimData::act_track, AnimData::actstrip, ADT_NLA_EDIT_NOMAP, ADT_NLA_EDIT_ON, BKE_nlastrip_find_active(), BKE_nlatrack_find_active(), BKE_nlatrack_find_tweaked(), AnimData::flag, NlaStrip::flag, AnimData::nla_tracks, NLASTRIP_FLAG_USR_TIME, and nlastrip_get_frame().
Referenced by achannel_setting_slider_cb(), actkeys_find_key_in_list_element(), actkeys_mselect_column(), ANIM_draw_action_framerange(), applyTimeScaleValue(), applyTimeSlideValue(), bezt_nlamapping_apply(), bezt_nlamapping_restore(), bezt_to_transdata(), box_select_action(), calculate_fcurve_bounds_and_unhide(), channels_bake_exec(), columnselect_action_keys(), columnselect_graph_keys(), create_ghost_curves(), createTransActionData(), createTransGraphEditData(), delete_key_v3d_without_keying_set(), blender::animrig::delete_keyframe(), draw_fcurve_curve(), draw_fcurve_modifier_controls_envelope(), flushTransGraphData(), get_graph_keyframe_extents(), get_keyframe_extents(), get_normalized_fcurve_bounds(), graphkeys_click_insert_exec(), graphkeys_mselect_column(), initTimeSlide(), insert_graph_keys(), blender::animrig::nla_time_remap(), object_frame_has_keyframe(), pose_slide_apply(), pose_slide_init(), pose_slide_invoke_common(), rectf_curve_intersection(), region_select_action_keys(), summary_keyframes_loop(), TimeToTransData(), transform_snap_anim_flush_data_ex(), and ui_but_anim_flag().
| void BKE_nla_tweakmode_clear_flags | ( | AnimData * | adt | ) |
Clear all NLA Tweak Mode related flags on the ADT, tracks, and strips.
Definition at line 2470 of file blenkernel/intern/nla.cc.
References AnimData::flag, LISTBASE_FOREACH, AnimData::nla_tracks, and NlaStrip::strips.
Referenced by nla_tweakmode_exit_nofollowptr().
| bool BKE_nla_tweakmode_enter | ( | OwnedAnimData | owned_adt | ) |
Find the active strip + track combination, and set them up as the tweaking track, and return if successful or not.
Definition at line 2273 of file blenkernel/intern/nla.cc.
References NlaStrip::act, AnimData::act_track, AnimData::action, NlaStrip::action_slot_handle, AnimData::actstrip, OwnedAnimData::adt, ADT_NLA_EDIT_ON, ADT_NLA_EVAL_UPPER_TRACKS, blender::animrig::assign_action_and_slot(), ELEM, ListBase::first, AnimData::flag, NlaStrip::flag, NlaTrack::flag, G, G_DEBUG, bAction::id, id_us_plus(), blender::animrig::Action::is_action_layered(), LISTBASE_FOREACH, ActionSlot::name, NlaTrack::next, AnimData::nla_tracks, nla_tweakmode_find_active(), NLASTRIP_FLAG_TWEAKUSER, NLATRACK_DISABLED, OwnedAnimData::owner_id, printf, blender::animrig::Action::slot_for_handle(), AnimData::slot_handle, AnimData::slot_name, NlaStrip::strips, STRNCPY, AnimData::tmp_slot_handle, AnimData::tmp_slot_name, and AnimData::tmpact.
Referenced by action_layer_switch_strip(), nlaedit_enable_tweakmode_exec(), and blender::animrig::tests::KeyframingTest::SetUp().
| void BKE_nla_tweakmode_exit | ( | OwnedAnimData | owned_adt | ) |
Exit tweak-mode for this AnimData block.
Definition at line 2429 of file blenkernel/intern/nla.cc.
References AnimData::action, OwnedAnimData::adt, BLI_assert_msg, blender::animrig::generic_assign_action(), blender::animrig::Action::is_action_layered(), is_nla_in_tweakmode(), nla_tweakmode_exit_nofollowptr(), nla_tweakmode_exit_sync_strip_lengths(), OwnedAnimData::owner_id, blender::animrig::Action::slot_for_handle(), AnimData::slot_handle, AnimData::slot_name, blender::animrig::Slot::unassigned, UNUSED_VARS_NDEBUG, and blender::animrig::Slot::users_add().
Referenced by action_layer_next_exec(), action_layer_switch_strip(), BKE_animdata_free(), BKE_nla_liboverride_post_process(), ED_animedit_unlink_action(), nlaedit_delete_exec(), nlaedit_disable_tweakmode(), and version_nla_tweakmode_incomplete().
| void BKE_nla_tweakmode_exit_nofollowptr | ( | AnimData * | adt | ) |
Partially exit NLA tweak-mode for this AnimData block, without following any pointers to other data-blocks. This means no strip length syncing (as that needs to know info about the strip's Action), no reference counting on the Action, and no user update on the Action Slot.
This function just writes to the AnimData-owned data. It is intended to be used in blend-file reading code, which performs a reference count + rebuilds the slot user map later anyway.
Definition at line 2420 of file blenkernel/intern/nla.cc.
References is_nla_in_tweakmode(), and nla_tweakmode_exit_nofollowptr().
Referenced by BKE_animdata_blend_read_data().
| void BKE_nla_validate_state | ( | AnimData * | adt | ) |
Ensure that auto-blending and other settings are set correctly.
Definition at line 2038 of file blenkernel/intern/nla.cc.
References BKE_nlastrip_recalculate_blend(), BKE_nlastrip_validate_autoblends(), ELEM, ListBase::first, LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, AnimData::nla_tracks, nlastrip_validate_transition_start_end(), printf, and NlaStrip::strips.
Referenced by ED_nla_postop_refresh().
Add the given NLA-Strip to the given Meta-Strip, assuming that the strip isn't attached to any list of strips
Definition at line 996 of file blenkernel/intern/nla.cc.
References BKE_nlastrips_add_strip(), BKE_nlastrips_has_space(), BLI_addhead(), BLI_addtail(), ELEM, NlaStrip::end, NlaStrip::next, NlaStrip::prev, NlaStrip::start, and NlaStrip::strips.
| void BKE_nlameta_flush_transforms | ( | NlaStrip * | mstrip | ) |
Adjust the settings of NLA-Strips contained within a Meta-Strip (recursively), until the Meta-Strips children all fit within the Meta-Strip's new dimensions
Definition at line 1044 of file blenkernel/intern/nla.cc.
References BKE_nlameta_flush_transforms(), ELEM, NlaStrip::end, ListBase::first, IS_EQF, ListBase::last, LISTBASE_FOREACH, NLASTRIP_TYPE_META, ptr, RNA_float_set(), RNA_pointer_create(), NlaStrip::start, NlaStrip::strips, and NlaStrip::type.
Referenced by BKE_nlameta_flush_transforms(), nlaedit_snap_exec(), nlaedit_swap_exec(), nlastrip_shuffle_transformed(), and recalcData_nla().
| NlaStrip * BKE_nlastack_add_strip | ( | OwnedAnimData | owned_adt, |
| bAction * | act, | ||
| bool | is_liboverride ) |
Add new NLA-strip to the top of the NLA stack - i.e. into the last track if space, or a new one otherwise.
Definition at line 520 of file blenkernel/intern/nla.cc.
References OwnedAnimData::adt, BKE_nlastrip_new(), BKE_nlastrip_validate_name(), BKE_nlatrack_add_strip(), BKE_nlatrack_new_tail(), BKE_nlatrack_set_active(), ELEM, bAction::id, ListBase::last, ID::name, NlaTrack::name, AnimData::nla_tracks, OwnedAnimData::owner_id, and STRNCPY.
Referenced by animrecord_check_state(), BKE_nla_action_pushdown(), and blender::animrig::tests::KeyframingTest::SetUp().
Compute the left-hand-side 'frame limit' of that strip, in its NLA track.
This is either :
| strip | The strip to compute the left-hand-side 'frame limit' of. |
Definition at line 1367 of file blenkernel/intern/nla.cc.
References NlaStrip::end, MINAFRAMEF, NLASTRIP_MIN_LEN_THRESH, NLASTRIP_TYPE_TRANSITION, NlaStrip::prev, NlaStrip::start, and NlaStrip::type.
Compute the right-hand-side 'frame limit' of that strip, in its NLA track.
This is either :
| strip | The strip to compute the right-hand-side 'frame limit' of. |
Definition at line 1384 of file blenkernel/intern/nla.cc.
References NlaStrip::end, MAXFRAMEF, NlaStrip::next, NLASTRIP_MIN_LEN_THRESH, NLASTRIP_TYPE_TRANSITION, NlaStrip::start, and NlaStrip::type.
Copy NLA strip
| use_same_action | When true, the existing action is used (instead of being duplicated) |
| flag | Control ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.hh |
Definition at line 140 of file blenkernel/intern/nla.cc.
References NlaStrip::act, BKE_fcurves_copy(), BKE_id_copy_ex(), BKE_nlastrip_copy(), BLI_addtail(), BLI_listbase_clear(), copy_fmodifiers(), NlaStrip::fcurves, flag, bAction::id, id_us_plus(), LIB_ID_CREATE_NO_USER_REFCOUNT, LISTBASE_FOREACH, MEM_dupallocN, NlaStrip::modifiers, NlaStrip::next, NlaStrip::prev, and NlaStrip::strips.
Referenced by BKE_nlastrip_copy(), BKE_nlatrack_copy(), nlaedit_duplicate_exec(), and nlaedit_split_strip_actclip().
Return the distance from the given frame to the NLA strip, measured in frames. If the given frame intersects the NLA strip, the distance is zero.
Definition at line 1524 of file blenkernel/intern/nla.cc.
References NlaStrip::end, and NlaStrip::start.
Referenced by nlaedit_strip_at_region_position().
Find the active NLA-strip within the given track.
Definition at line 1429 of file blenkernel/intern/nla.cc.
References nlastrip_find_active(), and NlaTrack::strips.
Referenced by BKE_nla_tweakedit_remap(), nla_panel_context(), and nla_tweakmode_find_active().
Find the NLA-strip with the given name within the given track.
Definition at line 1490 of file blenkernel/intern/nla.cc.
References nlastrip_find_by_name(), and NlaTrack::strips.
| void BKE_nlastrip_free | ( | NlaStrip * | strip, |
| bool | do_id_user ) |
Frees the given NLA strip, and calls BKE_nlastrip_remove_and_free to remove and free all children strips.
Definition at line 70 of file blenkernel/intern/nla.cc.
References NlaStrip::act, BKE_fcurves_free(), BKE_nlastrip_remove_and_free(), NlaStrip::fcurves, ListBase::first, free_fmodifiers(), bAction::id, id_us_min(), MEM_freeN(), NlaStrip::modifiers, NlaStrip::next, and NlaStrip::strips.
Referenced by BKE_nlastrip_remove_and_free().
| bool BKE_nlastrip_has_curves_for_property | ( | const PointerRNA * | ptr, |
| const PropertyRNA * | prop ) |
Check if the given RNA pointer + property combo should be handled by NLA strip curves or not.
Definition at line 1808 of file blenkernel/intern/nla.cc.
References ELEM, ptr, RNA_struct_type_find_property(), and PointerRNA::type.
Referenced by BKE_fcurve_find_by_rna_context_ui(), and delete_key_button_exec().
Create a NLA Strip referencing the given Action.
Definition at line 469 of file blenkernel/intern/nla.cc.
References ACT_FRAME_RANGE, NlaStrip::actend, NlaStrip::actstart, BKE_nla_clip_length_ensure_nonzero(), NlaStrip::end, bAction::flag, NlaStrip::flag, blender::animrig::Action::get_frame_range(), blender::animrig::Action::is_cyclic(), MEM_callocN, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_SYNC_LENGTH, NLASTRIP_FLAG_USR_TIME_CYCLIC, NlaStrip::repeat, NlaStrip::scale, and NlaStrip::start.
Referenced by BKE_nla_action_stash(), BKE_nlastack_add_strip(), nlaedit_add_actionclip_exec(), blender::animrig::nla::tests::TEST_F(), and blender::animrig::nla::tests::TEST_F().
Returns the next strip in this strip's NLA track, or a null pointer.
| strip | The strip to find the next trip from. |
| check_transitions | Whether or not to skip transitions. |
Definition at line 1401 of file blenkernel/intern/nla.cc.
References next, NlaStrip::next, and NLASTRIP_TYPE_TRANSITION.
Referenced by nlastrip_fix_overlapping().
Returns the previous strip in this strip's NLA track, or a null pointer.
| strip | The strip to find the previous trip from. |
| check_transitions | Whether or not to skip transitions. |
Definition at line 1415 of file blenkernel/intern/nla.cc.
References NLASTRIP_TYPE_TRANSITION, and NlaStrip::prev.
Referenced by nlastrip_fix_overlapping().
| void BKE_nlastrip_recalculate_blend | ( | NlaStrip * | strip | ) |
Recalculate the blend-in and blend-out values after a strip transform update.
Definition at line 1682 of file blenkernel/intern/nla.cc.
References NlaStrip::blendin, NlaStrip::blendout, CLAMP, CLAMP_MIN, NlaStrip::end, and NlaStrip::start.
Referenced by BKE_nla_validate_state(), and blender::bke::tests::TEST().
| void BKE_nlastrip_recalculate_bounds | ( | NlaStrip * | strip | ) |
Recalculate the start and end frames for the current strip, after changing the extents of the action or the mapping (repeats or scale factor) info.
Definition at line 1656 of file blenkernel/intern/nla.cc.
References BKE_nla_clip_length_get_nonzero(), NlaStrip::end, IS_EQF, nlastrip_fix_resize_overlaps(), NLASTRIP_TYPE_CLIP, NlaStrip::repeat, NlaStrip::scale, NlaStrip::start, and NlaStrip::type.
Referenced by BKE_nlastrip_recalculate_bounds_sync_action().
| void BKE_nlastrip_recalculate_bounds_sync_action | ( | NlaStrip * | strip | ) |
Recalculate the start and end frames for the strip to match the bounds of its action such that the overall NLA animation result is unchanged.
Definition at line 1635 of file blenkernel/intern/nla.cc.
References NlaStrip::act, NlaStrip::actend, NlaStrip::action_slot_handle, NlaStrip::actstart, BKE_nla_clip_length_ensure_nonzero(), BKE_nlastrip_recalculate_bounds(), NLASTRIP_TYPE_CLIP, NlaStrip::scale, NlaStrip::start, and NlaStrip::type.
Referenced by animsys_create_tweak_strip(), nla_tweakmode_exit_sync_strip_lengths(), and nlaedit_sync_actlen_exec().
Definition at line 1438 of file blenkernel/intern/nla.cc.
References BLI_assert, and BLI_remlink().
Referenced by BKE_nlastrip_remove_and_free(), and BKE_nlatrack_remove_strip().
Definition at line 1444 of file blenkernel/intern/nla.cc.
References BKE_nlastrip_free(), and BKE_nlastrip_remove().
Referenced by BKE_nlastrip_free(), BKE_nlastrips_clear_metastrip(), BKE_nlatrack_free(), ED_animedit_unlink_action(), nlaedit_delete_exec(), and nlastrip_validate_transition_start_end().
Make the given NLA-Strip the active one within the given block.
Definition at line 1450 of file blenkernel/intern/nla.cc.
References LISTBASE_FOREACH, AnimData::nla_tracks, NLASTRIP_FLAG_ACTIVE, and NlaStrip::strips.
Referenced by BKE_nla_action_pushdown().
Definition at line 1958 of file blenkernel/intern/nla.cc.
References NlaStrip::blendin, NlaStrip::blendout, ELEM, NlaStrip::end, NlaStrip::flag, IS_EQF, NlaStrip::next, NlaTrack::next, NLASTRIP_FLAG_AUTO_BLENDS, nlastrip_get_endpoint_overlaps(), NlaStrip::prev, NlaTrack::prev, and NlaStrip::start.
Referenced by BKE_nla_validate_state().
| void BKE_nlastrip_validate_fcurves | ( | NlaStrip * | strip | ) |
Validate the NLA-Strips 'control' F-Curves based on the flags set.
Definition at line 1744 of file blenkernel/intern/nla.cc.
References FCurve::auto_smoothing, FCurve::bezt, BKE_fcurve_create(), BKE_fcurve_find(), BLI_addtail(), BLI_strdupn(), FCURVE_SELECTED, FCURVE_VISIBLE, NlaStrip::fcurves, FCurve::flag, NlaStrip::flag, BezTriple::h1, BezTriple::h2, NlaStrip::influence, BezTriple::ipo, MEM_callocN, NLASTRIP_FLAG_USR_INFLUENCE, NLASTRIP_FLAG_USR_TIME, FCurve::rna_path, NlaStrip::start, FCurve::totvert, and BezTriple::vec.
Referenced by animrecord_check_state(), and BKE_nla_action_pushdown().
Find (and set) a unique name for a strip from the whole AnimData block Uses a similar method to the BLI method, but is implemented differently as we need to ensure that the name is unique over several lists of tracks, not just a single track.
Definition at line 1847 of file blenkernel/intern/nla.cc.
References NlaStrip::act, BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_str_new(), BLI_uniquename_cb(), DATA_, ELEM, bAction::id, LISTBASE_FOREACH, ID::name, NlaStrip::name, nla_editbone_name_check(), AnimData::nla_tracks, NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_META, NLASTRIP_TYPE_TRANSITION, NlaStrip::strips, STRNCPY, and NlaStrip::type.
Referenced by BKE_nla_action_stash(), BKE_nlastack_add_strip(), nlaedit_add_actionclip_exec(), nlaedit_add_meta_exec(), nlaedit_add_sound_exec(), nlaedit_add_transition_exec(), nlaedit_duplicate_exec(), nlaedit_split_strip_actclip(), nlastrips_to_animdata(), and blender::ed::object::object_speaker_add_exec().
Does the given NLA-strip fall within the given bounds (times)?.
Definition at line 1495 of file blenkernel/intern/nla.cc.
References NlaStrip::end, fabsf, IN_RANGE, IS_EQF, min, and NlaStrip::start.
Referenced by box_select_nla_strips(), get_visible_nla_strips(), nlaedit_select_leftright(), and nlaedit_strip_at_region_position().
NULL checks incoming strip and verifies no overlap / invalid configuration against other strips in NLA Track before calling BKE_nlastrips_add_strip_unsafe.
Definition at line 880 of file blenkernel/intern/nla.cc.
References BKE_nlastrips_add_strip_unsafe(), BKE_nlastrips_has_space(), ELEM, NlaStrip::end, and NlaStrip::start.
Referenced by BKE_nlameta_add_strip(), BKE_nlatrack_add_strip(), blender::bke::tests::TEST(), and blender::bke::tests::TEST().
Add the given NLA-Strip to the given list of strips, assuming that it isn't currently a member of another list, NULL, or conflicting with existing strips position.
Definition at line 858 of file blenkernel/intern/nla.cc.
References BLI_addtail(), BLI_assert, BLI_insertlinkbefore(), ELEM, LISTBASE_FOREACH, and NlaStrip::start.
Referenced by BKE_nlastrips_add_strip(), nlastrip_shuffle_transformed(), and recalcData_nla().
| void BKE_nlastrips_clear_metas | ( | ListBase * | strips, |
| bool | only_sel, | ||
| bool | only_temp ) |
Remove meta-strips (i.e. flatten the list of strips) from the top-level of the list of strips.
| only_sel | only consider selected meta-strips, otherwise all meta-strips are removed |
| only_temp | only remove the 'temporary' meta-strips used for transforms |
Definition at line 971 of file blenkernel/intern/nla.cc.
References BKE_nlastrips_clear_metastrip(), ELEM, ListBase::first, NlaStrip::flag, NlaStrip::next, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TEMP_META, NLASTRIP_TYPE_META, and NlaStrip::type.
Referenced by createTransNlaData(), nlaedit_remove_meta_exec(), nlaedit_snap_exec(), nlaedit_swap_exec(), and special_aftertrans_update__nla().
Split a meta-strip into a set of normal strips.
Definition at line 949 of file blenkernel/intern/nla.cc.
References BKE_nlastrip_remove_and_free(), BLI_insertlinkbefore(), BLI_remlink(), ELEM, ListBase::first, NlaStrip::next, and NlaStrip::strips.
Referenced by BKE_nlastrips_clear_metas(), and nlaedit_split_strip_meta().
Check if there is any space in the given list to add the given strip.
Definition at line 783 of file blenkernel/intern/nla.cc.
References IS_EQF, and LISTBASE_FOREACH.
Referenced by BKE_nlameta_add_strip(), BKE_nlastrips_add_strip(), BKE_nlatrack_has_space(), and nlaedit_swap_exec().
| void BKE_nlastrips_make_metas | ( | ListBase * | strips, |
| bool | is_temp ) |
Convert 'islands' (i.e. continuous string of) selected strips to be contained within 'Meta-Strips' which act as strips which contain strips.
| is_temp | are the meta-strips to be created 'temporary' ones used for transforms? |
Definition at line 896 of file blenkernel/intern/nla.cc.
References BLI_addtail(), BLI_insertlinkbefore(), BLI_remlink(), ELEM, NlaStrip::end, ListBase::first, NlaStrip::flag, MEM_callocN, NlaStrip::next, NLASTRIP_FLAG_SELECT, NLASTRIP_FLAG_TEMP_META, NLASTRIP_TYPE_META, NlaStrip::repeat, NlaStrip::scale, NlaStrip::start, NlaStrip::strips, and NlaStrip::type.
Referenced by createTransNlaData(), nlaedit_add_meta_exec(), nlaedit_snap_exec(), and nlaedit_swap_exec().
| void BKE_nlastrips_sort_strips | ( | ListBase * | strips | ) |
Rearrange the strips in the track so that they are always in order (usually only needed after a strip has been moved)
Definition at line 815 of file blenkernel/intern/nla.cc.
References BLI_addhead(), BLI_insertlinkafter(), BLI_remlink(), ELEM, ListBase::first, ListBase::last, LISTBASE_FOREACH_BACKWARD, NlaStrip::next, and NlaStrip::start.
Referenced by BKE_nlatrack_sort_strips().
Add the given NLA-Strip to the given NLA-Track. Calls BKE_nlastrips_add_strip to check if strip can be added.
Definition at line 1284 of file blenkernel/intern/nla.cc.
References BKE_nlastrips_add_strip(), ELEM, NlaTrack::flag, NLATRACK_OVERRIDELIBRARY_LOCAL, NLATRACK_PROTECTED, and NlaTrack::strips.
Referenced by BKE_nla_action_stash(), BKE_nlastack_add_strip(), nlaedit_add_actionclip_exec(), nlaedit_add_sound_exec(), nlaedit_duplicate_exec(), nlaedit_move_down_exec(), nlaedit_move_up_exec(), nlaedit_snap_exec(), nlaedit_swap_exec(), nlastrip_shuffle_transformed(), nlastrips_to_animdata(), blender::ed::object::object_speaker_add_exec(), blender::animrig::nla::tests::TEST_F(), and blender::animrig::nla::tests::TEST_F().
Copy a single NLA Track.
| flag | Control ID pointers management, see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_lib_id.hh |
Definition at line 189 of file blenkernel/intern/nla.cc.
References BKE_nlastrip_copy(), BLI_addtail(), BLI_listbase_clear(), flag, LISTBASE_FOREACH, MEM_dupallocN, NlaTrack::next, NlaTrack::prev, and NlaTrack::strips.
Referenced by BKE_nla_tracks_copy().
Find the active NLA-track for the given stack.
Definition at line 1138 of file blenkernel/intern/nla.cc.
References ELEM, LISTBASE_FOREACH, and NLATRACK_ACTIVE.
Referenced by BKE_nla_tweakedit_remap().
Get the NLA Track that the active action/action strip comes from, since this info is not stored in AnimData. It also isn't as simple as just using the active track, since multiple tracks may have been entered at the same time.
Definition at line 1156 of file blenkernel/intern/nla.cc.
References AnimData::actstrip, BLI_findindex(), G, G_DEBUG, LISTBASE_FOREACH, NlaStrip::name, AnimData::nla_tracks, NLATRACK_ACTIVE, NLATRACK_DISABLED, and printf.
Referenced by action_layer_next_exec(), action_layer_prev_exec(), BKE_nla_tweakedit_remap(), and nlaedit_enable_tweakmode_exec().
| void BKE_nlatrack_free | ( | NlaTrack * | nlt, |
| bool | do_id_user ) |
Remove & Frees all NLA strips from the given NLA track, then frees (doesn't remove) the track itself.
Definition at line 100 of file blenkernel/intern/nla.cc.
References BKE_nlastrip_remove_and_free(), ListBase::first, MEM_freeN(), NlaStrip::next, and NlaTrack::strips.
Referenced by BKE_nlatrack_remove_and_free().
Get the extents of the given NLA-Track including gaps between strips, returning whether this succeeded or not
Definition at line 1310 of file blenkernel/intern/nla.cc.
References ELEM, NlaStrip::end, ListBase::first, ListBase::last, NlaStrip::start, and NlaTrack::strips.
| bool BKE_nlatrack_has_animated_strips | ( | NlaTrack * | nlt | ) |
Check if the given NLA-Track has any strips with their own F-Curves.
Definition at line 1708 of file blenkernel/intern/nla.cc.
References ELEM, ListBase::first, LISTBASE_FOREACH, and NlaTrack::strips.
Referenced by BKE_nlatracks_have_animated_strips().
Check if there is any space in the given track to add a strip of the given length.
Definition at line 1235 of file blenkernel/intern/nla.cc.
References BKE_nlastrips_has_space(), NlaTrack::flag, IS_EQF, NLATRACK_PROTECTED, and NlaTrack::strips.
Referenced by nlaedit_move_down_exec(), and nlaedit_move_up_exec().
| bool BKE_nlatrack_has_strips | ( | ListBase * | tracks | ) |
Check to see if there are any NLA strips in the NLA tracks.
Definition at line 1255 of file blenkernel/intern/nla.cc.
References BLI_listbase_count(), BLI_listbase_is_empty(), and LISTBASE_FOREACH.
Referenced by version_nla_action_strip_hold().
| void BKE_nlatrack_insert_after | ( | ListBase * | nla_tracks, |
| NlaTrack * | prev, | ||
| NlaTrack * | new_track, | ||
| bool | is_liboverride ) |
Inserts a given NLA track after a specified NLA track within the passed NLA track list.
If nullptr, then caller intends to insert a new head. But, tracks are not allowed to be placed before library overrides. So it must inserted after the last override.
Definition at line 385 of file blenkernel/intern/nla.cc.
References BLI_assert, BLI_findindex(), BLI_insertlinkafter(), BLI_uniquename(), DATA_, ListBase::first, NlaTrack::flag, NlaTrack::index, NlaTrack::name, NlaTrack::next, NLATRACK_OVERRIDELIBRARY_LOCAL, offsetof, and NlaTrack::prev.
Referenced by BKE_nlatrack_insert_before(), BKE_nlatrack_new_after(), and recalcData_nla().
| void BKE_nlatrack_insert_before | ( | ListBase * | nla_tracks, |
| NlaTrack * | next, | ||
| NlaTrack * | new_track, | ||
| bool | is_liboverride ) |
Inserts a given NLA track before a specified NLA track within the passed NLA track list.
Definition at line 356 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_insert_after(), BLI_findindex(), BLI_insertlinkbefore(), BLI_uniquename(), DATA_, NlaTrack::index, NlaTrack::name, next, NLATRACK_OVERRIDELIBRARY_LOCAL, offsetof, and STRNCPY.
Referenced by BKE_nlatrack_new_before(), and recalcData_nla().
Check whether given NLA track is not local (i.e. from linked data) when the object is a library override.
| nlt | May be NULL, in which case we consider it as a non-local track case. |
Definition at line 1339 of file blenkernel/intern/nla.cc.
References NlaTrack::flag, ID_IS_OVERRIDE_LIBRARY, and NLATRACK_OVERRIDELIBRARY_LOCAL.
Referenced by nla_fmodifier_add_exec(), nla_fmodifier_paste_exec(), nlaedit_add_meta_exec(), nlaedit_delete_exec(), nlaedit_delete_tracks_exec(), nlaedit_move_down_exec(), nlaedit_move_up_exec(), nlaedit_remove_meta_exec(), nlaedit_split_exec(), nlaedit_swap_exec(), rearrange_animchannels_filter_visible(), rearrange_nla_tracks(), recalcData_nla(), and transdata_get_track_shuffle_offset_side().
| NlaTrack * BKE_nlatrack_new | ( | void | ) |
Create new NLA Track. The returned pointer is owned by the caller.
Definition at line 345 of file blenkernel/intern/nla.cc.
References NlaTrack::flag, MEM_callocN, NLATRACK_OVERRIDELIBRARY_LOCAL, and NLATRACK_SELECTED.
Referenced by BKE_nlatrack_new_after(), BKE_nlatrack_new_before(), and recalcData_nla().
Calls BKE_nlatrack_new to create a new NLA track, inserts it after the given NLA track with BKE_nlatrack_insert_after.
Definition at line 435 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_insert_after(), and BKE_nlatrack_new().
Referenced by BKE_nla_action_stash(), BKE_nlatrack_new_tail(), nlaedit_add_tracks_existing(), nlaedit_duplicate_exec(), and nlaedit_snap_exec().
Calls BKE_nlatrack_new to create a new NLA track, inserts it before the given NLA track with BKE_nlatrack_insert_before.
Definition at line 426 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_insert_before(), BKE_nlatrack_new(), and next.
Referenced by BKE_nlatrack_new_head().
Calls BKE_nlatrack_new to create a new NLA track, inserts it as the head of the NLA track list with BKE_nlatrack_new_before.
Definition at line 444 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_new_before(), and ListBase::first.
Referenced by blender::animrig::tests::KeyframingTest::SetUp(), and blender::bke::tests::TEST().
Calls BKE_nlatrack_new to create a new NLA track, inserts it as the tail of the NLA track list with BKE_nlatrack_new_after.
Definition at line 449 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_new_after(), and ListBase::last.
Referenced by BKE_nlastack_add_strip(), nlaedit_add_actionclip_exec(), nlaedit_add_sound_exec(), nlaedit_add_tracks_empty(), nlaedit_add_tracks_existing(), nlastrips_to_animdata(), blender::ed::object::object_speaker_add_exec(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::animrig::nla::tests::TEST_F(), and blender::animrig::nla::tests::TEST_F().
Removes the given NLA track from the list of tracks provided.
Definition at line 610 of file blenkernel/intern/nla.cc.
References BLI_assert, and BLI_remlink().
Referenced by BKE_nlatrack_remove_and_free().
Remove the given NLA track from the list of NLA tracks, free the track's data, and the track itself.
Definition at line 616 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_free(), and BKE_nlatrack_remove().
Referenced by BKE_nla_tracks_free(), ED_animedit_unlink_action(), nlaedit_delete_tracks_exec(), nlatrack_truncate_temporary_tracks(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), and blender::bke::tests::TEST().
Remove the NLA-Strip from the given NLA-Track.
Definition at line 1304 of file blenkernel/intern/nla.cc.
References BKE_nlastrip_remove(), BLI_assert, and NlaTrack::strips.
Referenced by nlaedit_move_down_exec(), nlaedit_move_up_exec(), nlastrip_shuffle_transformed(), recalcData_nla(), and blender::bke::tests::TEST().
Make the given NLA-track the active one for the given stack. If no track is provided, this function can be used to simply deactivate all the NLA tracks in the given stack too.
Definition at line 1217 of file blenkernel/intern/nla.cc.
References ELEM, NlaTrack::flag, LISTBASE_FOREACH, and NLATRACK_ACTIVE.
Referenced by BKE_nla_action_stash(), BKE_nlastack_add_strip(), nlaedit_add_actionclip_exec(), nlaedit_add_sound_exec(), nlaedit_add_tracks_empty(), nlaedit_add_tracks_existing(), nlaedit_duplicate_exec(), nlaedit_snap_exec(), nlastrips_to_animdata(), blender::ed::object::object_speaker_add_exec(), and recalcData_nla().
Toggle the 'solo' setting for the given NLA-track, making sure that it is the only one that has this status in its AnimData block.
Definition at line 1185 of file blenkernel/intern/nla.cc.
References ADT_NLA_SOLO_TRACK, ELEM, ListBase::first, AnimData::flag, NlaTrack::flag, LISTBASE_FOREACH, AnimData::nla_tracks, and NLATRACK_SOLO.
Referenced by achannel_nlatrack_solo_widget_cb(), nlaedit_disable_tweakmode(), and nlaedit_enable_tweakmode_exec().
| void BKE_nlatrack_sort_strips | ( | NlaTrack * | nlt | ) |
Rearrange the strips in the track so that they are always in order (usually only needed after a strip has been moved).
Definition at line 1273 of file blenkernel/intern/nla.cc.
References BKE_nlastrips_sort_strips(), ELEM, ListBase::first, and NlaTrack::strips.
Referenced by special_aftertrans_update__nla().
| bool BKE_nlatracks_have_animated_strips | ( | ListBase * | tracks | ) |
Check if given NLA-Tracks have any strips with their own F-Curves.
Definition at line 1726 of file blenkernel/intern/nla.cc.
References BKE_nlatrack_has_animated_strips(), ELEM, and LISTBASE_FOREACH.
|
static |
Definition at line 2593 of file blenkernel/intern/nla.cc.
References BKE_fcurve_blend_read_data_listbase(), BKE_fmodifiers_blend_read_data(), blend_data_read_nla_strips(), BLO_read_struct_list, LISTBASE_FOREACH, and NlaStrip::strips.
Referenced by BKE_nla_blend_read_data(), and blend_data_read_nla_strips().
|
static |
Definition at line 2580 of file blenkernel/intern/nla.cc.
References BKE_fcurve_blend_write_listbase(), BKE_fmodifiers_blend_write(), blend_write_nla_strips(), BLO_write_struct_list, and LISTBASE_FOREACH.
Referenced by BKE_nla_blend_write(), and blend_write_nla_strips().
|
static |
Find active_strip in strips_source, then return the strip with the same index from strips_dest.
Definition at line 243 of file blenkernel/intern/nla.cc.
References BLI_assert_msg, BLI_listbase_count(), find_active_strip_from_listbase(), ListBase::first, LISTBASE_FOREACH, NlaStrip::next, NLASTRIP_TYPE_META, NlaStrip::strips, and NlaStrip::type.
Referenced by find_active_strip_from_listbase(), and update_active_strip().
|
static |
Definition at line 2371 of file blenkernel/intern/nla.cc.
References ADT_NLA_EDIT_ON, and AnimData::flag.
Referenced by BKE_nla_tweakmode_exit(), and BKE_nla_tweakmode_exit_nofollowptr().
|
static |
Definition at line 1842 of file blenkernel/intern/nla.cc.
References BLI_ghash_haskey().
Referenced by BKE_nlastrip_validate_name().
|
static |
Perform that part of the "exit NLA tweak mode" that does not need to follow any pointers to other data-blocks.
Definition at line 2405 of file blenkernel/intern/nla.cc.
References AnimData::act_track, AnimData::action, AnimData::actstrip, BKE_nla_tweakmode_clear_flags(), AnimData::slot_handle, AnimData::slot_name, STRNCPY, AnimData::tmp_slot_handle, AnimData::tmp_slot_name, AnimData::tmpact, and blender::animrig::Slot::unassigned.
Referenced by BKE_nla_tweakmode_exit(), and BKE_nla_tweakmode_exit_nofollowptr().
|
static |
Definition at line 2376 of file blenkernel/intern/nla.cc.
References NlaStrip::act, AnimData::actstrip, BKE_nlastrip_recalculate_bounds_sync_action(), NlaStrip::flag, LISTBASE_FOREACH, AnimData::nla_tracks, NLASTRIP_FLAG_SYNC_LENGTH, and NlaStrip::strips.
Referenced by BKE_nla_tweakmode_exit().
|
static |
Find the active track and strip.
The active strip may or may not be on the active track.
Definition at line 2217 of file blenkernel/intern/nla.cc.
References BKE_nlastrip_find_active(), LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD, NLASTRIP_FLAG_ACTIVE, NLASTRIP_FLAG_SELECT, NLATRACK_ACTIVE, NLATRACK_SELECTED, and NlaTrack::strips.
Referenced by BKE_nla_liboverride_post_process(), and BKE_nla_tweakmode_enter().
Definition at line 1347 of file blenkernel/intern/nla.cc.
References LISTBASE_FOREACH, nlastrip_find_active(), NLASTRIP_FLAG_ACTIVE, and NLASTRIP_TYPE_META.
Referenced by BKE_nlastrip_find_active(), and nlastrip_find_active().
Definition at line 1470 of file blenkernel/intern/nla.cc.
References LISTBASE_FOREACH, nlastrip_find_by_name(), NLASTRIP_TYPE_META, and STREQ.
Referenced by BKE_nlastrip_find_by_name(), and nlastrip_find_by_name().
|
static |
Definition at line 1537 of file blenkernel/intern/nla.cc.
References ceilf, NlaStrip::end, NlaStrip::next, NLASTRIP_TYPE_TRANSITION, NlaStrip::prev, NlaStrip::start, and NlaStrip::type.
Referenced by BKE_nlastrip_recalculate_bounds().
|
static |
Definition at line 1915 of file blenkernel/intern/nla.cc.
References NlaStrip::end, IS_EQF, LISTBASE_FOREACH, NlaStrip::start, and NlaTrack::strips.
Referenced by BKE_nlastrip_validate_autoblends().
Convert non clipped mapping for strip-time <-> global time: mode = eNlaTime_ConvertModes[] -> NLATIME_CONVERT_*
Only secure for 'internal' (i.e. within AnimSys evaluation) operations, but should not be directly relied on for stuff which interacts with editors.
Definition at line 721 of file blenkernel/intern/nla.cc.
References nlastrip_get_frame_actionclip(), nlastrip_get_frame_transition(), NLASTRIP_TYPE_CLIP, NLASTRIP_TYPE_META, NLASTRIP_TYPE_TRANSITION, and NlaStrip::type.
Referenced by bezt_apply_nlamapping(), BKE_nla_tweakedit_remap(), nla_actionclip_draw_markers(), nlaedit_apply_scale_exec(), nlaedit_split_strip_actclip(), and nlastrip_evaluate_controls().
Definition at line 630 of file blenkernel/intern/nla.cc.
References NlaStrip::actend, NlaStrip::actstart, BKE_nla_clip_length_get_nonzero(), NlaStrip::end, fabsf, NlaStrip::flag, floorf, fmodf, IS_EQF, NLASTRIP_FLAG_REVERSE, NLATIME_CONVERT_MAP, NLATIME_CONVERT_UNMAP, NlaStrip::repeat, NlaStrip::scale, and NlaStrip::start.
Referenced by nlastrip_get_frame().
Definition at line 698 of file blenkernel/intern/nla.cc.
References NlaStrip::end, NlaStrip::flag, length(), NLASTRIP_FLAG_REVERSE, NLATIME_CONVERT_MAP, and NlaStrip::start.
Referenced by nlastrip_get_frame().
Ensure every transition's start/end properly set. Strip will be removed / freed if it doesn't fit (invalid). Return value indicates if passed strip is valid/fixed or invalid/removed.
Definition at line 2019 of file blenkernel/intern/nla.cc.
References BKE_nlastrip_remove_and_free(), NlaStrip::end, NlaStrip::next, NLASTRIP_TYPE_TRANSITION, NlaStrip::prev, NlaStrip::start, and NlaStrip::type.
Referenced by BKE_nla_validate_state().
|
static |
Definition at line 283 of file blenkernel/intern/nla.cc.
References AnimData::actstrip, BLI_assert, BLI_listbase_count(), find_active_strip_from_listbase(), and NlaTrack::strips.
Referenced by update_active_track().
Definition at line 296 of file blenkernel/intern/nla.cc.
References AnimData::act_track, AnimData::actstrip, BLI_assert, BLI_assert_msg, BLI_listbase_count(), ListBase::first, LISTBASE_FOREACH, NlaTrack::next, AnimData::nla_tracks, and update_active_strip().
Referenced by BKE_nla_tracks_copy_from_adt().
|
static |
Definition at line 2676 of file blenkernel/intern/nla.cc.
References callback, LISTBASE_FOREACH, NlaStrip::strips, and visit_strip().
Referenced by blender::animrig::Layer::find_strip_index(), blender::bke::nla::foreach_strip_adt(), and visit_strip().
|
static |
Definition at line 52 of file blenkernel/intern/nla.cc.
Referenced by BKE_nla_action_pushdown(), and BKE_nla_action_stash().