[Bf-blender-cvs] [b6dba5caac1] blender2.8: Vertex Paint: use original mesh data

Campbell Barton noreply at git.blender.org
Wed Aug 8 07:15:55 CEST 2018


Commit: b6dba5caac17522d695ee2d40699178f32e35444
Author: Campbell Barton
Date:   Wed Aug 8 15:17:30 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBb6dba5caac17522d695ee2d40699178f32e35444

Vertex Paint: use original mesh data

This is already done in weight paint mode,
avoids a mesh refresh on selection changes.

===================================================================

M	source/blender/draw/modes/paint_vertex_mode.c

===================================================================

diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c
index bbe17415da1..236f76367d4 100644
--- a/source/blender/draw/modes/paint_vertex_mode.c
+++ b/source/blender/draw/modes/paint_vertex_mode.c
@@ -36,6 +36,8 @@
 #include "DNA_mesh_types.h"
 #include "DNA_view3d_types.h"
 
+#include "DEG_depsgraph_query.h"
+
 extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */
 extern struct GlobalsUboStorage ts; /* draw_common.c */
 
@@ -147,6 +149,8 @@ static void PAINT_VERTEX_cache_populate(void *vedata, Object *ob)
 	const View3D *v3d = draw_ctx->v3d;
 
 	if ((ob->type == OB_MESH) && (ob == draw_ctx->obact)) {
+		/* We're always painting on original, display original data. */
+		ob = DEG_get_original_object(ob);
 		const Mesh *me = ob->data;
 		const bool use_wire = (v3d->overlay.paint_flag & V3D_OVERLAY_PAINT_WIRE) != 0;
 		const bool use_surface = v3d->overlay.vertex_paint_mode_opacity != 0.0f;



More information about the Bf-blender-cvs mailing list