[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38445] branches/soc-2011-onion/source/ blender/editors/uvedit/uvedit_unwrap_ops.c: bug fix for subsurf unwrap, looks like I got initialization wrong somehow.
Antony Riakiotakis
kalast at gmail.com
Sun Jul 17 12:22:22 CEST 2011
Revision: 38445
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38445
Author: psy-fi
Date: 2011-07-17 10:22:20 +0000 (Sun, 17 Jul 2011)
Log Message:
-----------
bug fix for subsurf unwrap, looks like I got initialization wrong somehow. This was a hard to guess bug because debug builds and windows builds worked fine, making this impossible to debug. I am still not 100% sure if this is 'supposed' to work(Actually copied my initialization from shrinkwrap.c line 565), though it doesn't crash anymore. Please let me know if anything breaks
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_unwrap_ops.c
Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_unwrap_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_unwrap_ops.c 2011-07-17 09:35:47 UTC (rev 38444)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_unwrap_ops.c 2011-07-17 10:22:20 UTC (rev 38445)
@@ -320,7 +320,7 @@
int i;
/* modifier initialization data, will control what type of subdivision will happen*/
- SubsurfModifierData smd;
+ SubsurfModifierData smd = {{0}};
/* Used to hold subsurfed Mesh */
DerivedMesh *derivedMesh, *initialDerived;
/* holds original indices for subsurfed mesh */
@@ -359,19 +359,11 @@
/* number of subdivisions to perform */
smd.levels = scene->toolsettings->uv_subsurf_level;
- /* no cache here */
- smd.emCache = NULL;
- smd.mCache = NULL;
- /* will not be used here I think */
- smd.renderLevels = 0;
- /* Catmull-Clark subdiv(simple makes no difference, apart from roasting the CPU) */
smd.subdivType = ME_CC_SUBSURF;
- //smd.flags = ;
initialDerived = CDDM_from_editmesh(editMesh, NULL);
-
derivedMesh = subsurf_make_derived_from_derived(initialDerived, &smd, NULL,
- 0, NULL, 1, 1, 0);
+ 0, NULL, 0, 0, 1);
initialDerived->release(initialDerived);
More information about the Bf-blender-cvs
mailing list