From 0f5dc8604932099dd5b4d8b3f76198174bdc6cb2 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 30 Sep 2008 12:03:31 +0000 Subject: [PATCH] A few cleanups in keyframing.c - Added missing update calls for buttons window keyframing. This should get rid of all those sporadic update problems (using a different keyingset would result in no curve being added) --- source/blender/src/keyframing.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/source/blender/src/keyframing.c b/source/blender/src/keyframing.c index 299c5f8e31a..5b17c54a8f2 100644 --- a/source/blender/src/keyframing.c +++ b/source/blender/src/keyframing.c @@ -735,8 +735,6 @@ short insertkey (ID *id, int blocktype, char *actname, char *constname, int adrc if (icu) { float cfra = frame_to_float(CFRA); float curval= 0.0f; - void *poin = NULL; - int vartype; /* apply special time tweaking */ if (GS(id->name) == ID_OB) { @@ -753,13 +751,6 @@ short insertkey (ID *id, int blocktype, char *actname, char *constname, int adrc } } - /* get pointer to data to read from */ - poin= get_context_ipo_poin(id, blocktype, actname, constname, icu, &vartype); - if (poin == NULL) { - printf("Insert Key: No pointer to variable obtained \n"); - return 0; - } - /* obtain value to give keyframe */ if ( (flag & INSERTKEY_MATRIX) && (visualkey_can_use(id, blocktype, actname, constname, adrcode)) ) @@ -771,6 +762,16 @@ short insertkey (ID *id, int blocktype, char *actname, char *constname, int adrc curval= visualkey_get_value(id, blocktype, actname, constname, adrcode, icu); } else { + void *poin; + int vartype; + + /* get pointer to data to read from */ + poin = get_context_ipo_poin(id, blocktype, actname, constname, icu, &vartype); + if (poin == NULL) { + printf("Insert Key: No pointer to variable obtained \n"); + return 0; + } + /* use kt's read_poin function to extract value (kt->read_poin should * exist in all cases, but it never hurts to check) */ @@ -1589,6 +1590,15 @@ static void commonkey_context_refresh (void) allqueue(REDRAWMARKER, 0); } break; + + /* buttons window */ + case SPACE_BUTS: + { + allspace(REMAKEIPO, 0); + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWMARKER, 0); + } + break; } }