[Bf-blender-cvs] [85bdbd7] master: Sculpt: skip normal calculation entering dyntopo
Campbell Barton
noreply at git.blender.org
Fri Jul 1 13:20:03 CEST 2016
Commit: 85bdbd76537a239f2f146f6390ffd9963d25d87c
Author: Campbell Barton
Date: Fri Jul 1 21:13:12 2016 +1000
Branches: master
https://developer.blender.org/rB85bdbd76537a239f2f146f6390ffd9963d25d87c
Sculpt: skip normal calculation entering dyntopo
When no triangulation runs we can skip re-calculating normals.
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 67609d9..37ec2d0 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5013,7 +5013,9 @@ void sculpt_dynamic_topology_enable(bContext *C)
BM_data_layer_add(ss->bm, &ss->bm->vdata, CD_PAINT_MASK);
sculpt_dyntopo_node_layers_add(ss);
/* make sure the data for existing faces are initialized */
- BM_mesh_normals_update(ss->bm);
+ if (me->totpoly != ss->bm->totface) {
+ BM_mesh_normals_update(ss->bm);
+ }
/* Enable dynamic topology */
me->flag |= ME_SCULPT_DYNAMIC_TOPOLOGY;
More information about the Bf-blender-cvs
mailing list