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