[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38577] branches/soc-2011-onion/source/ blender/editors/uvedit/uvedit_ops.c: smart stitch
Antony Riakiotakis
kalast at gmail.com
Thu Jul 21 19:44:00 CEST 2011
Revision: 38577
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38577
Author: psy-fi
Date: 2011-07-21 17:44:00 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
smart stitch
============================
-Island snapping: One more memory corruption fix. Deselecting an edge not on a previewable island when snapping is on did not clear preview flag.
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c 2011-07-21 17:40:20 UTC (rev 38576)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c 2011-07-21 17:44:00 UTC (rev 38577)
@@ -1858,10 +1858,6 @@
preview->previewOrig[bufferIterator*4 + 2] = mt->uv[(element->tfindex + 1)%nverts][0];
preview->previewOrig[bufferIterator*4 + 3] = mt->uv[(element->tfindex + 1)%nverts][1];
- /* we will have to calculate the rotation of the edges here */
- if(state->snapIslands && element->flag & STITCH_EDGE_STITCHABLE){
- stitch_island_calculate_rotation(element, i, state, uv_average, island_stitch_data);
- }
if(element->flag & STITCH_EDGE_STITCHABLE){
preview->previewOrigColors[bufferIterator*2] = 0x0000FF00;
preview->previewOrigColors[bufferIterator*2 + 1] = 0x0000FF00;
@@ -1871,8 +1867,18 @@
preview->previewOrigColors[bufferIterator*2 + 1] = 0x000000FF;
}
bufferIterator++;
+
+ /* we will have to calculate the rotation of the edges here */
+ if(state->snapIslands && element->flag & STITCH_EDGE_STITCHABLE){
+ stitch_island_calculate_rotation(element, i, state, uv_average, island_stitch_data);
+ }else{
+ /* clear here or it may not be cleared if it's not on a previewable island. Previewable islands get cleared in
+ * stitch_calculate_island_snapping */
+ element->flag = 0;
+ }
}
}
+ /* Clearing flags is VERY important since preview allocation depends on them. Failure to do so could result in crashes */
if(!state->snapIslands){
element->flag = 0;
}
More information about the Bf-blender-cvs
mailing list