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:
authorChris Blackbourn <chrisbblend@gmail.com>2022-08-17 05:46:57 +0300
committerChris Blackbourn <chrisbblend@gmail.com>2022-08-17 05:47:35 +0300
commit836c07f29c76cd2c2743f72865b22e6fd2e01b03 (patch)
tree6efa6911d95e378c4dd0df8dd18df32b67dc0fd2 /source/blender/editors/sculpt_paint
parent74ea0bee9c0af14ddd2105aafe4b9597885fa3c1 (diff)
UV: grab tool supports live unwrap
Differential Revision: https://developer.blender.org/D15709
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 936fde8ac59..8135da1eb9c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -31,6 +31,7 @@
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_screen.h"
+#include "ED_uvedit.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -579,11 +580,19 @@ static void uv_sculpt_stroke_apply(bContext *C,
copy_v2_v2(luv->uv, sculptdata->uv[uvindex].uv);
}
}
+ SpaceImage *sima = CTX_wm_space_image(C);
+ if (sima->flag & SI_LIVE_UNWRAP) {
+ ED_uvedit_live_unwrap_re_solve();
+ }
}
}
static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op)
{
+ SpaceImage *sima = CTX_wm_space_image(C);
+ if (sima->flag & SI_LIVE_UNWRAP) {
+ ED_uvedit_live_unwrap_end(false);
+ }
UvSculptData *data = op->customdata;
if (data->timer) {
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), data->timer);
@@ -895,6 +904,9 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
}
data->initial_stroke->totalInitialSelected = counter;
+ if (sima->flag & SI_LIVE_UNWRAP) {
+ ED_uvedit_live_unwrap_begin(scene, obedit);
+ }
}
}