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:
authorCampbell Barton <ideasman42@gmail.com>2009-10-06 15:21:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-10-06 15:21:57 +0400
commitc12cb02c56ef575720f468ed1de7dc065f153580 (patch)
treeade55d04f1ce325a80b11cb325309afb1fb6caf0 /source/blender/editors/sculpt_paint
parentba3ec58d01a295ebcbcbdbfe0e6568aca34a358c (diff)
sculpt was checking if multires was the last modifier,
instead check if its the last displayed modifier
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 01a2ff3fdee..982bd315b99 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1099,8 +1099,18 @@ static struct MultiresModifierData *sculpt_multires_active(Object *ob)
ModifierData *md;
for(md= modifiers_getVirtualModifierList(ob); md; md= md->next) {
- if(md->type == eModifierType_Multires && !md->next) {
- MultiresModifierData *mmd = (MultiresModifierData*)md;
+ if(md->type == eModifierType_Multires) {
+ MultiresModifierData *mmd;
+
+ /* Check if any of the modifiers after multires are active
+ * if not it can use the multires struct */
+ ModifierData *md_next;
+ for (md_next= md->next; md_next; md_next= md_next->next) {
+ if(md_next->mode & eModifierMode_Realtime)
+ return NULL;
+ }
+
+ mmd = (MultiresModifierData*)md;
if(mmd->lvl != 1)
return mmd;
}