[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25579] trunk/blender/source/blender: Curve/Nurbs/Font Animation Bugfixes:

Joshua Leung aligorith at gmail.com
Mon Dec 28 00:37:13 CET 2009


Revision: 25579
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25579
Author:   aligorith
Date:     2009-12-28 00:37:13 +0100 (Mon, 28 Dec 2009)

Log Message:
-----------
Curve/Nurbs/Font Animation Bugfixes:

* NURBS and Font animation data now appear in the animation editors. 

* Fixed depsgraph tagging code for determining if the AnimData attached to object data blocks (i.e. animation for curve or lamp data) needs to be tagged for updates on frame changes. This means that animating curve settings now works.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/depsgraph.c
    trunk/blender/source/blender/editors/animation/anim_channels_defines.c
    trunk/blender/source/blender/editors/animation/anim_filter.c
    trunk/blender/source/blender/editors/animation/keyframes_draw.c
    trunk/blender/source/blender/editors/animation/keyframes_edit.c

Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c	2009-12-27 23:29:34 UTC (rev 25578)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c	2009-12-27 23:37:13 UTC (rev 25579)
@@ -65,6 +65,7 @@
 
 #include "BLI_ghash.h"
 
+#include "BKE_animsys.h"
 #include "BKE_action.h"
 #include "BKE_effect.h"
 #include "BKE_global.h"
@@ -2027,6 +2028,7 @@
 	if((ob->pose) && (ob->pose->flag & POSE_CONSTRAINTS_TIMEDEPEND)) ob->recalc |= OB_RECALC_DATA;
 	
 	{
+		AnimData *adt= BKE_animdata_from_id((ID *)ob->data);
 		Mesh *me;
 		Curve *cu;
 		Lattice *lt;
@@ -2068,6 +2070,11 @@
 				if(ob->transflag & OB_DUPLI) ob->recalc |= OB_RECALC_DATA;
 				break;
 		}
+		
+		if(animdata_use_time(adt)) {
+			ob->recalc |= OB_RECALC_DATA;
+			adt->recalc |= ADT_RECALC_ANIM;
+		}
 
 		if(ob->particlesystem.first) {
 			ParticleSystem *psys= ob->particlesystem.first;

Modified: trunk/blender/source/blender/editors/animation/anim_channels_defines.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2009-12-27 23:29:34 UTC (rev 25578)
+++ trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2009-12-27 23:37:13 UTC (rev 25579)
@@ -66,6 +66,7 @@
 
 #include "BKE_animsys.h"
 #include "BKE_action.h"
+#include "BKE_curve.h"
 #include "BKE_depsgraph.h"
 #include "BKE_fcurve.h"
 #include "BKE_key.h"
@@ -1303,7 +1304,17 @@
 // TODO: just get this from RNA?
 static int acf_dscur_icon(bAnimListElem *ale)
 {
-	return ICON_CURVE_DATA;
+	Curve *cu= (Curve *)ale->data;
+	short obtype= curve_type(cu);
+	
+	switch (obtype) {
+		case OB_FONT:
+			return ICON_FONT_DATA;
+		case OB_SURF:
+			return ICON_SURFACE_DATA;
+		default:
+			return ICON_CURVE_DATA;
+	}
 }
 
 /* get the appropriate flag(s) for the setting when it is valid  */

Modified: trunk/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_filter.c	2009-12-27 23:29:34 UTC (rev 25578)
+++ trunk/blender/source/blender/editors/animation/anim_filter.c	2009-12-27 23:37:13 UTC (rev 25579)
@@ -1323,6 +1323,8 @@
 		}
 			break;
 		case OB_CURVE: /* ------- Curve ---------- */
+		case OB_SURF: /* ------- Nurbs Surface ---------- */
+		case OB_FONT: /* ------- Text Curve ---------- */
 		{
 			Curve *cu= (Curve *)ob->data;
 			
@@ -1540,6 +1542,8 @@
 		}
 			break;
 		case OB_CURVE: /* ------- Curve ---------- */
+		case OB_SURF: /* ------- Nurbs Surface ---------- */
+		case OB_FONT: /* ------- Text Curve ---------- */
 		{
 			Curve *cu= (Curve *)ob->data;
 			
@@ -1962,6 +1966,8 @@
 					}
 						break;
 					case OB_CURVE: /* ------- Curve ---------- */
+					case OB_SURF: /* ------- Nurbs Surface ---------- */
+					case OB_FONT: /* ------- Text Curve ---------- */
 					{
 						Curve *cu= (Curve *)ob->data;
 						dataOk= 0;
@@ -2082,7 +2088,9 @@
 						dataOk= ANIMDATA_HAS_KEYS(la);	
 					}
 						break;
-					case OB_CURVE: /* -------- Curve ---------- */
+					case OB_CURVE: /* ------- Curve ---------- */
+					case OB_SURF: /* ------- Nurbs Surface ---------- */
+					case OB_FONT: /* ------- Text Curve ---------- */
 					{
 						Curve *cu= (Curve *)ob->data;
 						dataOk= ANIMDATA_HAS_KEYS(cu);	

Modified: trunk/blender/source/blender/editors/animation/keyframes_draw.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_draw.c	2009-12-27 23:29:34 UTC (rev 25578)
+++ trunk/blender/source/blender/editors/animation/keyframes_draw.c	2009-12-27 23:37:13 UTC (rev 25579)
@@ -797,6 +797,8 @@
 		}
 			break;
 		case OB_CURVE: /* ------- Curve ---------- */
+		case OB_SURF: /* ------- Nurbs Surface ---------- */
+		case OB_FONT: /* ------- Text Curve ---------- */
 		{
 			Curve *cu= (Curve *)ob->data;
 			

Modified: trunk/blender/source/blender/editors/animation/keyframes_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_edit.c	2009-12-27 23:29:34 UTC (rev 25578)
+++ trunk/blender/source/blender/editors/animation/keyframes_edit.c	2009-12-27 23:37:13 UTC (rev 25579)
@@ -254,6 +254,8 @@
 		}
 			break;
 		case OB_CURVE: /* ------- Curve ---------- */
+		case OB_SURF: /* ------- Nurbs Surface ---------- */
+		case OB_FONT: /* ------- Text Curve ---------- */
 		{
 			Curve *cu= (Curve *)ob->data;
 			





More information about the Bf-blender-cvs mailing list