diff options
author | Daniel J. Ramirez <djrmuv@gmail.com> | 2017-08-28 20:39:45 -0500 |
---|---|---|
committer | Daniel J. Ramirez <djrmuv@gmail.com> | 2017-08-28 20:39:45 -0500 |
commit | 78c3cf6e687a34c36cd0688c42a384601ce338fb (patch) | |
tree | dcd55434c978f1c6a7f62a896f9c4a73863cdb35 /editor/plugins/spatial_editor_plugin.h | |
parent | 9a0ace41b07090b73fbebd9f40b769710159e1cc (diff) |
Better spatial gizmo.
Now it is posible to move spatial nodes along a plane.
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.h')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index b024a8bd93..374861b5e7 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -196,6 +196,9 @@ private: TRANSFORM_X_AXIS, TRANSFORM_Y_AXIS, TRANSFORM_Z_AXIS, + TRANSFORM_YZ, + TRANSFORM_XZ, + TRANSFORM_XY, }; struct EditData { @@ -233,7 +236,7 @@ private: real_t zoom_indicator_delay; - RID move_gizmo_instance[3], rotate_gizmo_instance[3]; + RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[3]; String last_message; String message; @@ -378,8 +381,9 @@ private: bool grid_enable[3]; //should be always visible if true bool grid_enabled; - Ref<ArrayMesh> move_gizmo[3], rotate_gizmo[3]; + Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[3]; Ref<SpatialMaterial> gizmo_color[3]; + Ref<SpatialMaterial> plane_gizmo_color[3]; Ref<SpatialMaterial> gizmo_hl; int over_gizmo_handle; @@ -519,6 +523,7 @@ public: bool are_local_coords_enabled() const { return transform_menu->get_popup()->is_item_checked(transform_menu->get_popup()->get_item_index(SpatialEditor::MENU_TRANSFORM_LOCAL_COORDS)); } Ref<ArrayMesh> get_move_gizmo(int idx) const { return move_gizmo[idx]; } + Ref<ArrayMesh> get_move_plane_gizmo(int idx) const { return move_plane_gizmo[idx]; } Ref<ArrayMesh> get_rotate_gizmo(int idx) const { return rotate_gizmo[idx]; } void update_transform_gizmo(); |