Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2012-07-22 18:19:06 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-07-22 18:19:06 +0400
commitdc48fcfac0bf50421a9bd3f5684f9853e0c56dc9 (patch)
tree886c065db5b2ea09e576afbcd1d50525c28dd8fd /source/blender/editors/uvedit
parent2b286585af00f76807620797998fee0331d1c5bd (diff)
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.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 5c2e57cf27f..4e0e7944e84 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -118,6 +118,8 @@ typedef struct StitchState {
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 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
}
}
+ /* 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 @@ static int stitch_init(bContext *C, wmOperator *op)
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 @@ void UV_OT_stitch(wmOperatorType *ot)
"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);