[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12215] trunk/blender/source/blender/src: == Anim Editor Transform ==
Joshua Leung
aligorith at gmail.com
Sun Oct 7 10:44:14 CEST 2007
Revision: 12215
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12215
Author: aligorith
Date: 2007-10-07 10:44:14 +0200 (Sun, 07 Oct 2007)
Log Message:
-----------
== Anim Editor Transform ==
Restoring the 'force redraw' functionality, which is only active when the 'lock' icon on the header of the respective editor is turned on.
Modified Paths:
--------------
trunk/blender/source/blender/src/transform.c
trunk/blender/source/blender/src/transform_generics.c
Modified: trunk/blender/source/blender/src/transform.c
===================================================================
--- trunk/blender/source/blender/src/transform.c 2007-10-07 03:42:56 UTC (rev 12214)
+++ trunk/blender/source/blender/src/transform.c 2007-10-07 08:44:14 UTC (rev 12215)
@@ -85,6 +85,7 @@
#include "BSE_drawipo.h"
#include "BSE_editnla_types.h" /* for NLAWIDTH */
+#include "BSE_editaction_types.h"
#include "BSE_view.h"
#include "BLI_arithb.h"
@@ -379,12 +380,54 @@
static void viewRedrawForce(TransInfo *t)
{
- if(ELEM4(t->spacetype, SPACE_VIEW3D, SPACE_ACTION, SPACE_NLA, SPACE_IPO))
+ if (t->spacetype == SPACE_VIEW3D)
force_draw(0);
- else if(t->spacetype==SPACE_IMAGE) {
- if(G.sima->lock) force_draw_plus(SPACE_VIEW3D, 0);
+ else if (t->spacetype==SPACE_IMAGE) {
+ if (G.sima->lock) force_draw_plus(SPACE_VIEW3D, 0);
else force_draw(0);
}
+ else if (t->spacetype == SPACE_ACTION) {
+ if (G.saction->lock) {
+ short context= 0;
+ void *data= get_action_context(&context);
+
+ if (context == ACTCONT_ACTION)
+ force_draw_plus(SPACE_VIEW3D, 0);
+ else if (context == ACTCONT_SHAPEKEY)
+ force_draw_all(0);
+ else
+ force_draw(0);
+ }
+ else {
+ force_draw(0);
+ }
+ }
+ else if (t->spacetype == SPACE_NLA) {
+ if (G.snla->lock)
+ force_draw_all(0);
+ else
+ force_draw(0);
+ }
+ else if (t->spacetype == SPACE_IPO) {
+ /* update realtime */
+ if (G.sipo->lock) {
+ if (G.sipo->blocktype==ID_MA || G.sipo->blocktype==ID_TE)
+ force_draw_plus(SPACE_BUTS, 0);
+ else if (G.sipo->blocktype==ID_CA)
+ force_draw_plus(SPACE_VIEW3D, 0);
+ else if (G.sipo->blocktype==ID_KE)
+ force_draw_plus(SPACE_VIEW3D, 0);
+ else if (G.sipo->blocktype==ID_PO)
+ force_draw_plus(SPACE_VIEW3D, 0);
+ else if (G.sipo->blocktype==ID_OB)
+ force_draw_plus(SPACE_VIEW3D, 0);
+ else
+ force_draw(0);
+ }
+ else {
+ force_draw(0);
+ }
+ }
}
static void viewRedrawPost(TransInfo *t)
Modified: trunk/blender/source/blender/src/transform_generics.c
===================================================================
--- trunk/blender/source/blender/src/transform_generics.c 2007-10-07 03:42:56 UTC (rev 12214)
+++ trunk/blender/source/blender/src/transform_generics.c 2007-10-07 08:44:14 UTC (rev 12215)
@@ -276,7 +276,7 @@
if (ISPOIN(ei, flag & IPO_VISIBLE, icu)) {
/* watch it: if the time is wrong: do not correct handles */
- if (test_time_ipocurve(ei->icu) ) dosort++;
+ if (test_time_ipocurve(ei->icu)) dosort++;
else testhandles_ipocurve(ei->icu);
}
}
More information about the Bf-blender-cvs
mailing list