[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16257] branches/soc-2008-nicholasbishop/ source/blender: Fix for reshape, works outside of sculptmode now.

Nicholas Bishop nicholasbishop at gmail.com
Tue Aug 26 06:28:18 CEST 2008


Revision: 16257
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16257
Author:   nicholasbishop
Date:     2008-08-26 06:28:18 +0200 (Tue, 26 Aug 2008)

Log Message:
-----------
Fix for reshape, works outside of sculptmode now.

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

Modified: branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c
===================================================================
--- branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c	2008-08-26 01:37:46 UTC (rev 16256)
+++ branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c	2008-08-26 04:28:18 UTC (rev 16257)
@@ -1115,6 +1115,7 @@
 		for(i = 0; i < src_me->totvert; ++i)
 			VecCopyf(mvert[i].co, src_me->mvert[i].co);
 		mrdm->needsFree = 1;
+		*MultiresDM_get_flags(mrdm) |= MULTIRES_DM_UPDATE_ALWAYS;
 		mrdm->release(mrdm);
 		dst->derivedFinal = NULL;
 

Modified: branches/soc-2008-nicholasbishop/source/blender/src/buttons_editing.c
===================================================================
--- branches/soc-2008-nicholasbishop/source/blender/src/buttons_editing.c	2008-08-26 01:37:46 UTC (rev 16256)
+++ branches/soc-2008-nicholasbishop/source/blender/src/buttons_editing.c	2008-08-26 04:28:18 UTC (rev 16257)
@@ -1668,19 +1668,24 @@
 	MultiresModifierData *mmd = mmd_v;
 	if(mmd && ob_v) {
 		Base *base = FIRSTBASE;
-		if(base && base->object != ob_v) {
-			Object *src = base->object;
-			if(src->type == OB_MESH) {
-				if(multiresModifier_reshape(mmd, ob_v, src))
-					error("Vertex count mismatch");
-				else
-					BIF_undo_push("Multires reshape");
+		Object *ob2 = NULL;
+		
+		while(base) {
+			if(base->object != ob_v && base->object->type == OB_MESH) {
+				ob2 = base->object;
+				break;
 			}
+			base = base->next;
+		}
+		
+		if(ob2) {
+			if(multiresModifier_reshape(mmd, ob_v, ob2))
+				error("Vertex count mismatch");
 			else
-				error("Second selection not a mesh");
+				BIF_undo_push("Multires reshape");
 		}
 		else
-			error("Second selection required");
+			error("Second mesh selection required");
 	}
 }
 





More information about the Bf-blender-cvs mailing list