Blender Git Loki

Git Commits -> Revision eb016eb

Revision eb016eb by Sergey Sharybin (master)
July 31, 2014, 14:25 (GMT)
Fix T41258: Crash when entering edit mode while viewport render is enabled

The issue was caused by the render engine loading edit mesh, which re-allocates
mesh array which might be referenced by other object's derived meshed.

Worst thing about this is that updating render engine happens from the end of
scene update function, after all the objects are updated and so. This is needed
so render engine gets the update objects which is correct.

The only proper way to solve the issue is to make it so viewport engine does not
leave objects in inconsistent state, meaning nobody will reference to freed data.

In order to reach this we do edit mesh loading before running objects update so
all the objects which uses that mesh will have proper references in the derived
mesh.

This also solves old creepyness which happened before when having single object
in edit mode. tweaking it will calculate derived mesh as a part of scene update,
then this derived mesh will be freed by edit mesh loading and viewport will be
creating derived mesh again.

Now render engine is expected to do nothing with meshes which are in edit mode,
but they still need to load edit data for non0meshes. It's not really easy to
do from the BKE level because needed functions are implemented in the editor.

Thanks Campbell for the review!

Differential Revision: https://developer.blender.org/D697

Commit Details:

Full Hash: eb016eb3ae799e5c86778ba996f54257f84e80a4
Parent Commit: 3ccd9b7
Lines Changed: +80, -8

7 Modified Paths:

/intern/cycles/blender/blender_mesh.cpp (+7, -1) (Diff)
/source/blender/blenkernel/intern/scene.c (+56, -0) (Diff)
/source/blender/editors/include/ED_view3d.h (+1, -1) (Diff)
/source/blender/editors/object/object_edit.c (+5, -0) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+6, -1) (Diff)
/source/blender/editors/space_view3d/view3d_view.c (+3, -3) (Diff)
/source/blender/makesrna/intern/rna_space.c (+2, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021