4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): Joshua Leung (full recode)
27 * ***** END GPL LICENSE BLOCK *****
35 * \author Joshua Leung (full recode)
45 /* ----------------------------- */
48 void free_nlastrip(ListBase *strips, struct NlaStrip *strip);
49 void free_nlatrack(ListBase *tracks, struct NlaTrack *nlt);
50 void free_nladata(ListBase *tracks);
52 struct NlaStrip *copy_nlastrip(struct NlaStrip *strip);
53 struct NlaTrack *copy_nlatrack(struct NlaTrack *nlt);
54 void copy_nladata(ListBase *dst, ListBase *src);
56 struct NlaTrack *add_nlatrack(struct AnimData *adt, struct NlaTrack *prev);
57 struct NlaStrip *add_nlastrip(struct bAction *act);
58 struct NlaStrip *add_nlastrip_to_stack(struct AnimData *adt, struct bAction *act);
59 struct NlaStrip *add_nla_soundstrip(struct Scene *scene, struct Speaker *spk);
61 /* ----------------------------- */
64 short BKE_nlastrips_has_space(ListBase *strips, float start, float end);
65 void BKE_nlastrips_sort_strips(ListBase *strips);
67 short BKE_nlastrips_add_strip(ListBase *strips, struct NlaStrip *strip);
70 void BKE_nlastrips_make_metas(ListBase *strips, short temp);
71 void BKE_nlastrips_clear_metas(ListBase *strips, short onlySel, short onlyTemp);
72 void BKE_nlastrips_clear_metastrip(ListBase *strips, struct NlaStrip *strip);
73 short BKE_nlameta_add_strip(struct NlaStrip *mstrip, struct NlaStrip *strip);
74 void BKE_nlameta_flush_transforms(struct NlaStrip *mstrip);
78 struct NlaTrack *BKE_nlatrack_find_active(ListBase *tracks);
79 void BKE_nlatrack_set_active(ListBase *tracks, struct NlaTrack *nlt);
81 void BKE_nlatrack_solo_toggle(struct AnimData *adt, struct NlaTrack *nlt);
83 short BKE_nlatrack_has_space(struct NlaTrack *nlt, float start, float end);
84 void BKE_nlatrack_sort_strips(struct NlaTrack *nlt);
86 short BKE_nlatrack_add_strip(struct NlaTrack *nlt, struct NlaStrip *strip);
88 short BKE_nlatrack_get_bounds(struct NlaTrack *nlt, float bounds[2]);
92 struct NlaStrip *BKE_nlastrip_find_active(struct NlaTrack *nlt);
93 void BKE_nlastrip_set_active(struct AnimData *adt, struct NlaStrip *strip);
95 short BKE_nlastrip_within_bounds(struct NlaStrip *strip, float min, float max);
96 void BKE_nlastrip_recalculate_bounds(struct NlaStrip *strip);
98 void BKE_nlastrip_validate_name(struct AnimData *adt, struct NlaStrip *strip);
102 short BKE_nlatrack_has_animated_strips(struct NlaTrack *nlt);
103 short BKE_nlatracks_have_animated_strips(ListBase *tracks);
104 void BKE_nlastrip_validate_fcurves(struct NlaStrip *strip);
106 void BKE_nla_validate_state(struct AnimData *adt);
110 void BKE_nla_action_pushdown(struct AnimData *adt);
112 short BKE_nla_tweakmode_enter(struct AnimData *adt);
113 void BKE_nla_tweakmode_exit(struct AnimData *adt);
115 /* ----------------------------- */
118 /* time mapping conversion modes */
120 /* convert from global time to strip time - for evaluation */
121 NLATIME_CONVERT_EVAL = 0,
122 /* convert from global time to strip time - for editing corrections */
124 NLATIME_CONVERT_UNMAP,
125 /* convert from strip time to global time */
128 } eNlaTime_ConvertModes;
130 float BKE_nla_tweakedit_remap(struct AnimData *adt, float cframe, short mode);