[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16849] trunk/blender/source/blender/src/ keyframing.c: A few cleanups in keyframing.c

Joshua Leung aligorith at gmail.com
Tue Sep 30 14:03:36 CEST 2008


Revision: 16849
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16849
Author:   aligorith
Date:     2008-09-30 14:03:31 +0200 (Tue, 30 Sep 2008)

Log Message:
-----------
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)

Modified Paths:
--------------
    trunk/blender/source/blender/src/keyframing.c

Modified: trunk/blender/source/blender/src/keyframing.c
===================================================================
--- trunk/blender/source/blender/src/keyframing.c	2008-09-30 11:52:59 UTC (rev 16848)
+++ trunk/blender/source/blender/src/keyframing.c	2008-09-30 12:03:31 UTC (rev 16849)
@@ -735,8 +735,6 @@
 	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 @@
 			}
 		}
 		
-		/* 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 @@
 			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 @@
 			allqueue(REDRAWMARKER, 0);
 		}
 			break;
+			
+		/* buttons window */
+		case SPACE_BUTS:
+		{
+			allspace(REMAKEIPO, 0);
+			allqueue(REDRAWVIEW3D, 0);
+			allqueue(REDRAWMARKER, 0);
+		}
+			break;
 	}
 }
 





More information about the Bf-blender-cvs mailing list