EditMesh: Avoid creating deform-vert layer every redraw
authorCampbell Barton <ideasman42@gmail.com>
Wed, 22 Jun 2016 11:20:09 +0000 (21:20 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 22 Jun 2016 11:31:00 +0000 (21:31 +1000)
commitb204bdad47ffbd92b7b6702e2a680da9cbd6489a
tree3488037b2e2eb33450a7cfee813538c4d4ce76b4
parent493c6b622fe3fb80243dfeac29f9399ac6fc4a8c
EditMesh: Avoid creating deform-vert layer every redraw

Getting a new edit-derived-bmesh was always creating a deform-vert array, even when it wasn't needed.
Since this was called on redraw, in many cases it was doing it unnecessarily.

Now pass in a custom-data mask and only fill in deform-verts when needed.

Gives noticeable drawing speedup (~10-30% here).
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/crazyspace.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/editors/space_view3d/drawobject.c