mirror of
https://github.com/godotengine/godot.git
synced 2025-10-29 20:51:14 +00:00
Merge pull request #9099 from kubecz3k/plugin-camera-expose
EditorPlugin can request user inputs from editor 3d view
This commit is contained in:
commit
6b93455b6b
5 changed files with 38 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue