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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-09-21 12:43:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-21 12:43:42 +0300
commit12372e8d8b0e2c6015b8f68fb01e5aef9b5c22cd (patch)
treec8d8835e1eaedb86f5b49cab1577630cd92a6a89 /source/blender/blenkernel/intern/multires.c
parent619c55027f718c1018051da41bcd89943445e663 (diff)
Multires: Support sculpting on a lover levels
Added propagation of displacement to a higher levels. Has the same limitation as reshape from object, which makes grids somewhat choppy due to linear interpolation nature. This is to be addressed next.
Diffstat (limited to 'source/blender/blenkernel/intern/multires.c')
-rw-r--r--source/blender/blenkernel/intern/multires.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index 0a6d7f99237..abd4e0d9e7f 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -422,10 +422,12 @@ void multires_force_update(Object *ob)
if (ob == NULL) {
return;
}
- if (ob->sculpt && ob->sculpt->pbvh) {
- PBVH *pbvh = ob->sculpt->pbvh;
+ SculptSession *sculpt_session = ob->sculpt;
+ if (sculpt_session != NULL && sculpt_session->pbvh != NULL) {
+ PBVH *pbvh = sculpt_session->pbvh;
if (BKE_pbvh_type(pbvh) == PBVH_GRIDS) {
- multiresModifier_reshapeFromCCG(ob, ob->sculpt->subdiv_ccg);
+ multiresModifier_reshapeFromCCG(
+ sculpt_session->multires, ob, sculpt_session->subdiv_ccg);
}
else {
/* NOTE: Disabled for until OpenSubdiv is enabled by default. */