[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49114] trunk/blender/source/blender/ editors/uvedit/uvedit_smart_stitch.c: Add property to stitch operator to clear seam flag of stitched edges (on

Antony Riakiotakis kalast at gmail.com
Sun Jul 22 16:19:06 CEST 2012


Revision: 49114
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49114
Author:   psy-fi
Date:     2012-07-22 14:19:06 +0000 (Sun, 22 Jul 2012)
Log Message:
-----------
Add property to stitch operator to clear seam flag of stitched edges (on
by default, since people usually want the layout to be updated).
Motivation has been confused user that tried to use live unwrap
afterwards and found that it would not work as it should.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c

Modified: trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-07-22 13:13:36 UTC (rev 49113)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c	2012-07-22 14:19:06 UTC (rev 49114)
@@ -118,6 +118,8 @@
 	char midpoints;
 	/* editmesh, cached for use in modal handler */
 	BMEditMesh *em;
+	/* clear seams of stitched edges after stitch */
+	char clear_seams;
 	/* element map for getting info about uv connectivity */
 	UvElementMap *element_map;
 	/* edge container */
@@ -833,6 +835,15 @@
 			}
 		}
 
+		/* clear seams of stitched edges */
+		if (final && state->clear_seams) {
+			for (i = 0; i < state->total_boundary_edges; i++) {
+				UvEdge *edge = state->edges + i;
+				if ((state->uvs[edge->uv1]->flag & STITCH_STITCHABLE) && (state->uvs[edge->uv2]->flag & STITCH_STITCHABLE))
+					BM_elem_flag_disable(edge->element->l->e, BM_ELEM_SEAM);
+			}
+		}
+
 		for (i = 0; i < state->selection_size; i++) {
 			UvElement *element = state->selection_stack[i];
 			if (!island_stitch_data[element->island].use_edge_rotation) {
@@ -1004,6 +1015,7 @@
 	state->snap_islands = RNA_boolean_get(op->ptr, "snap_islands");
 	state->static_island = RNA_int_get(op->ptr, "static_island");
 	state->midpoints = RNA_boolean_get(op->ptr, "midpoint_snap");
+	state->clear_seams = RNA_boolean_get(op->ptr, "clear_seams");
 	/* in uv synch selection, all uv's are visible */
 	if (ts->uv_flag & UV_SYNC_SELECTION) {
 		state->element_map = EDBM_uv_element_map_create(state->em, 0, 1);
@@ -1488,6 +1500,8 @@
 	            "Island that stays in place when stitching islands", 0, INT_MAX);
 	RNA_def_boolean(ot->srna, "midpoint_snap", 0, "Snap At Midpoint",
 	                "UVs are stitched at midpoint instead of at static island");
+	RNA_def_boolean(ot->srna, "clear_seams", 1, "Clear Seams",
+	                "Clear seams of stitched edges");
 	prop = RNA_def_collection_runtime(ot->srna, "selection", &RNA_SelectedUvElement, "Selection", "");
 	/* Selection should not be editable or viewed in toolbar */
 	RNA_def_property_flag(prop, PROP_HIDDEN);




More information about the Bf-blender-cvs mailing list