From 98a10fd7de609ca4b026c39c1b3ef3724c60d25e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Oct 2018 12:04:36 +1000 Subject: Tool System: add UV cursor & transform tools Instead of showing the transform handles for all selections, move this functionality into a tool as done for the 3D view. --- source/blender/editors/space_image/image_uv_gizmo_transform_2d.c | 0 source/blender/editors/space_image/space_image.c | 8 +++----- 2 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 source/blender/editors/space_image/image_uv_gizmo_transform_2d.c (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_uv_gizmo_transform_2d.c b/source/blender/editors/space_image/image_uv_gizmo_transform_2d.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 60431adad0e..21b46dd8000 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -576,7 +576,8 @@ static void IMAGE_GGT_gizmo2d(wmGizmoGroupType *gzgt) gzgt->name = "UV Transform Gizmo"; gzgt->idname = "IMAGE_GGT_gizmo2d"; - gzgt->flag |= WM_GIZMOGROUPTYPE_PERSISTENT; + gzgt->gzmap_params.spaceid = SPACE_IMAGE; + gzgt->gzmap_params.regionid = RGN_TYPE_WINDOW; gzgt->poll = ED_widgetgroup_gizmo2d_poll; gzgt->setup = ED_widgetgroup_gizmo2d_setup; @@ -586,10 +587,7 @@ static void IMAGE_GGT_gizmo2d(wmGizmoGroupType *gzgt) static void image_widgets(void) { - wmGizmoMapType *gzmap_type = WM_gizmomaptype_ensure( - &(const struct wmGizmoMapType_Params){SPACE_IMAGE, RGN_TYPE_WINDOW}); - - WM_gizmogrouptype_append_and_link(gzmap_type, IMAGE_GGT_gizmo2d); + WM_gizmogrouptype_append(IMAGE_GGT_gizmo2d); } /************************** main region ***************************/ -- cgit v1.2.3