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>2007-10-02 04:43:35 +0400
committerJoshua Leung <aligorith@gmail.com>2007-10-02 04:43:35 +0400
commit9bfcbe95059f378e9d820e71e600bba4a8e2a5cb (patch)
tree4a5093cd193a48c53649f4ee9f123e8b1ab509db /source/blender/src/drawaction.c
parente1ebf22921c7c57467d34fa6cf663e901b2b4964 (diff)
Action Editor - Sliders Bugfix:
The Action Editor slider callbacks were missing depsgraph update calls, so the 3d-view wasn't correctly updated after using to sliders to add keyframes
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r--source/blender/src/drawaction.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index b6f13f76426..8a9841ce70d 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -61,7 +61,9 @@
#include "DNA_key_types.h"
#include "BKE_action.h"
+#include "BKE_depsgraph.h"
#include "BKE_ipo.h"
+#include "BKE_key.h"
#include "BKE_global.h"
#include "BKE_utildefines.h"
@@ -69,6 +71,7 @@
#include "BIF_editaction.h"
#include "BIF_editkey.h"
+#include "BIF_editnla.h"
#include "BIF_interface.h"
#include "BIF_interface_icons.h"
#include "BIF_gl.h"
@@ -197,23 +200,32 @@ static void icu_slider_func(void *voidicu, void *voidignore)
/* create the bezier triple if one doesn't exist,
* otherwise modify it's value
*/
- if (!bezt) {
+ if (bezt == NULL) {
insert_vert_icu(icu, cfra, icu->curval, 0);
}
else {
bezt->vec[1][1] = icu->curval;
}
- /* make sure the Ipo's are properly process and
+ /* make sure the Ipo's are properly processed and
* redraw as necessary
*/
sort_time_ipocurve(icu);
testhandles_ipocurve(icu);
- allqueue (REDRAWVIEW3D, 0);
- allqueue (REDRAWACTION, 0);
- allqueue (REDRAWNLA, 0);
- allqueue (REDRAWIPO, 0);
+ /* nla-update (in case this affects anything) */
+ synchronize_action_strips();
+
+ /* do redraw pushes, and also the depsgraph flushes */
+ if (OBACT->pose || ob_get_key(OBACT))
+ DAG_object_flush_update(G.scene, OBACT, OB_RECALC);
+ else
+ DAG_object_flush_update(G.scene, OBACT, OB_RECALC_OB);
+
+ allqueue(REDRAWVIEW3D, 0);
+ allqueue(REDRAWACTION, 0);
+ allqueue(REDRAWNLA, 0);
+ allqueue(REDRAWIPO, 0);
allspace(REMAKEIPO, 0);
allqueue(REDRAWBUTSALL, 0);
}