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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-24 14:14:24 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-24 17:01:55 +0300
commitd011ae1e0389c6262acdcc2e14122e913cf226c7 (patch)
tree6bc2b1da774429d53c78bc766a7b62d3b022a313 /source/blender/editors/uvedit/uvedit_ops.c
parentbd64206e1ac828675aad3b16ffe6f4ecc6e6a409 (diff)
Fix T59972: UV live unwrap does not pack islands.
Packing was not being called after multi-object editing changes. Includes code refactoring to make function parameters more clear.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_ops.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index bb56f9f18b0..0a9677834e8 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -4568,6 +4568,8 @@ static int uv_mark_seam_exec(bContext *C, wmOperator *op)
uint objects_len = 0;
Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(view_layer, ((View3D *)NULL), &objects_len);
+ bool changed = false;
+
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
Object *ob = objects[ob_index];
Mesh *me = (Mesh *)ob->data;
@@ -4580,8 +4582,6 @@ static int uv_mark_seam_exec(bContext *C, wmOperator *op)
const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
- bool changed = false;
-
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM (loop, &liter, efa, BM_LOOPS_OF_FACE) {
if (uvedit_edge_select_test(scene, loop, cd_loop_uv_offset)) {
@@ -4592,14 +4592,15 @@ static int uv_mark_seam_exec(bContext *C, wmOperator *op)
}
if (changed) {
- if (scene->toolsettings->edge_mode_live_unwrap) {
- ED_unwrap_lscm(scene, ob, false, false);
- }
-
DEG_id_tag_update(&me->id, 0);
WM_event_add_notifier(C, NC_GEOM | ND_DATA, me);
}
}
+
+ if (changed) {
+ ED_uvedit_live_unwrap(scene, objects, objects_len);
+ }
+
MEM_freeN(objects);
return OPERATOR_FINISHED;