[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39320] branches/soc-2011-onion/source/ blender/blenkernel/intern/multires.c: Revision: 30917

Jason Wilkins Jason.A.Wilkins at gmail.com
Fri Aug 12 05:45:39 CEST 2011


Revision: 39320
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39320
Author:   jwilkins
Date:     2011-08-12 03:45:38 +0000 (Fri, 12 Aug 2011)
Log Message:
-----------
Revision: 30917
Author: nicholasbishop
Date: 7:15:17 PM, Friday, July 30, 2010
Message:
== Multires ==

* Separate mdisp re-allocation from customdata realloc

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

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c	2011-08-12 03:34:31 UTC (rev 39319)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c	2011-08-12 03:45:38 UTC (rev 39320)
@@ -893,14 +893,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