From d7f75fab606fece5f7eb083ef6931f75815630fc Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Thu, 4 Aug 2022 13:40:05 +0200 Subject: Remove / Replace old Navigation Debug Visualization - removes / replaces leftovers from old navigation debug code - cleanes SceneTree and ProjectSettings from old navigation debug --- editor/plugins/tiles/tile_data_editors.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index 1dce41e4c7..4d54001b94 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -40,6 +40,10 @@ #include "editor/editor_scale.h" #include "editor/editor_undo_redo_manager.h" +#ifdef DEBUG_ENABLED +#include "servers/navigation_server_3d.h" +#endif // DEBUG_ENABLED + void TileDataEditor::_tile_set_changed_plan_update() { _tile_set_changed_update_needed = true; call_deferred(SNAME("_tile_set_changed_deferred_update")); @@ -2674,7 +2678,9 @@ void TileDataNavigationEditor::_tile_set_changed() { void TileDataNavigationEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - polygon_editor->set_polygons_color(get_tree()->get_debug_navigation_color()); +#ifdef DEBUG_ENABLED + polygon_editor->set_polygons_color(NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_color()); +#endif // DEBUG_ENABLED } break; } } @@ -2701,7 +2707,10 @@ void TileDataNavigationEditor::draw_over_tile(CanvasItem *p_canvas_item, Transfo return; } - Color color = p_canvas_item->get_tree()->get_debug_navigation_color(); + Color color = Color(0.5, 1.0, 1.0, 1.0); +#ifdef DEBUG_ENABLED + color = NavigationServer3D::get_singleton()->get_debug_navigation_geometry_face_color(); +#endif // DEBUG_ENABLED if (p_selected) { Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color"); Color selection_color = Color().from_hsv(Math::fposmod(grid_color.get_h() + 0.5, 1.0), grid_color.get_s(), grid_color.get_v(), 1.0); -- cgit v1.2.3