diff options
author | groud <gilles.roudiere@gmail.com> | 2018-09-18 20:00:07 +0200 |
---|---|---|
committer | groud <gilles.roudiere@gmail.com> | 2018-09-18 20:00:07 +0200 |
commit | 5172642c32900f97a6a81640dd6fcb518a254148 (patch) | |
tree | 820d3dc0c9ad6e6c90ebf48162e2fd069cc4fb30 /editor/plugins/light_occluder_2d_editor_plugin.cpp | |
parent | f148e8eedeb1ff2dcf74d6843d1314d7c6db12a7 (diff) | |
download | redot-engine-5172642c32900f97a6a81640dd6fcb518a254148.tar.gz |
Fixes drawing of the 2D plugins on the 3D view
Diffstat (limited to 'editor/plugins/light_occluder_2d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/light_occluder_2d_editor_plugin.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp index 4f8a307cc1..2f2e1dae81 100644 --- a/editor/plugins/light_occluder_2d_editor_plugin.cpp +++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp @@ -319,13 +319,11 @@ bool LightOccluder2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { return false; } -void LightOccluder2DEditor::forward_draw_over_viewport(Control *p_overlay) { +void LightOccluder2DEditor::forward_canvas_draw_over_viewport(Control *p_overlay) { if (!node || !node->get_occluder_polygon().is_valid()) return; - Control *vpc = canvas_item_editor->get_viewport_control(); - Vector<Vector2> poly; if (wip_active) @@ -353,9 +351,9 @@ void LightOccluder2DEditor::forward_draw_over_viewport(Control *p_overlay) { if (i == poly.size() - 1 && (!node->get_occluder_polygon()->is_closed() || wip_active)) { } else { - vpc->draw_line(point, next_point, col, 2); + p_overlay->draw_line(point, next_point, col, 2); } - vpc->draw_texture(handle, point - handle->get_size() * 0.5); + p_overlay->draw_texture(handle, point - handle->get_size() * 0.5); } } |