Blender  V2.93
Classes | Typedefs | Enumerations | Functions
nla_private.h File Reference
#include "BLI_bitmap.h"
#include "BLI_ghash.h"
#include "RNA_types.h"

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 }
 

Functions

float nlastrip_get_frame (NlaStrip *strip, float cframe, short mode)
 
NlaEvalStripnlastrips_ctime_get_strip (ListBase *list, ListBase *strips, short index, const struct AnimationEvalContext *anim_eval_context, const bool flush_to_original)
 
void nlastrip_evaluate (PointerRNA *ptr, NlaEvalData *channels, ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot, const struct AnimationEvalContext *anim_eval_context, const bool flush_to_original)
 
void nladata_flush_channels (PointerRNA *ptr, NlaEvalData *channels, NlaEvalSnapshot *snapshot, const bool flush_to_original)
 
void nlasnapshot_enable_all_blend_domain (NlaEvalSnapshot *snapshot)
 
void nlasnapshot_ensure_channels (NlaEvalData *eval_data, NlaEvalSnapshot *snapshot)
 
void nlasnapshot_blend (NlaEvalData *eval_data, NlaEvalSnapshot *lower_snapshot, NlaEvalSnapshot *upper_snapshot, const short upper_blendmode, const float upper_influence, NlaEvalSnapshot *r_blended_snapshot)
 

Typedef Documentation

◆ NlaEvalChannel

◆ NlaEvalChannelKey

◆ NlaEvalChannelSnapshot

◆ NlaEvalData

typedef struct NlaEvalData NlaEvalData

◆ NlaEvalSnapshot

◆ NlaEvalStrip

typedef struct NlaEvalStrip NlaEvalStrip

◆ NlaKeyframingContext

◆ NlaValidMask

typedef struct NlaValidMask NlaValidMask

Enumeration Type Documentation

◆ eNlaEvalChannel_MixMode

Enumerator
NEC_MIX_ADD 
NEC_MIX_MULTIPLY 
NEC_MIX_QUATERNION 
NEC_MIX_AXIS_ANGLE 

Definition at line 93 of file nla_private.h.

◆ eNlaEvalStrip_StripMode

Enumerator
NES_TIME_BEFORE 
NES_TIME_WITHIN 
NES_TIME_AFTER 
NES_TIME_TRANSITION_START 
NES_TIME_TRANSITION_END 

Definition at line 52 of file nla_private.h.

Function Documentation

◆ nladata_flush_channels()

void nladata_flush_channels ( PointerRNA ptr,
NlaEvalData channels,
NlaEvalSnapshot snapshot,
const bool  flush_to_original 
)

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 1980 of file anim_sys.c.

References animsys_write_orig_anim_rna(), BKE_animsys_write_to_rna_path(), BLI_BITMAP_TEST, NlaEvalData::channels, NlaEvalChannelSnapshot::length, LISTBASE_FOREACH, nlaeval_snapshot_find_channel(), NULL, PathResolvedRNA::prop_index, PathResolvedRNA::ptr, ptr, and NlaEvalChannelSnapshot::values.

Referenced by animsys_calculate_nla().

◆ nlasnapshot_blend()

void nlasnapshot_blend ( NlaEvalData eval_data,
NlaEvalSnapshot lower_snapshot,
NlaEvalSnapshot upper_snapshot,
const short  upper_blendmode,
const 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 blendmode, 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.

Always copy lower_snapshot to result, irrelevant of whether upper_snapshot has a corresponding channel. This only matters when lower_snapshot not the same as r_blended_snapshot.

Definition at line 2517 of file anim_sys.c.

References NlaEvalSnapshot::base, NlaEvalChannelSnapshot::blend_domain, BLI_BITMAP_TEST_BOOL, NlaEvalData::channels, IS_EQF, length(), LISTBASE_FOREACH, NEC_MIX_QUATERNION, nla_blend_value(), nla_combine_quaternion(), nla_combine_value(), nlaeval_snapshot_ensure_channel(), nlaeval_snapshot_ensure_size(), nlaeval_snapshot_find_channel(), nlaeval_snapshot_get(), NLASTRIP_MODE_COMBINE, NULL, NlaEvalData::num_channels, NlaValidMask::ptr, and NlaEvalChannelSnapshot::values.

Referenced by nlastrip_evaluate_actionclip(), and nlastrip_evaluate_transition().

◆ nlasnapshot_enable_all_blend_domain()

void nlasnapshot_enable_all_blend_domain ( NlaEvalSnapshot snapshot)

◆ nlasnapshot_ensure_channels()

void nlasnapshot_ensure_channels ( NlaEvalData eval_data,
NlaEvalSnapshot snapshot 
)

◆ nlastrip_evaluate()

void nlastrip_evaluate ( PointerRNA ptr,
NlaEvalData channels,
ListBase modifiers,
NlaEvalStrip nes,
NlaEvalSnapshot snapshot,
const struct AnimationEvalContext anim_eval_context,
const bool  flush_to_original 
)

◆ nlastrip_get_frame()

float nlastrip_get_frame ( NlaStrip strip,
float  cframe,
short  mode 
)

◆ nlastrips_ctime_get_strip()

NlaEvalStrip* nlastrips_ctime_get_strip ( ListBase list,
ListBase strips,
short  index,
const struct AnimationEvalContext anim_eval_context,
const bool  flush_to_original 
)