Revision: 15654
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15654
Author:   nicholasbishop
Date:     2008-07-20 18:21:21 +0200 (Sun, 20 Jul 2008)

Log Message:
-----------
Fixed applying the multires modifier.

Modified Paths:
--------------
    branches/soc-2008-nicholasbishop/source/blender/src/buttons_editing.c

Modified: branches/soc-2008-nicholasbishop/source/blender/src/buttons_editing.c
===================================================================
--- branches/soc-2008-nicholasbishop/source/blender/src/buttons_editing.c       
2008-07-20 16:06:40 UTC (rev 15653)
+++ branches/soc-2008-nicholasbishop/source/blender/src/buttons_editing.c       
2008-07-20 16:21:21 UTC (rev 15654)
@@ -1356,16 +1356,16 @@
        }
 
        if (ob->type==OB_MESH) {
-               if(me->mr && multires_modifier_warning()) {
-                       error("Modifier changes topology; cannot apply with 
multires active");
-                       return;
-               }
                if(me->key) {
                        error("Modifier cannot be applied to Mesh with Shape 
Keys");
                        return;
                }
        
                mesh_pmv_off(ob, me);
+
+               /* Multires: ensure that recent sculpting is applied */
+               if(md->type == eModifierType_Multires)
+                       multires_force_update(ob);
        
                dm = mesh_create_derived_for_modifier(ob, md);
                if (!dm) {
@@ -1373,6 +1373,10 @@
                        return;
                }
 
+               /* Multires: remove MDisps from the DerivedMesh */
+               if(md->type == eModifierType_Multires)
+                       CustomData_free_layers(&dm->faceData, CD_MDISPS, 
MultiresDM_get_totorfa(dm));
+               
                DM_to_mesh(dm, me);
                converted = 1;
 


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to