diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-04 05:04:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-04 05:10:26 +0300 |
commit | 98a10fd7de609ca4b026c39c1b3ef3724c60d25e (patch) | |
tree | ac59eb7f98942ef0742d36ccdb4470a5ee983cd7 /source/blender | |
parent | a4530f59d2151ee56c58fdab8e1e202b612fe42e (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_image/image_uv_gizmo_transform_2d.c | 0 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 8 |
2 files changed, 3 insertions, 5 deletions
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 --- /dev/null +++ b/source/blender/editors/space_image/image_uv_gizmo_transform_2d.c 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 ***************************/ |