[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21514] branches/blender2.5/blender: 2. 5 - NLA SoC Branch Merged to 2.5!
Joshua Leung
aligorith at gmail.com
Sat Jul 11 07:41:21 CEST 2009
Revision: 21514
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21514
Author: aligorith
Date: 2009-07-11 07:41:21 +0200 (Sat, 11 Jul 2009)
Log Message:
-----------
2.5 - NLA SoC Branch Merged to 2.5!
(19863 to 21513)
Highlights of the new NLA System (and related Animation System changes):
* NLA Data is stored in AnimData alongside Action and Drivers. The NLA stack is evaluated before the Action, with the Action always overriding the results of the stack.
* NLA Data is arranged in 'Tracks', which act like PhotoShop layers. These can be muted, protected, and/or made to be played back by themselves
* Within each track, there can be multiple 'Strips'. There are 3 types of strip -> Action Clip (references some action), Transition (blends between the endpoints of two strips), and Meta (container for several strips that occur sequentially)
* FModifiers can be applied to strips, and strips can have animated influence/time controls. Playback for strips can also be backwards now!
* Playback can now go in forward and backwards directions.
* Animation Editors have been polished (unfinished features added, existing features cleaned up and made more consistent)
Notes for BuildSystem Maintainers:
* Only scons has been actively tested. Makefiles should work fine.
* MSVC ProjectFiles are broken due to the very way they work.
* CMake status unknown...
Other notes:
* Hopefully I haven't made any mistakes while doing the merge. More files than expected were showing some weird conflicts, so you may have some broken code...
* Not all old files (with NLA) data load exactly the same anymore. However, the bulk of the files out there should be ok (I hope)
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/blenkernel/BKE_action.h
branches/blender2.5/blender/source/blender/blenkernel/BKE_fcurve.h
branches/blender2.5/blender/source/blender/blenkernel/BKE_nla.h
branches/blender2.5/blender/source/blender/blenkernel/BKE_utildefines.h
branches/blender2.5/blender/source/blender/blenkernel/intern/action.c
branches/blender2.5/blender/source/blender/blenkernel/intern/anim_sys.c
branches/blender2.5/blender/source/blender/blenkernel/intern/fcurve.c
branches/blender2.5/blender/source/blender/blenkernel/intern/ipo.c
branches/blender2.5/blender/source/blender/blenkernel/intern/nla.c
branches/blender2.5/blender/source/blender/blenkernel/intern/object.c
branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
branches/blender2.5/blender/source/blender/blenloader/intern/writefile.c
branches/blender2.5/blender/source/blender/editors/animation/anim_channels.c
branches/blender2.5/blender/source/blender/editors/animation/anim_deps.c
branches/blender2.5/blender/source/blender/editors/animation/anim_draw.c
branches/blender2.5/blender/source/blender/editors/animation/anim_filter.c
branches/blender2.5/blender/source/blender/editors/animation/anim_ops.c
branches/blender2.5/blender/source/blender/editors/animation/drivers.c
branches/blender2.5/blender/source/blender/editors/animation/keyframes_draw.c
branches/blender2.5/blender/source/blender/editors/animation/keyframes_edit.c
branches/blender2.5/blender/source/blender/editors/animation/keyframes_general.c
branches/blender2.5/blender/source/blender/editors/animation/keyframing.c
branches/blender2.5/blender/source/blender/editors/animation/keyingsets.c
branches/blender2.5/blender/source/blender/editors/armature/poselib.c
branches/blender2.5/blender/source/blender/editors/include/ED_anim_api.h
branches/blender2.5/blender/source/blender/editors/include/ED_keyframes_draw.h
branches/blender2.5/blender/source/blender/editors/include/ED_keyframing.h
branches/blender2.5/blender/source/blender/editors/include/ED_screen.h
branches/blender2.5/blender/source/blender/editors/include/ED_screen_types.h
branches/blender2.5/blender/source/blender/editors/include/UI_view2d.h
branches/blender2.5/blender/source/blender/editors/interface/interface_anim.c
branches/blender2.5/blender/source/blender/editors/interface/resources.c
branches/blender2.5/blender/source/blender/editors/interface/view2d.c
branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c
branches/blender2.5/blender/source/blender/editors/screen/screen_ops.c
branches/blender2.5/blender/source/blender/editors/space_action/action_draw.c
branches/blender2.5/blender/source/blender/editors/space_action/action_edit.c
branches/blender2.5/blender/source/blender/editors/space_action/action_header.c
branches/blender2.5/blender/source/blender/editors/space_action/action_intern.h
branches/blender2.5/blender/source/blender/editors/space_action/action_ops.c
branches/blender2.5/blender/source/blender/editors/space_action/action_select.c
branches/blender2.5/blender/source/blender/editors/space_action/space_action.c
branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_header.c
branches/blender2.5/blender/source/blender/editors/space_file/filesel.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_buttons.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_edit.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_intern.h
branches/blender2.5/blender/source/blender/editors/space_graph/graph_ops.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_select.c
branches/blender2.5/blender/source/blender/editors/space_graph/space_graph.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_header.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_intern.h
branches/blender2.5/blender/source/blender/editors/space_nla/space_nla.c
branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c
branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_intern.h
branches/blender2.5/blender/source/blender/editors/space_time/time_header.c
branches/blender2.5/blender/source/blender/editors/space_view3d/drawarmature.c
branches/blender2.5/blender/source/blender/editors/space_view3d/space_view3d.c
branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_header.c
branches/blender2.5/blender/source/blender/editors/transform/transform.c
branches/blender2.5/blender/source/blender/editors/transform/transform.h
branches/blender2.5/blender/source/blender/editors/transform/transform_conversions.c
branches/blender2.5/blender/source/blender/editors/transform/transform_generics.c
branches/blender2.5/blender/source/blender/editors/transform/transform_ops.c
branches/blender2.5/blender/source/blender/makesdna/DNA_action_types.h
branches/blender2.5/blender/source/blender/makesdna/DNA_anim_types.h
branches/blender2.5/blender/source/blender/makesdna/DNA_curve_types.h
branches/blender2.5/blender/source/blender/makesdna/DNA_scene_types.h
branches/blender2.5/blender/source/blender/makesdna/DNA_space_types.h
branches/blender2.5/blender/source/blender/makesrna/RNA_access.h
branches/blender2.5/blender/source/blender/makesrna/intern/makesrna.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_animation.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_constraint.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_fcurve.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_internal.h
branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_particle.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_space.c
branches/blender2.5/blender/source/blender/windowmanager/WM_types.h
Added Paths:
-----------
branches/blender2.5/blender/release/windows/extra/python26.zip
branches/blender2.5/blender/source/blender/blenkernel/intern/fmodifier.c
branches/blender2.5/blender/source/blender/blenkernel/nla_private.h
branches/blender2.5/blender/source/blender/editors/animation/fmodifier_ui.c
branches/blender2.5/blender/source/blender/editors/include/ED_transform.h
branches/blender2.5/blender/source/blender/editors/space_graph/graph_utils.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_buttons.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_channels.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_draw.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_edit.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_ops.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_select.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_nla.c
Removed Paths:
-------------
branches/blender2.5/blender/release/windows/extra/python26.zip
branches/blender2.5/blender/source/blender/editors/include/ED_transform.h
Deleted: branches/blender2.5/blender/release/windows/extra/python26.zip
===================================================================
(Binary files differ)
Copied: branches/blender2.5/blender/release/windows/extra/python26.zip (from rev 21513, branches/soc-2009-aligorith/release/windows/extra/python26.zip)
===================================================================
(Binary files differ)
Modified: branches/blender2.5/blender/source/blender/blenkernel/BKE_action.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/BKE_action.h 2009-07-11 03:23:45 UTC (rev 21513)
+++ branches/blender2.5/blender/source/blender/blenkernel/BKE_action.h 2009-07-11 05:41:21 UTC (rev 21514)
@@ -68,6 +68,9 @@
/* Some kind of bounding box operation on the action */
void calc_action_range(const struct bAction *act, float *start, float *end, int incl_hidden);
+/* Does action have any motion data at all? */
+short action_has_motion(const struct bAction *act);
+
/* Action Groups API ----------------- */
/* Make the given Action Group the active one */
@@ -145,12 +148,6 @@
/* clear all transforms */
void rest_pose(struct bPose *pose);
-/* map global time (frame nr) to strip converted time, doesn't clip */
-float get_action_frame(struct Object *ob, float cframe);
-/* map strip time to global time (frame nr) */
-float get_action_frame_inv(struct Object *ob, float cframe);
-
-
/* functions used by the game engine */
void game_copy_pose(struct bPose **dst, struct bPose *src);
void game_free_pose(struct bPose *pose);
Modified: branches/blender2.5/blender/source/blender/blenkernel/BKE_fcurve.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/BKE_fcurve.h 2009-07-11 03:23:45 UTC (rev 21513)
+++ branches/blender2.5/blender/source/blender/blenkernel/BKE_fcurve.h 2009-07-11 05:41:21 UTC (rev 21514)
@@ -1,12 +1,33 @@
-/* Testing code for new animation system in 2.5
- * Copyright 2009, Joshua Leung
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung
+ * All rights reserved.
+ *
+ * Contributor(s): Joshua Leung (full recode)
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
#ifndef BKE_FCURVE_H
#define BKE_FCURVE_H
-//struct ListBase;
-
struct FCurve;
struct FModifier;
struct ChannelDriver;
@@ -54,8 +75,8 @@
short size; /* size in bytes of the struct */
short acttype; /* eFMI_Action_Types */
short requires; /* eFMI_Requirement_Flags */
- char name[32]; /* name of modifier in interface */
- char structName[32]; /* name of struct for SDNA */
+ char name[64]; /* name of modifier in interface */
+ char structName[64]; /* name of struct for SDNA */
/* data management function pointers - special handling */
/* free any data that is allocated separately (optional) */
@@ -104,15 +125,21 @@
/* ---------------------- */
-struct FModifier *fcurve_add_modifier(struct FCurve *fcu, int type);
-void fcurve_copy_modifiers(ListBase *dst, ListBase *src);
-void fcurve_remove_modifier(struct FCurve *fcu, struct FModifier *fcm);
-void fcurve_free_modifiers(struct FCurve *fcu);
+struct FModifier *add_fmodifier(ListBase *modifiers, int type);
+void copy_fmodifiers(ListBase *dst, ListBase *src);
+void remove_fmodifier(ListBase *modifiers, struct FModifier *fcm);
+void free_fmodifiers(ListBase *modifiers);
+
+struct FModifier *find_active_fmodifier(ListBase *modifiers);
+void set_active_fmodifier(ListBase *modifiers, struct FModifier *fcm);
+
+short list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype);
+
+float evaluate_time_fmodifiers(ListBase *modifiers, struct FCurve *fcu, float cvalue, float evaltime);
+void evaluate_value_fmodifiers(ListBase *modifiers, struct FCurve *fcu, float *cvalue, float evaltime);
+
void fcurve_bake_modifiers(struct FCurve *fcu, int start, int end);
-struct FModifier *fcurve_find_active_modifier(struct FCurve *fcu);
-void fcurve_set_active_modifier(struct FCurve *fcu, struct FModifier *fcm);
-
/* ************** F-Curves API ******************** */
/* -------- Data Managemnt -------- */
@@ -126,9 +153,6 @@
/* find matching F-Curve in the given list of F-Curves */
struct FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index);
-/* test if there is a keyframe at cfra */
-short on_keyframe_fcurve(struct FCurve *fcu, float cfra);
-
/* get the time extents for F-Curve */
void calc_fcurve_range(struct FCurve *fcu, float *min, float *max);
Modified: branches/blender2.5/blender/source/blender/blenkernel/BKE_nla.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/BKE_nla.h 2009-07-11 03:23:45 UTC (rev 21513)
+++ branches/blender2.5/blender/source/blender/blenkernel/BKE_nla.h 2009-07-11 05:41:21 UTC (rev 21514)
@@ -17,12 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung
* All rights reserved.
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): Joshua Leung (full recode)
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -30,15 +30,90 @@
#ifndef BKE_NLA_H
#define BKE_NLA_H
-struct bActionStrip;
-struct ListBase;
-struct Object;
+struct AnimData;
+struct NlaStrip;
+struct NlaTrack;
+struct bAction;
-void free_actionstrip (struct bActionStrip* strip);
-void free_nlastrips (struct ListBase *nlalist);
-void copy_nlastrips (struct ListBase *dst, struct ListBase *src);
-void copy_actionstrip (struct bActionStrip **dst, struct bActionStrip **src);
-void find_stridechannel(struct Object *ob, struct bActionStrip *strip);
-struct bActionStrip *convert_action_to_strip (struct Object *ob);
+/* ----------------------------- */
+/* Data Management */
+
+void free_nlastrip(ListBase *strips, struct NlaStrip *strip);
+void free_nlatrack(ListBase *tracks, struct NlaTrack *nlt);
+void free_nladata(ListBase *tracks);
+
+struct NlaStrip *copy_nlastrip(struct NlaStrip *strip);
+struct NlaTrack *copy_nlatrack(struct NlaTrack *nlt);
+void copy_nladata(ListBase *dst, ListBase *src);
+
+struct NlaTrack *add_nlatrack(struct AnimData *adt, struct NlaTrack *prev);
+struct NlaStrip *add_nlastrip(struct bAction *act);
+struct NlaStrip *add_nlastrip_to_stack(struct AnimData *adt, struct bAction *act);
+
+/* ----------------------------- */
+/* API */
+
+short BKE_nlastrips_has_space(ListBase *strips, float start, float end);
+void BKE_nlastrips_sort_strips(ListBase *strips);
+
+short BKE_nlastrips_add_strip(ListBase *strips, struct NlaStrip *strip);
+
+
+void BKE_nlastrips_make_metas(ListBase *strips, short temp);
+void BKE_nlastrips_clear_metas(ListBase *strips, short onlySel, short onlyTemp);
+void BKE_nlastrips_clear_metastrip(ListBase *strips, struct NlaStrip *strip);
+short BKE_nlameta_add_strip(struct NlaStrip *mstrip, struct NlaStrip *strip);
+void BKE_nlameta_flush_transforms(struct NlaStrip *mstrip);
+
+/* ............ */
+
+struct NlaTrack *BKE_nlatrack_find_active(ListBase *tracks);
+void BKE_nlatrack_set_active(ListBase *tracks, struct NlaTrack *nlt);
+
+void BKE_nlatrack_solo_toggle(struct AnimData *adt, struct NlaTrack *nlt);
+
+short BKE_nlatrack_has_space(struct NlaTrack *nlt, float start, float end);
+void BKE_nlatrack_sort_strips(struct NlaTrack *nlt);
+
+short BKE_nlatrack_add_strip(struct NlaTrack *nlt, struct NlaStrip *strip);
+
+/* ............ */
+
+struct NlaStrip *BKE_nlastrip_find_active(struct NlaTrack *nlt);
+
+short BKE_nlastrip_within_bounds(struct NlaStrip *strip, float min, float max);
+
+void BKE_nlastrip_validate_name(struct AnimData *adt, struct NlaStrip *strip);
+
+/* ............ */
+
+short BKE_nlatrack_has_animated_strips(struct NlaTrack *nlt);
+short BKE_nlatracks_have_animated_strips(ListBase *tracks);
+void BKE_nlastrip_validate_fcurves(struct NlaStrip *strip);
+
+/* ............ */
+
+void BKE_nla_action_pushdown(struct AnimData *adt);
+
+short BKE_nla_tweakmode_enter(struct AnimData *adt);
+void BKE_nla_tweakmode_exit(struct AnimData *adt);
+
+/* ----------------------------- */
+/* Time Mapping */
+
+/* time mapping conversion modes */
+enum {
+ /* convert from global time to strip time - for evaluation */
+ NLATIME_CONVERT_EVAL = 0,
+ /* convert from global time to strip time - for editing corrections */
+ // XXX old 0 invert
+ NLATIME_CONVERT_UNMAP,
+ /* convert from strip time to global time */
+ // xxx old 1 invert
+ NLATIME_CONVERT_MAP,
+} eNlaTime_ConvertModes;
+
+float BKE_nla_tweakedit_remap(struct AnimData *adt, float cframe, short mode);
+
#endif
Modified: branches/blender2.5/blender/source/blender/blenkernel/BKE_utildefines.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/BKE_utildefines.h 2009-07-11 03:23:45 UTC (rev 21513)
+++ branches/blender2.5/blender/source/blender/blenkernel/BKE_utildefines.h 2009-07-11 05:41:21 UTC (rev 21514)
@@ -128,6 +128,7 @@
#define IS_EQT(a, b, c) ((a > b)? (((a-b) <= c)? 1:0) : ((((b-a) <= c)? 1:0)))
#define IN_RANGE(a, b, c) ((b < c)? ((b<a && a<c)? 1:0) : ((c<a && a<b)? 1:0))
+#define IN_RANGE_INCL(a, b, c) ((b < c)? ((b<=a && a<=c)? 1:0) : ((c<=a && a<=b)? 1:0))
/* this weirdo pops up in two places ... */
#if !defined(WIN32)
Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/action.c
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list