diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-10-07 12:44:14 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-10-07 12:44:14 +0400 |
commit | c60cc6ac85eb25903873014ea88a749542173cc9 (patch) | |
tree | ed632f39fafcd0a42a2cecacb832d4bbc059c451 /source/blender/src/transform.c | |
parent | 8703dd9f52beccca20858042ac185fc48c3a2460 (diff) |
== 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.
Diffstat (limited to 'source/blender/src/transform.c')
-rw-r--r-- | source/blender/src/transform.c | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index a2317ba61bb..fe2dd4a359a 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -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 @@ void convertDisplayNumToVec(float *num, float *vec) 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) |