From 16a2e2b9f541d0a9fc3ce4b0845b97aae2529009 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 20 Apr 2023 10:45:11 +0200 Subject: [PATCH] Fix #107156: UV Cylinder/Sphere Projection fails after other operators Caused by 6b8cdd5979. Above commit introduced element tagging for boundary calculations but only cleared them properly on all faces if the new `Preserve Seams` option was chosen. We cannot be sure about the state of element tags from prior operators though, so correct the culprit check to also only be in effect if the new `Preserve Seams` option was chosen. --- source/blender/editors/uvedit/uvedit_unwrap_ops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.cc b/source/blender/editors/uvedit/uvedit_unwrap_ops.cc index bdc90ccecc5..ac367f05b5c 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.cc +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.cc @@ -3181,7 +3181,7 @@ static float uv_sphere_project(const Scene *scene, const float branch_init) { float max_u = 0.0f; - if (BM_elem_flag_test(efa_init, BM_ELEM_TAG)) { + if (use_seams && BM_elem_flag_test(efa_init, BM_ELEM_TAG)) { return max_u; } @@ -3358,7 +3358,7 @@ static float uv_cylinder_project(const Scene *scene, const float branch_init) { float max_u = 0.0f; - if (BM_elem_flag_test(efa_init, BM_ELEM_TAG)) { + if (use_seams && BM_elem_flag_test(efa_init, BM_ELEM_TAG)) { return max_u; } -- 2.30.2