You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
EditorPlugin can request user inputs from editor 3d view
This commit is contained in:
@@ -696,12 +696,19 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
||||
return; //do NONE
|
||||
|
||||
{
|
||||
|
||||
EditorNode *en = editor;
|
||||
EditorPluginList *force_input_forwarding_list = en->get_editor_plugins_force_input_forwarding();
|
||||
if (!force_input_forwarding_list->empty()) {
|
||||
bool discard = force_input_forwarding_list->forward_spatial_gui_input(camera, p_event, true);
|
||||
if (discard)
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
EditorNode *en = editor;
|
||||
EditorPluginList *over_plugin_list = en->get_editor_plugins_over();
|
||||
|
||||
if (!over_plugin_list->empty()) {
|
||||
bool discard = over_plugin_list->forward_spatial_gui_input(camera, p_event);
|
||||
bool discard = over_plugin_list->forward_spatial_gui_input(camera, p_event, false);
|
||||
if (discard)
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user