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.
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user