diff options
| author | Juan Linietsky | 2014-09-19 18:39:50 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-09-19 18:39:50 -0300 |
| commit | 549d344f0fef5e5748ded69b6a037698ff55f8bc (patch) | |
| tree | a22ee2a3b0d6303fe3e4348831e7f581dd8a0a07 /tools/editor/plugins/spatial_editor_plugin.cpp | |
| parent | 526aae62edfa31aa156d604e8b25caab512c6bff (diff) | |
| download | godot-549d344f0fef5e5748ded69b6a037698ff55f8bc.tar.gz godot-549d344f0fef5e5748ded69b6a037698ff55f8bc.tar.zst godot-549d344f0fef5e5748ded69b6a037698ff55f8bc.zip | |
Fixing Issues...
- #672 (default user:// in $HOME/.godot/app_userdata (linux/osx) and $APPDATA/Godot/app_userdata (Windows)
- #676 (draw both tiles and octants in order from top to bottom, left to right )
- #686 (unicode escape sequences work now)
- #702 (was not a bug, but a test was added to see if bodies went too far away)
Diffstat (limited to 'tools/editor/plugins/spatial_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 95622f72f..a5cddc20e 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -2086,7 +2086,19 @@ void SpatialEditorViewport::_bind_methods(){ } +void SpatialEditorViewport::reset() { + orthogonal=false; + message_time=0; + message=""; + last_message=""; + + cursor.x_rot=0; + cursor.y_rot=0; + cursor.distance=4; + cursor.region_select=false; + +} SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, EditorNode *p_editor, int p_index) { @@ -3272,6 +3284,34 @@ void SpatialEditor::_bind_methods() { } +void SpatialEditor::clear() { + + settings_fov->set_text(EDITOR_DEF("3d_editor/default_fov",60.0)); + settings_znear->set_text(EDITOR_DEF("3d_editor/default_z_near",0.1)); + settings_zfar->set_text(EDITOR_DEF("3d_editor/default_z_far",1500.0)); + + for(int i=0;i<4;i++) { + viewports[i]->reset(); + } + + _menu_item_pressed(MENU_VIEW_USE_1_VIEWPORT); + _menu_item_pressed(MENU_VIEW_DISPLAY_NORMAL); + + + VisualServer::get_singleton()->instance_geometry_set_flag(origin_instance,VS::INSTANCE_FLAG_VISIBLE,true); + view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN), true); + for(int i=0;i<3;++i) { + if (grid_enable[i]) { + VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[i],VS::INSTANCE_FLAG_VISIBLE,true); + grid_visible[i]=true; + } + } + + view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_GRID), true ); + + +} + SpatialEditor::SpatialEditor(EditorNode *p_editor) { @@ -3501,7 +3541,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { settings_zfar->set_anchor( MARGIN_RIGHT, ANCHOR_END ); settings_zfar->set_begin( Point2(15,102) ); settings_zfar->set_end( Point2(15,115) ); - settings_zfar->set_text(EDITOR_DEF("3d_editor/default_z_far",500.0)); + settings_zfar->set_text(EDITOR_DEF("3d_editor/default_z_far",1500.0)); settings_dialog->add_child(settings_zfar); //settings_dialog->get_cancel()->hide(); |
