UV: grab tool supports live unwrap

Differential Revision: https://developer.blender.org/D15709
This commit is contained in:
Chris Blackbourn 2022-08-17 14:46:57 +12:00
parent 74ea0bee9c
commit 836c07f29c
2 changed files with 12 additions and 1 deletions

View File

@ -133,7 +133,6 @@ void EDBM_update(struct Mesh *me, const struct EDBMUpdate_Params *params);
void EDBM_update_extern(struct Mesh *me, bool do_tessellation, bool is_destructive);
/**
*
* A specialized vert map used by stitch operator.
*/
struct UvElementMap *BM_uv_element_map_create(struct BMesh *bm,

View File

@ -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);
}
}
}