diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-27 14:08:56 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-27 14:08:56 +0400 |
commit | 343e8512127561bf61343802024c157e08d0907e (patch) | |
tree | d906e94a6c307a6bceb4cc08111dd84372a4f555 /source/blender/editors | |
parent | 2247465b997f80eb7b4e57b9cb1a973d8fbfa4a8 (diff) |
Fix #35504: Blender crashes on separating curves with different Evaluation Time / keyframes
Used slightly different approach from what was discussed with Campbell,
and the reason of this is slightly better support of curve point animation
re-mapping.
There're actually some limitations which better be discussed bewfore 'b':
- If there're no point animation, spline separation goes just fine.
- If there're animated points in the curve, blender will preserve
animation for currently editing curve. But, since new curve created
by Separate operator shares the same AnimData, it'll be animatied
in a weird way.
So not sure whether it's better to preserve animation for current spline
but require switching animationdata for new spline or resetting animation
for current curve's animation data.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 60e107b9c15..0383c0d1d1a 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1177,6 +1177,10 @@ static void curve_rename_fcurves(Curve *cu, ListBase *orig_curves) int ED_curve_updateAnimPaths(Curve *cu) { AnimData *adt = BKE_animdata_from_id(&cu->id); + EditNurb *editnurb = cu->editnurb; + + if (!editnurb->keyindex) + return 0; if (!curve_is_animated(cu)) return 0; @@ -1416,12 +1420,14 @@ static int separate_exec(bContext *C, wmOperator *op) newedit = newcu->editnurb; BKE_nurbList_free(&newedit->nurbs); BKE_curve_editNurb_keyIndex_free(newedit); + newedit->keyindex = NULL; /* 3. move over parts from old object */ for (nu = oldedit->nurbs.first; nu; nu = nu1) { nu1 = nu->next; if (isNurbsel(nu)) { + keyIndex_delNurb(oldedit, nu); BLI_remlink(&oldedit->nurbs, nu); BLI_addtail(&newedit->nurbs, nu); } |