diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-20 15:50:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 15:50:41 +0200 |
commit | 9136f1287e75a0232c54caa32a917bd146ced81b (patch) | |
tree | ea18c1ceaf713d96bf4db24647a11447f2e7fb5d | |
parent | 88ebd710f9a8de2d95c0f9cc90d673bf1d9bed6d (diff) | |
parent | ce15cf8ebc976c63cd19e0024102f67677c8c1ff (diff) |
Merge pull request #22282 from ibrahn/spatial_editor_origin_init
fix branch on uninit in spatial_editor_plugin
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.h | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 6df026843a..fed4362405 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -4418,6 +4418,8 @@ void SpatialEditor::_menu_item_pressed(int p_option) { void SpatialEditor::_init_indicators() { { + origin_enabled = true; + grid_enabled = true; indicator_mat.instance(); indicator_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true); @@ -4458,10 +4460,6 @@ void SpatialEditor::_init_indicators() { VS::get_singleton()->instance_set_layer_mask(origin_instance, 1 << SpatialEditorViewport::GIZMO_GRID_LAYER); VisualServer::get_singleton()->instance_geometry_set_cast_shadows_setting(origin_instance, VS::SHADOW_CASTING_SETTING_OFF); - - origin_enabled = true; - grid_enabled = true; - last_grid_snap = 1; } { diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 0e35ba8517..b7317cd593 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -510,7 +510,6 @@ private: RID grid[3]; RID grid_instance[3]; bool grid_visible[3]; //currently visible - float last_grid_snap; bool grid_enable[3]; //should be always visible if true bool grid_enabled; |