[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32598] trunk/blender/source/blender/ blenkernel/intern/object.c: bugfix [#24309] Reloading file with incorrect path location.

Campbell Barton ideasman42 at gmail.com
Tue Oct 19 14:21:57 CEST 2010


Revision: 32598
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32598
Author:   campbellbarton
Date:     2010-10-19 14:21:57 +0200 (Tue, 19 Oct 2010)

Log Message:
-----------
bugfix [#24309] Reloading file with incorrect path location.
the cu->ctime was never set if the frame wasnt changed, so adding a curve and parenting could be done without a frame change leaving the cu->ctime value at zero.
changing the frame or rendering after this would make the parent relationship jump.

Set the curve->ctime in object_handle_update(), this way its set on file load and when linking in new curves.
Another option is to do this when parenting but probably this would miss other cases where its needed.

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

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c	2010-10-19 11:51:31 UTC (rev 32597)
+++ trunk/blender/source/blender/blenkernel/intern/object.c	2010-10-19 12:21:57 UTC (rev 32598)
@@ -2560,6 +2560,12 @@
 				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)) {





More information about the Bf-blender-cvs mailing list