Blender Git Commit Log

Git Commits -> Revision 5e1d471

Revision 5e1d471 by Bastien Montagne (master)
February 22, 2017, 20:56 (GMT)
Fix T50745: Shape key editing on bezier objects broken with Rendered Viewport Shading

So... Curve+shapekey was even more broken than it looked, this report was
actually a nice crasher (immediate crash in an ASAN build when trying to
edit a curve shapekey with some viewport rendering enabled).

There were actually two different issues here.

I) The less critical: rB6f1493f68fe was not fully fixing issues from
T50614. More specifically, if you updated obdata from editnurb
*without* freeing editnurb afterwards, you had a 'restored' (to
original curve) editnurb, without the edited shapekey modifications
anymore. This was fixed by tweaking again `calc_shapeKeys()` behavior in
`ED_curve_editnurb_load()`.

II) The crasher: in `ED_curve_editnurb_make()`, the call to
`init_editNurb_keyIndex()` was directly storing pointers of obdata
nurbs. Since those get freed every time `ED_curve_editnurb_load()` is
executed, it easily ended up being pointers to freed memory. This was
fixed by copying those data, which implied more complex handling code
for editnurbs->keyindex, and some reshuffling of a few functions to
avoid duplicating things between editor's editcurve.c and BKE's curve.c

Note that the separation of functions between editors and BKE area for
curve could use a serious update, it's currently messy to say the least.
Then again, that area is due to rework since a long time now... :/

Finally, aligned 'for_render' curve evaluation to mesh one - now
editing a shapekey will show in rendered viewports, if it does have some
weight (exactly as with shapekeys of meshes).

Commit Details:

Full Hash: 5e1d4714fef72407e3497e70ddac3f1caa959f39
Parent Commit: b637db2
Lines Changed: +77, -47

4 Modified Paths:

/source/blender/blenkernel/BKE_curve.h (+10, -1) (Diff)
/source/blender/blenkernel/intern/curve.c (+18, -5) (Diff)
/source/blender/blenkernel/intern/displist.c (+1, -1) (Diff)
/source/blender/editors/curve/editcurve.c (+48, -40) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021