diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-25 11:15:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-25 11:27:46 +0400 |
commit | d9637fb3beb595c3e6387f79da500987cdea411e (patch) | |
tree | e772efefbdc8cb98bb6a180e9d06b5ed75879d3e /source | |
parent | bb62f9a582d44e347f81b11610b8e18acc590b35 (diff) |
Fix T38745: Curve parent crash when rendering animation
Issue was caused by curve orco calculation for rendering being freed
curve path and not calculating it back.
This left depsgraph in a state that it believed all the object data
is up to date but in fact some parts of data was freed by convert
blender.
Now made it so path is not being freed by render thread. This is
rather a workaround actually because ideally render thread need
to use copy-on-write here or at least use local cache here. But
current logic should be closer to what was happening in previous
release.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index fee12f2fe72..9582d87c540 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1377,8 +1377,14 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba BLI_freelistN(&(ob->curve_cache->bev)); - if (ob->curve_cache->path) free_path(ob->curve_cache->path); - ob->curve_cache->path = NULL; + /* We only re-evlauate path if evaluation is not happening for orco. + * If the calculation happens for orco, we should never free data which + * was needed before and only not needed for orco calculation. + */ + if (!forOrco) { + if (ob->curve_cache->path) free_path(ob->curve_cache->path); + ob->curve_cache->path = NULL; + } if (ob->type == OB_FONT) { BKE_vfont_to_curve_nubase(G.main, ob, FO_EDIT, &nubase); |