[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32614] trunk/blender/source/blender: fix for fix [#24336] evaluation time - curve has no effect

Campbell Barton ideasman42 at gmail.com
Wed Oct 20 15:51:38 CEST 2010


Revision: 32614
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32614
Author:   campbellbarton
Date:     2010-10-20 15:51:37 +0200 (Wed, 20 Oct 2010)

Log Message:
-----------
fix for fix [#24336] evaluation time - curve has no effect
committed r32598 to fix [#24309] Reloading file with incorrect path location.

Setting the curves ctime when updating the object data overrode the animated value.
For now just set the ctime on newly added curves with will work as the user expects in most cases.
This is weak design IMHO because the ctime value can be set to anything but is reset on changing frames even if its not keyed.

With curves created via python or linked in this can still result in a bad ctime value.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/object.c
    trunk/blender/source/blender/editors/curve/editcurve.c

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c	2010-10-20 12:33:00 UTC (rev 32613)
+++ trunk/blender/source/blender/blenkernel/intern/object.c	2010-10-20 13:51:37 UTC (rev 32614)
@@ -2560,12 +2560,6 @@
 				makeDispListMBall(scene, ob);
 			} 
 			else if(ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
-				if(ob->type==OB_CURVE) {
-					/* cu->ctime is set on frame change but this is not enough when
-					 * adding new curves, appending etc. This assignment could be moved
-					 * but this ensures its always set esp before parenting: [#24309] */
-					((Curve *)ob->data)->ctime= ctime;
-				}
 				makeDispListCurveTypes(scene, ob, 0);
 			}
 			else if(ELEM(ob->type, OB_CAMERA, OB_LAMP)) {

Modified: trunk/blender/source/blender/editors/curve/editcurve.c
===================================================================
--- trunk/blender/source/blender/editors/curve/editcurve.c	2010-10-20 12:33:00 UTC (rev 32613)
+++ trunk/blender/source/blender/editors/curve/editcurve.c	2010-10-20 13:51:37 UTC (rev 32614)
@@ -6012,11 +6012,13 @@
 	if (!isSurf) { /* adding curve */
 		if(obedit==NULL || obedit->type!=OB_CURVE) {
 			Curve *cu;
+			Scene *scene= CTX_data_scene(C);
 			obedit= ED_object_add_type(C, OB_CURVE, loc, rot, TRUE, layer);
 			newob = 1;
 
 			cu= (Curve*)obedit->data;
 			cu->flag |= CU_DEFORM_FILL;
+			cu->ctime= CFRA;
 			if(type & CU_PRIM_PATH)
 				cu->flag |= CU_PATH|CU_3D;
 		} else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);





More information about the Bf-blender-cvs mailing list