Vertex Paint: use original mesh data
This is already done in weight paint mode, avoids a mesh refresh on selection changes.
This commit is contained in:
parent
cb15854bf9
commit
b6dba5caac
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue