[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12184] trunk/blender/source/blender/src/ drawaction.c: Action Editor - Sliders Bugfix:
Joshua Leung
aligorith at gmail.com
Tue Oct 2 02:43:35 CEST 2007
Revision: 12184
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12184
Author: aligorith
Date: 2007-10-02 02:43:35 +0200 (Tue, 02 Oct 2007)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/blender/source/blender/src/drawaction.c
Modified: trunk/blender/source/blender/src/drawaction.c
===================================================================
--- trunk/blender/source/blender/src/drawaction.c 2007-10-02 00:00:06 UTC (rev 12183)
+++ trunk/blender/source/blender/src/drawaction.c 2007-10-02 00:43:35 UTC (rev 12184)
@@ -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 @@
/* 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);
}
More information about the Bf-blender-cvs
mailing list