From d1fe2dd9676eceab9ece337cb478c312d3c5c1aa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Oct 2010 12:21:57 +0000 Subject: [PATCH] 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. --- source/blender/blenkernel/intern/object.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 142e41918dd..1d7d5b6e243 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2560,6 +2560,12 @@ void object_handle_update(Scene *scene, Object *ob) 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)) {