diff options
| author | PrzemysÅaw GoÅÄ b (n-pigeon) | 2017-09-21 23:11:56 +0200 |
|---|---|---|
| committer | Przemysław Gołąb (n-pigeon) | 2017-09-26 20:39:41 +0200 |
| commit | aad234d5ac53c03e8c615ebbae64100aa57a0817 (patch) | |
| tree | 0195070cb787bea79646aaa079764ef41b2b0927 /editor/plugins/spatial_editor_plugin.h | |
| parent | 59c3f61d57e745db2eb5ee2eab9c4cac17105f7b (diff) | |
| download | godot-aad234d5ac53c03e8c615ebbae64100aa57a0817.tar.gz godot-aad234d5ac53c03e8c615ebbae64100aa57a0817.tar.zst godot-aad234d5ac53c03e8c615ebbae64100aa57a0817.zip | |
Scale editing Gizmo for Spatial Editor
Added support for axis locked scaling with handles, supports both world and local space. Local space recommended for most editing tasks.
Also fixed some small bugs, polished Gizmo looks and cleaned up some dead code.
Happy scaling! :)
Diffstat (limited to '')
| -rw-r--r-- | editor/plugins/spatial_editor_plugin.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index e0ded6e64..4f4c54004 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -245,7 +245,7 @@ private: real_t zoom_indicator_delay; - RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[3]; + RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[3], scale_gizmo_instance[3]; String last_message; String message; @@ -319,6 +319,7 @@ class SpatialEditorSelectedItem : public Object { public: Rect3 aabb; Transform original; // original location when moving + Transform original_local; Transform last_xform; // last transform Spatial *sp; RID sbox_instance; @@ -407,7 +408,7 @@ private: bool grid_enable[3]; //should be always visible if true bool grid_enabled; - Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[3]; + Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[3], scale_gizmo[3]; Ref<SpatialMaterial> gizmo_color[3]; Ref<SpatialMaterial> plane_gizmo_color[3]; Ref<SpatialMaterial> gizmo_hl; @@ -557,6 +558,7 @@ public: 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]; } + Ref<ArrayMesh> get_scale_gizmo(int idx) const { return scale_gizmo[idx]; } void update_transform_gizmo(); |
