Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | NlaEvalStrip |
struct | NlaEvalChannelKey |
struct | NlaValidMask |
struct | NlaEvalChannelSnapshot |
struct | NlaEvalChannel |
struct | NlaEvalSnapshot |
struct | NlaEvalData |
struct | NlaKeyframingContext |
Typedefs | |
typedef struct NlaEvalStrip | NlaEvalStrip |
typedef struct NlaEvalChannelKey | NlaEvalChannelKey |
typedef struct NlaValidMask | NlaValidMask |
typedef struct NlaEvalChannelSnapshot | NlaEvalChannelSnapshot |
typedef struct NlaEvalChannel | NlaEvalChannel |
typedef struct NlaEvalSnapshot | NlaEvalSnapshot |
typedef struct NlaEvalData | NlaEvalData |
typedef struct NlaKeyframingContext | NlaKeyframingContext |
Enumerations | |
enum | eNlaEvalStrip_StripMode { NES_TIME_BEFORE = -1 , NES_TIME_WITHIN , NES_TIME_AFTER , NES_TIME_TRANSITION_START , NES_TIME_TRANSITION_END } |
enum | eNlaEvalChannel_MixMode { NEC_MIX_ADD , NEC_MIX_MULTIPLY , NEC_MIX_QUATERNION , NEC_MIX_AXIS_ANGLE } |
enum | eNlaStripEvaluate_Mode { STRIP_EVAL_BLEND , STRIP_EVAL_BLEND_GET_INVERTED_LOWER_SNAPSHOT , STRIP_EVAL_NOBLEND } |
typedef struct NlaEvalChannel NlaEvalChannel |
typedef struct NlaEvalChannelKey NlaEvalChannelKey |
typedef struct NlaEvalChannelSnapshot NlaEvalChannelSnapshot |
typedef struct NlaEvalData NlaEvalData |
typedef struct NlaEvalSnapshot NlaEvalSnapshot |
typedef struct NlaEvalStrip NlaEvalStrip |
typedef struct NlaKeyframingContext NlaKeyframingContext |
typedef struct NlaValidMask NlaValidMask |
Enumerator | |
---|---|
NEC_MIX_ADD | |
NEC_MIX_MULTIPLY | |
NEC_MIX_QUATERNION | |
NEC_MIX_AXIS_ANGLE |
Definition at line 81 of file nla_private.h.
Enumerator | |
---|---|
NES_TIME_BEFORE | |
NES_TIME_WITHIN | |
NES_TIME_AFTER | |
NES_TIME_TRANSITION_START | |
NES_TIME_TRANSITION_END |
Definition at line 36 of file nla_private.h.
Evaluates the given evaluation strip.
Enumerator | |
---|---|
STRIP_EVAL_BLEND | |
STRIP_EVAL_BLEND_GET_INVERTED_LOWER_SNAPSHOT | |
STRIP_EVAL_NOBLEND |
Definition at line 181 of file nla_private.h.
void nladata_flush_channels | ( | PointerRNA * | ptr, |
NlaEvalData * | channels, | ||
NlaEvalSnapshot * | snapshot, | ||
bool | flush_to_original | ||
) |
write the accumulated settings to.
The bitmask is set for all channels touched by NLA due to the domain() function. Channels touched by current set of evaluated strips will have a snapshot channel directly from the evaluation snapshot.
This function falls back to the default value if the snapshot channel doesn't exist. Thus channels, touched by NLA but not by the current set of evaluated strips, will be reset to default. If channel not touched by NLA then it's value is unchanged.
Definition at line 3045 of file anim_sys.c.
References animsys_write_orig_anim_rna(), BKE_animsys_write_to_rna_path(), BLI_BITMAP_TEST, channels(), NlaEvalChannelSnapshot::length, LISTBASE_FOREACH, nlaeval_snapshot_find_channel(), NULL, PathResolvedRNA::prop_index, PathResolvedRNA::ptr, ptr, and NlaEvalChannelSnapshot::values.
Referenced by animsys_calculate_nla().
void nlasnapshot_blend | ( | NlaEvalData * | eval_data, |
NlaEvalSnapshot * | lower_snapshot, | ||
NlaEvalSnapshot * | upper_snapshot, | ||
short | upper_blendmode, | ||
float | upper_influence, | ||
NlaEvalSnapshot * | r_blended_snapshot | ||
) |
Blends the lower_snapshot with the upper_snapshot into r_blended_snapshot according to the given upper_blendmode and upper_influence.
For upper_snapshot, blending limited to values in the blend_domain. For Replace blend-mode, this allows the upper snapshot to have a location XYZ channel where only a subset of values are blended.
Blend with lower_snapshot's base or default.
Definition at line 3610 of file anim_sys.c.
References NlaEvalSnapshot::base, NlaEvalData::channels, LISTBASE_FOREACH, nlaeval_snapshot_ensure_channel(), nlaeval_snapshot_ensure_size(), nlaeval_snapshot_find_channel(), nlaeval_snapshot_get(), nlaevalchan_blendOrcombine(), NULL, and NlaEvalData::num_channels.
Referenced by nlastrip_evaluate_actionclip(), and nlastrip_evaluate_transition().
void nlasnapshot_blend_get_inverted_lower_snapshot | ( | NlaEvalData * | eval_data, |
NlaEvalSnapshot * | blended_snapshot, | ||
NlaEvalSnapshot * | upper_snapshot, | ||
const short | upper_blendmode, | ||
const float | upper_influence, | ||
NlaEvalSnapshot * | r_lower_snapshot | ||
) |
Using blended_snapshot and upper_snapshot, we can solve for the r_lower_snapshot.
Only channels that exist within blended_snapshot are processed. Only blended values within the remap_domain are processed.
Writes to r_upper_snapshot NlaEvalChannelSnapshot->remap_domain to match remapping success.
Assumes caller marked upper values that are in the blend_domain. This determines whether the blended value came directly from the lower snapshot or a result of blending.
Definition at line 3675 of file anim_sys.c.
References NlaEvalData::channels, LISTBASE_FOREACH, nlaeval_snapshot_ensure_channel(), nlaeval_snapshot_ensure_size(), nlaeval_snapshot_get(), nlaevalchan_blendOrCombine_get_inverted_lower_evalchan(), NULL, and NlaEvalData::num_channels.
Referenced by nlastrip_evaluate_actionclip().
void nlasnapshot_blend_get_inverted_upper_snapshot | ( | NlaEvalData * | eval_data, |
NlaEvalSnapshot * | lower_snapshot, | ||
NlaEvalSnapshot * | blended_snapshot, | ||
short | upper_blendmode, | ||
float | upper_influence, | ||
NlaEvalSnapshot * | r_upper_snapshot | ||
) |
Using blended_snapshot and lower_snapshot, we can solve for the r_upper_snapshot.
Only channels that exist within blended_snapshot are inverted.
For r_upper_snapshot, disables NlaEvalChannelSnapshot->remap_domain for failed inversions. Only values within the remap_domain are processed.
We assume the caller only wants a subset of channels to be inverted, those that exist within blended_snapshot.
Definition at line 3637 of file anim_sys.c.
References NlaEvalSnapshot::base, NlaEvalData::channels, LISTBASE_FOREACH, nlaeval_snapshot_ensure_channel(), nlaeval_snapshot_ensure_size(), nlaeval_snapshot_find_channel(), nlaeval_snapshot_get(), nlaevalchan_blendOrcombine_get_inverted_upper_evalchan(), NULL, and NlaEvalData::num_channels.
Referenced by BKE_animsys_nla_remap_keyframe_values().
void nlasnapshot_blend_strip | ( | PointerRNA * | ptr, |
NlaEvalData * | channels, | ||
ListBase * | modifiers, | ||
NlaEvalStrip * | nes, | ||
NlaEvalSnapshot * | snapshot, | ||
const struct AnimationEvalContext * | anim_eval_context, | ||
const bool | flush_to_original | ||
) |
Definition at line 2998 of file anim_sys.c.
References channels(), nlastrip_evaluate(), ptr, and STRIP_EVAL_BLEND.
Referenced by animsys_evaluate_nla_for_flush(), animsys_evaluate_nla_for_keyframing(), and nlastrip_evaluate_transition().
void nlasnapshot_blend_strip_get_inverted_lower_snapshot | ( | PointerRNA * | ptr, |
NlaEvalData * | channels, | ||
ListBase * | modifiers, | ||
NlaEvalStrip * | nes, | ||
NlaEvalSnapshot * | snapshot, | ||
const struct AnimationEvalContext * | anim_eval_context | ||
) |
Definition at line 3016 of file anim_sys.c.
References channels(), nlastrip_evaluate(), ptr, and STRIP_EVAL_BLEND_GET_INVERTED_LOWER_SNAPSHOT.
Referenced by BKE_animsys_nla_remap_keyframe_values().
void nlasnapshot_blend_strip_no_blend | ( | PointerRNA * | ptr, |
NlaEvalData * | channels, | ||
ListBase * | modifiers, | ||
NlaEvalStrip * | nes, | ||
NlaEvalSnapshot * | snapshot, | ||
const struct AnimationEvalContext * | anim_eval_context | ||
) |
Definition at line 3034 of file anim_sys.c.
References channels(), nlastrip_evaluate(), ptr, and STRIP_EVAL_NOBLEND.
Referenced by nlastrip_evaluate_transition().
void nlasnapshot_enable_all_blend_domain | ( | NlaEvalSnapshot * | snapshot | ) |
Definition at line 3591 of file anim_sys.c.
References NlaEvalChannelSnapshot::blend_domain, BLI_bitmap_set_all(), NlaEvalChannelSnapshot::length, nlaeval_snapshot_get(), NULL, NlaValidMask::ptr, and NlaEvalSnapshot::size.
Referenced by nlastrip_evaluate_transition().
void nlasnapshot_ensure_channels | ( | NlaEvalData * | eval_data, |
NlaEvalSnapshot * | snapshot | ||
) |
Definition at line 3603 of file anim_sys.c.
References NlaEvalData::channels, LISTBASE_FOREACH, and nlaeval_snapshot_ensure_channel().
Referenced by nlastrip_evaluate_transition().
void nlastrip_evaluate | ( | const int | evaluation_mode, |
PointerRNA * | ptr, | ||
NlaEvalData * | channels, | ||
ListBase * | modifiers, | ||
NlaEvalStrip * | nes, | ||
NlaEvalSnapshot * | snapshot, | ||
const struct AnimationEvalContext * | anim_eval_context, | ||
bool | flush_to_original | ||
) |
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 628 of file nla.c.
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().
NlaEvalStrip* nlastrips_ctime_get_strip | ( | ListBase * | list, |
ListBase * | strips, | ||
short | index, | ||
const struct AnimationEvalContext * | anim_eval_context, | ||
bool | flush_to_original | ||
) |
Gets the strip active at the current time for a list of strips for evaluation purposes.