Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-11-13 23:57:00 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-11-13 23:58:30 +0300
commit4d33c37c9eb4fc46482f7b2a7227b54c5cfda07a (patch)
tree94302b76edc357977a3619eebaa5642c03c32161 /source/blender/editors/sculpt_paint
parent92819425d86017f371fa8e78db54d4fb976a0235 (diff)
Fix T46726 shading issues in sculpt mode.
This fixes two issues: * Normals were not being recalculated correctly when not using optimized drawing for CDDerivedMesh (Multires actually handles that correctly). * Loop normals (autosmooth option) were also not being calculated. Doing this calculation is not desirable, since it can't be done correctly without a severe performance hit. This is easy to test by doing a dependency flush on the mesh after each scuplt stroke step. Instead they are now disabled during sculpting.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 4aded2d3e05..fad7f089dca 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5149,6 +5149,9 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
paint_cursor_start(C, sculpt_poll_view3d);
}
+ if (ob->derivedFinal) /* VBO no longer valid */
+ GPU_drawobject_free(ob->derivedFinal);
+
WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene);
return OPERATOR_FINISHED;