[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30917] branches/soc-2010-nicolasbishop/ source/blender/blenkernel/intern/multires.c: == Multires ==

Nicholas Bishop nicholasbishop at gmail.com
Sat Jul 31 02:15:17 CEST 2010


Revision: 30917
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30917
Author:   nicholasbishop
Date:     2010-07-31 02:15:17 +0200 (Sat, 31 Jul 2010)

Log Message:
-----------
== Multires ==

* Separate mdisp re-allocation from customdata realloc

Modified Paths:
--------------
    branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/multires.c

Modified: branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/multires.c
===================================================================
--- branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/multires.c	2010-07-30 23:45:40 UTC (rev 30916)
+++ branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/multires.c	2010-07-31 00:15:17 UTC (rev 30917)
@@ -846,14 +846,17 @@
 		MDisps *mdisp = &mdisps[i];
 		int S, x, y, j, gIndex = gridOffset[i];
 
-		/* when adding new faces in edit mode, need to allocate disps;
-		   may need to allocate paintmask storage after adding multires as well */
-		if(!mdisp->disps ||
-		   ((gridkey->mask || gridkey->color) && 
-		    !stored_grids /* XXX: this needs updating for non vert types */ ))
+		/* when adding new faces in edit mode, need to allocate disps */
+		if(!mdisp->disps)
 		#pragma omp critical
 		{
 			multires_reallocate_mdisps(me, mdisps, totlvl);
+		}
+		
+		/* XXX: this doesn't cover all the cases */
+		if((gridkey->mask || gridkey->color) && !stored_grids)
+		#pragma omp critical
+		{
 			multires_sync_customdata(me, gridkey, totlvl);
 			stored_grids = CustomData_get_layer(&me->fdata, CD_GRIDS);
 		}





More information about the Bf-blender-cvs mailing list