[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41341] branches/soc-2011-onion-uv-tools/ source/blender/editors/uvedit/uvedit_ops.c: smart stitching
Antony Riakiotakis
kalast at gmail.com
Fri Oct 28 16:19:05 CEST 2011
Revision: 41341
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41341
Author: psy-fi
Date: 2011-10-28 14:19:04 +0000 (Fri, 28 Oct 2011)
Log Message:
-----------
smart stitching
===================
*Static islands no longer get preview faces since they are static.
Modified Paths:
--------------
branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_ops.c
Modified: branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_ops.c 2011-10-28 14:17:27 UTC (rev 41340)
+++ branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_ops.c 2011-10-28 14:19:04 UTC (rev 41341)
@@ -1470,7 +1470,7 @@
mt->uv[element->tfindex][0] += island_stitch_data[i].translation[0];
mt->uv[element->tfindex][1] += island_stitch_data[i].translation[1];
}
- else{
+ else if(efa->tmp.l != -1){
if(efa->v4){
if(state->mode == EDGE_STITCH){
stitch_uv_rotate(island_stitch_data[i].rotation, island_stitch_data[i].medianPoint, &preview->previewQuads[efa->tmp.l + 2*element->tfindex]);
@@ -2197,6 +2197,10 @@
static void stitch_setup_face_preview_for_uv_group(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data){
StitchPreviewer *preview = uv_get_stitch_previewer();
+ /* static island does not change so returning immediately */
+ if(!state->midpoints && state->static_island == element->island)
+ return;
+
if(state->snapIslands){
island_stitch_data[element->island].addedForPreview = 1;
}
@@ -2411,7 +2415,7 @@
}
}
- //printf("st %d, ust %d\n",preview->numOfStitchable, preview->numOfUnstitchable);
+ printf("st %d, ust %d\n",preview->numOfStitchable, preview->numOfUnstitchable);
/*****************************************
* Setup preview for stitchable islands *
*****************************************/
@@ -2604,7 +2608,7 @@
mt->uv[element_iter->tfindex][1] = averageUvPosition[i].uv[1];
uvedit_uv_select(scene, efa, mt, element_iter->tfindex);
- }else {
+ }else if(efa->tmp.l != -1){
if(efa->v4){
*(preview->previewQuads+efa->tmp.l + element_iter->tfindex*2) = averageUvPosition[i].uv[0];
*(preview->previewQuads+efa->tmp.l + element_iter->tfindex*2 + 1) = averageUvPosition[i].uv[1];
@@ -2615,7 +2619,7 @@
}
}
/* end of calculations, keep only the selection flag */
- if(!state->snapIslands){
+ if( (!state->snapIslands) || ((!stitchAtMidpoints) && (element_iter->island == state->static_island))) {
element_iter->flag &= STITCH_SELECTED;
}
}
More information about the Bf-blender-cvs
mailing list