Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-01-20 14:07:42 +0300
committerJoshua Leung <aligorith@gmail.com>2009-01-20 14:07:42 +0300
commit8c479bc9332bcb4a3b6b0e47346287f491532729 (patch)
tree29736f74287c57d594b1397cf33e46260ba4ea1b /source/blender/editors/animation/anim_draw.c
parent42c8b6a684b9db3b022542f6aaef49d74ddcd3e6 (diff)
Animato - Restoring most of Action Editor
* Streamlined the filtering code to remove a few redundant options, which required tweaking the code for most tools * F-Curves are simply displayed using their full paths right now. This should eventually be the UI-string stored in RNA, but right now there are still a few missing things. * There are a few tools which are not available yet which were available in 2.5 before Animato was added: - Copy/Paste - Rearrange channels Also, the DopeSheet is not totally functional (in terms of displaying animation data for sub-object data yet). That will be added tomorrow. * Added 'Action Group' pointer to F-Curves, as it will be handy for allowing Bone channels to still remain grouped as they were before with the Action Channels. However, reintroducing such a structure to the data-storage is not anticipated...
Diffstat (limited to 'source/blender/editors/animation/anim_draw.c')
-rw-r--r--source/blender/editors/animation/anim_draw.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 463141b3c97..843cadd4736 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -29,9 +29,9 @@
#include <string.h>
#include <stdio.h>
+#include "DNA_anim_types.h"
#include "DNA_action_types.h"
#include "DNA_curve_types.h"
-#include "DNA_ipo_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
@@ -45,7 +45,7 @@
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_global.h"
-#include "BKE_ipo.h"
+#include "BKE_fcurve.h"
#include "BKE_object.h"
#include "BKE_screen.h"
#include "BKE_utildefines.h"
@@ -128,7 +128,9 @@ void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag)
/* Draw dark green line if slow-parenting/time-offset is enabled */
if (flag & DRAWCFRA_SHOW_TIMEOFS) {
Object *ob= (scene->basact) ? (scene->basact->object) : 0;
- if ((ob) && (ob->ipoflag & OB_OFFS_OB) && (give_timeoffset(ob)!=0.0)) {
+
+ // XXX ob->ipoflag is depreceated!
+ if ((ob) && (ob->ipoflag & OB_OFFS_OB) && (give_timeoffset(ob)!=0.0f)) {
vec[0]-= give_timeoffset(ob); /* could avoid calling twice */
UI_ThemeColorShade(TH_CFRAME, -30);
@@ -294,11 +296,11 @@ static short bezt_nlamapping_apply(BeztEditData *bed, BezTriple *bezt)
-/* Apply/Unapply NLA mapping to all keyframes in the nominated IPO-Curve
- * - restore = whether to map points back to ipo-time
+/* Apply/Unapply NLA mapping to all keyframes in the nominated F-Curve
+ * - restore = whether to map points back to non-mapped time
* - only_keys = whether to only adjust the location of the center point of beztriples
*/
-void ANIM_nla_mapping_apply_ipocurve(Object *ob, IpoCurve *icu, short restore, short only_keys)
+void ANIM_nla_mapping_apply_fcurve(Object *ob, FCurve *fcu, short restore, short only_keys)
{
BeztEditData bed;
BeztEditFunc map_cb;
@@ -317,25 +319,8 @@ void ANIM_nla_mapping_apply_ipocurve(Object *ob, IpoCurve *icu, short restore, s
else
map_cb= bezt_nlamapping_apply;
- /* apply to IPO curve */
- ANIM_icu_keys_bezier_loop(&bed, icu, NULL, map_cb, NULL);
+ /* apply to F-Curve */
+ ANIM_fcurve_keys_bezier_loop(&bed, fcu, NULL, map_cb, NULL);
}
-/* Apply/Unapply NLA mapping to all keyframes in the nominated IPO block
- * - restore = whether to map points back to ipo-time
- * - only_keys = whether to only adjust the location of the center point of beztriples
- */
-// was called actstrip_map_ipo_keys()
-void ANIM_nla_mapping_apply_ipo(Object *ob, Ipo *ipo, short restore, short only_keys)
-{
- IpoCurve *icu;
-
- if (ipo == NULL) return;
-
- /* loop through all ipo curves, adjusting the times of the selected keys */
- for (icu= ipo->curve.first; icu; icu= icu->next) {
- ANIM_nla_mapping_apply_ipocurve(ob, icu, restore, only_keys);
- }
-}
-
/* *************************************************** */