From 1998fa59ae90c2346910dc622df0356a8644c28f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 20 Oct 2010 13:51:37 +0000 Subject: 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. --- source/blender/blenkernel/intern/object.c | 6 ------ source/blender/editors/curve/editcurve.c | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 1d7d5b6e243..142e41918dd 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2560,12 +2560,6 @@ 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)) { diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 97379cc110c..a116cc10be7 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6012,11 +6012,13 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) 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); -- cgit v1.2.3