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:
authorCampbell Barton <ideasman42@gmail.com>2018-10-19 03:54:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-19 03:54:26 +0300
commit60d7740fe628f5971d09c697c019489778369fb1 (patch)
tree247baaf8bd19d88d37b8427d6bb9d313e178efc9 /source/blender/editors/transform/transform_gizmo_3d.c
parenta30c9f710a64d0adca1597c0d0404713a26a401e (diff)
Tool System: option for transform drag action
See: T57203
Diffstat (limited to 'source/blender/editors/transform/transform_gizmo_3d.c')
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index b2efdcf51cd..921a2090d19 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -44,8 +44,6 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-#include "RNA_access.h"
-
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_curve.h"
@@ -82,6 +80,9 @@
#include "UI_interface.h"
#include "UI_resources.h"
+#include "RNA_access.h"
+#include "RNA_define.h"
+
/* local module include */
#include "transform.h"
@@ -1762,6 +1763,15 @@ void TRANSFORM_GGT_gizmo(wmGizmoGroupType *gzgt)
gzgt->refresh = WIDGETGROUP_gizmo_refresh;
gzgt->message_subscribe = WIDGETGROUP_gizmo_message_subscribe;
gzgt->draw_prepare = WIDGETGROUP_gizmo_draw_prepare;
+
+ static const EnumPropertyItem rna_enum_gizmo_items[] = {
+ {SCE_GIZMO_SHOW_TRANSLATE, "TRANSLATE", 0, "Move", ""},
+ {SCE_GIZMO_SHOW_ROTATE, "ROTATE", 0, "Rotate", ""},
+ {SCE_GIZMO_SHOW_SCALE, "SCALE", 0, "Scale", ""},
+ {0, "NONE", 0, "None", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+ RNA_def_enum(gzgt->srna, "drag_action", rna_enum_gizmo_items, SCE_GIZMO_SHOW_TRANSLATE, "Drag Action", "");
}
/** \} */