Revision: 37263
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37263
Author:   jwilkins
Date:     2011-06-06 18:15:48 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
Revision: 30670
Author: nicholasbishop
Date: 2:08:05 PM, Friday, July 23, 2010
Message:
== Multires ==

Small bug fixes

* When dropping down to multires level zero in sculpt mode, update PBVH from 
the CDDM
* When checking for modifiers in sculpt, ignore multires on level zero

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
    branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c

Property Changed:
----------------
    branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30564,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30564,30670,30694
/trunk/blender:36833-37206

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c      
2011-06-06 18:04:57 UTC (rev 37262)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c      
2011-06-06 18:15:48 UTC (rev 37263)
@@ -2271,6 +2271,10 @@
        ob->derivedFinal->needsFree = 0;
        ob->derivedDeform->needsFree = 0;
        ob->lastDataMask = dataMask;
+
+       /* update the pbvh for paint */
+       if((ob->mode & (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT)) && ob->paint)
+               ob->paint->pbvh= ob->derivedFinal->getPBVH(ob, 
ob->derivedFinal);
 }
 
 static void editmesh_build_data(Scene *scene, Object *obedit, EditMesh *em, 
CustomDataMask dataMask)

Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c        
2011-06-06 18:04:57 UTC (rev 37262)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c        
2011-06-06 18:15:48 UTC (rev 37263)
@@ -172,6 +172,14 @@
                if (md->type==eModifierType_ShapeKey)
                        continue;
 
+               /*exception for multires on level zero, it's
+                 not caught by the earlier multires check */
+               if (md->type == eModifierType_Multires &&
+                   ((MultiresModifierData*)md)->sculptlvl == 0)
+               {
+                       continue;
+               }
+
                if (mti->type==eModifierTypeType_OnlyDeform)
                        return 1;
                

Modified: branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c
===================================================================
--- branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c      
2011-06-06 18:04:57 UTC (rev 37262)
+++ branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c      
2011-06-06 18:15:48 UTC (rev 37263)
@@ -73,7 +73,6 @@
 static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh 
*dm,
                                                   int useRenderParams, int 
isFinalCalc)
 {
-       int update_pbvh= (ob->mode & OB_MODE_SCULPT) && ob->paint;
        MultiresModifierData *mmd = (MultiresModifierData*)md;
        DerivedMesh *result;
        Mesh *me= (Mesh*)ob->data;
@@ -95,11 +94,6 @@
                result->release(result);
                result= cddm;
        }
-       else if(update_pbvh) {
-               /* would be created on the fly too, just nicer this
-                  way on first stroke after e.g. switching levels */
-               ob->paint->pbvh= result->getPBVH(ob, result);
-       }
 
        return result;
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to