88 if (strip->
act !=
NULL && do_id_user) {
124 for (strip = nlt->
strips.
first; strip; strip = stripn) {
125 stripn = strip->
next;
171 const bool use_same_action,
190 if (use_same_action) {
225 const bool use_same_actions,
270 for (nlt = src->
first; nlt; nlt = nlt->
next) {
304 first_local = first_local->
next) {
318 strcpy(nlt->
name,
"NlaTrack");
408 #ifdef WITH_AUDASPACE
409 if (speaker->
sound) {
464 float actlength, scale;
483 if (
IS_EQF(actlength, 0.0f)) {
491 return strip->
end - scale * (cframe - strip->
actstart);
494 return (strip->
end + (strip->
actstart * scale - cframe)) / scale;
507 return strip->
actend -
fmodf(cframe - strip->
start, actlength * scale) / scale;
564 switch (strip->
type) {
640 puts(
"BKE_nlastrips_has_space() error... start and end arguments swapped");
641 SWAP(
float, start, end);
645 for (strip = strips->
first; strip; strip = strip->
next) {
649 if (strip->
start >= end) {
656 if ((strip->
end > start) || (strip->
end > end)) {
681 for (strip = strips->
first; strip; strip = stripn) {
684 stripn = strip->
next;
691 for (sstrip = tmp.
last; sstrip; sstrip = sstrip->
prev) {
717 bool not_added =
true;
730 for (ns = strips->
first; ns; ns = ns->
next) {
764 for (strip = strips->
first; strip; strip = stripn) {
765 stripn = strip->
next;
769 if (mstrip ==
NULL) {
843 for (strip = strips->
first; strip; strip = stripn) {
844 stripn = strip->
next;
890 if (strip->
end > mstrip->
end) {
915 float oStart, oEnd, offset;
917 short scaleChanged = 0;
936 offset = mstrip->
start - oStart;
947 oLen = oEnd - oStart;
949 if (
IS_EQF(nLen, oLen) == 0) {
959 p1 = (strip->
start - oStart) / oLen;
960 p2 = (strip->
end - oStart) / oLen;
965 strip->
end = (p2 * nLen) + mstrip->
start;
969 strip->
start += offset;
970 strip->
end += offset;
1037 printf(
"%s: Active strip (%p, %s) not in NLA track found (%p, %s)\n",
1124 puts(
"BKE_nlatrack_has_space() error... start and end arguments swapped");
1125 SWAP(
float, start, end);
1260 const float stripLen = (strip) ? strip->
end - strip->
start : 0.0f;
1264 if ((strip ==
NULL) ||
IS_EQF(stripLen, 0.0f) ||
IS_EQF(boundsLen, 0.0f)) {
1272 if ((stripLen < boundsLen) &&
1276 if ((stripLen > boundsLen) &&
1292 float offset = 0.0f;
1303 else if (strip->
end < nls->
end) {
1316 for (; nls; nls = nls->
next) {
1317 nls->
start += offset;
1322 else if (strip->
end > nls->
start) {
1329 for (; nls; nls = nls->
next) {
1330 nls->
start += offset;
1340 float offset = 0.0f;
1364 for (; nls; nls = nls->
prev) {
1365 nls->
start -= offset;
1370 else if (strip->
start < nls->
end) {
1377 for (; nls; nls = nls->
prev) {
1378 nls->
start -= offset;
1391 float prev_actstart;
1411 float actlen, mapping;
1423 if (
IS_EQF(actlen, 0.0f)) {
1430 if (
IS_EQF(mapping, 0.0f) == 0) {
1431 strip->
end = (actlen * mapping) + strip->
start;
1521 if (strip ==
NULL) {
1594 static bool needs_init =
true;
1605 if (
ELEM(prop, prop_influence, prop_time)) {
1638 if (strip->
name[0] == 0) {
1639 switch (strip->
type) {
1642 (strip->
act) ? (strip->
act->
id.
name + 2) : (
"<No Action>"),
1643 sizeof(strip->
name));
1666 if (tstrip == strip) {
1685 sizeof(strip->
name));
1774 if (((ps && ns) && (*ps > *ns)) || (ps)) {
1787 if (((pe && ne) && (*pe > *ne)) || (pe)) {
1840 if (strip == fstrip) {
1854 #define STASH_TRACK_NAME DATA_("[Action Stash]")
1870 if (strip->
act == act) {
1912 if (prev_track ==
NULL) {
1979 if (strip ==
NULL) {
1993 if (is_first ==
false) {
2071 if (activeTrack ==
NULL) {
2084 if ((activeTrack) && (activeStrip ==
NULL)) {
2089 activeStrip = strip;
2095 if (
ELEM(
NULL, activeTrack, activeStrip, activeStrip->
act)) {
2097 printf(
"NLA tweakmode enter - neither active requirement found\n");
2098 printf(
"\tactiveTrack = %p, activeStrip = %p\n", (
void *)activeTrack, (
void *)activeStrip);
2108 if (strip->
act == activeStrip->
act) {
2124 for (nlt = activeTrack; nlt; nlt = nlt->
next) {
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
void calc_action_range(const struct bAction *act, float *start, float *end, short incl_modifiers)
bool action_has_motion(const struct bAction *act)
void copy_fmodifiers(ListBase *dst, const ListBase *src)
void BKE_fcurve_blend_write(struct BlendWriter *writer, struct ListBase *fcurves)
void BKE_fmodifiers_blend_read_data(struct BlendDataReader *reader, ListBase *fmodifiers, struct FCurve *curve)
void BKE_fcurve_blend_read_data(struct BlendDataReader *reader, struct ListBase *fcurves)
void BKE_fcurve_foreach_id(struct FCurve *fcu, struct LibraryForeachIDData *data)
void BKE_fmodifiers_blend_write(struct BlendWriter *writer, struct ListBase *fmodifiers)
void BKE_fcurve_blend_read_lib(struct BlendLibReader *reader, struct ID *id, struct ListBase *fcurves)
struct FCurve * BKE_fcurve_find(ListBase *list, const char rna_path[], const int array_index)
void BKE_fcurve_blend_read_expand(struct BlendExpander *expander, struct ListBase *fcurves)
void BKE_fcurves_free(ListBase *list)
void BKE_fcurves_copy(ListBase *dst, ListBase *src)
struct FCurve * BKE_fcurve_create(void)
void free_fmodifiers(ListBase *modifiers)
void BKE_fmodifiers_blend_read_expand(struct BlendExpander *expander, struct ListBase *fmodifiers)
void id_us_min(struct ID *id)
@ LIB_ID_CREATE_NO_USER_REFCOUNT
struct ID * BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, const int flag)
void id_us_plus(struct ID *id)
#define BKE_LIB_FOREACHID_PROCESS(_data, _id_super, _cb_flag)
bool BKE_sound_info_get(struct Main *main, struct bSound *sound, SoundInfo *sound_info)
GHash * BLI_ghash_str_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_haskey(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strdupn(const char *str, const size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename_cb(UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_len)
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t len)
#define IN_RANGE(a, b, c)
#define BLO_write_struct(writer, struct_name, data_ptr)
void BLO_read_list(BlendDataReader *reader, struct ListBase *list)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
#define BLO_write_struct_list(writer, struct_name, list_ptr)
#define CLOG_ERROR(clg_ref,...)
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ NLASTRIP_FLAG_USR_INFLUENCE
@ NLASTRIP_FLAG_TEMP_META
@ NLASTRIP_FLAG_AUTO_BLENDS
@ NLASTRIP_FLAG_TWEAKUSER
@ NLASTRIP_FLAG_SYNC_LENGTH
@ NLASTRIP_EXTEND_HOLD_FORWARD
@ NLASTRIP_EXTEND_NOTHING
@ NLASTRIP_TYPE_TRANSITION
@ NLATRACK_OVERRIDELIBRARY_LOCAL
Read Guarded memory(de)allocation.
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode)
float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
bool BKE_nlatrack_get_bounds(NlaTrack *nlt, float bounds[2])
static void blend_write_nla_strips(BlendWriter *writer, ListBase *strips)
void BKE_nla_action_pushdown(AnimData *adt, const bool is_liboverride)
bool BKE_nla_tweakmode_enter(AnimData *adt)
void BKE_nlameta_flush_transforms(NlaStrip *mstrip)
bool BKE_nlatrack_has_animated_strips(NlaTrack *nlt)
NlaTrack * BKE_nlatrack_find_tweaked(AnimData *adt)
static void blend_lib_read_nla_strips(BlendLibReader *reader, ID *id, ListBase *strips)
void BKE_nlastrips_clear_metastrip(ListBase *strips, NlaStrip *strip)
void BKE_nla_blend_read_lib(BlendLibReader *reader, ID *id, ListBase *tracks)
NlaStrip * BKE_nlastrip_new(bAction *act)
void BKE_nlastrip_recalculate_bounds_sync_action(NlaStrip *strip)
static float nlastrip_get_frame_actionclip(NlaStrip *strip, float cframe, short mode)
void BKE_nlastrip_free(ListBase *strips, NlaStrip *strip, bool do_id_user)
void BKE_nlastrips_sort_strips(ListBase *strips)
void BKE_nlastrips_clear_metas(ListBase *strips, bool only_sel, bool only_temp)
void BKE_nla_tracks_copy(Main *bmain, ListBase *dst, ListBase *src, const int flag)
static void nlastrip_get_endpoint_overlaps(NlaStrip *strip, NlaTrack *track, float **start, float **end)
NlaStrip * BKE_nlastack_add_strip(AnimData *adt, bAction *act, const bool is_liboverride)
void BKE_nla_validate_state(AnimData *adt)
void BKE_nlatrack_solo_toggle(AnimData *adt, NlaTrack *nlt)
static float nlastrip_get_frame_transition(NlaStrip *strip, float cframe, short mode)
void BKE_nlatrack_free(ListBase *tracks, NlaTrack *nlt, bool do_id_user)
static void blend_data_read_nla_strips(BlendDataReader *reader, ListBase *strips)
void BKE_nlastrip_recalculate_bounds(NlaStrip *strip)
bool BKE_nlastrips_has_space(ListBase *strips, float start, float end)
bool BKE_nla_action_stash(AnimData *adt, const bool is_liboverride)
bool BKE_nlastrips_add_strip(ListBase *strips, NlaStrip *strip)
bool BKE_nlastrip_has_curves_for_property(const PointerRNA *ptr, const PropertyRNA *prop)
NlaStrip * BKE_nla_add_soundstrip(Main *bmain, Scene *scene, Speaker *speaker)
void BKE_nlastrip_set_active(AnimData *adt, NlaStrip *strip)
static bool nlastrip_is_first(AnimData *adt, NlaStrip *strip)
void BKE_nla_blend_write(BlendWriter *writer, ListBase *tracks)
void BKE_nla_tracks_free(ListBase *tracks, bool do_id_user)
NlaStrip * BKE_nlastrip_copy(Main *bmain, NlaStrip *strip, const bool use_same_action, const int flag)
bool BKE_nlatrack_has_space(NlaTrack *nlt, float start, float end)
void BKE_nlatrack_sort_strips(NlaTrack *nlt)
static void BKE_nlastrip_validate_autoblends(NlaTrack *nlt, NlaStrip *nls)
void BKE_nlatrack_set_active(ListBase *tracks, NlaTrack *nlt_a)
static void nlastrip_fix_resize_overlaps(NlaStrip *strip)
bool BKE_nlatrack_is_nonlocal_in_liboverride(const ID *id, const NlaTrack *nlt)
bool BKE_nlastrip_within_bounds(NlaStrip *strip, float min, float max)
bool BKE_nlatrack_add_strip(NlaTrack *nlt, NlaStrip *strip, const bool is_liboverride)
static void blend_read_expand_nla_strips(BlendExpander *expander, ListBase *strips)
void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip)
bool BKE_nlameta_add_strip(NlaStrip *mstrip, NlaStrip *strip)
NlaTrack * BKE_nlatrack_add(AnimData *adt, NlaTrack *prev, const bool is_liboverride)
bool BKE_nlatracks_have_animated_strips(ListBase *tracks)
NlaTrack * BKE_nlatrack_find_active(ListBase *tracks)
static bool nla_editbone_name_check(void *arg, const char *name)
NlaStrip * BKE_nlastrip_find_active(NlaTrack *nlt)
NlaTrack * BKE_nlatrack_copy(Main *bmain, NlaTrack *nlt, const bool use_same_actions, const int flag)
void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
void BKE_nla_tweakmode_exit(AnimData *adt)
bool BKE_nla_action_is_stashed(AnimData *adt, bAction *act)
void BKE_nla_blend_read_expand(struct BlendExpander *expander, struct ListBase *tracks)
void BKE_nla_strip_foreach_id(NlaStrip *strip, LibraryForeachIDData *data)
void BKE_nlastrips_make_metas(ListBase *strips, bool is_temp)
void BKE_nla_blend_read_data(BlendDataReader *reader, ListBase *tracks)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
ccl_device_inline float3 ceil(const float3 &a)