diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-11-04 21:47:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-04 21:47:10 +0100 |
commit | 11076021544cf18687df4f98a37b72d7b3117cf4 (patch) | |
tree | bf8c9400125fc81c48dfc6a79af669b86622ebc2 | |
parent | 121cead38e5ea84ec22139df02eee56d822290b7 (diff) | |
parent | f115f00ec6b93d1f32ad80be08daad60ab39efd0 (diff) |
Merge pull request #22178 from avencherus/scene-change-signal
Allow plugin scene change signal to report null for empty scenes.
-rw-r--r-- | doc/classes/EditorPlugin.xml | 6 | ||||
-rw-r--r-- | editor/editor_plugin.cpp | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index ac139f18c9..0792d556d7 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -453,7 +453,7 @@ <argument index="0" name="screen_name" type="String"> </argument> <description> - Emitted when user change the workspace (2D, 3D, Script, AssetLib). Also works with custom screens defined by plugins. + Emitted when user changes the workspace (2D, 3D, Script, AssetLib). Also works with custom screens defined by plugins. </description> </signal> <signal name="resource_saved"> @@ -466,14 +466,14 @@ <argument index="0" name="scene_root" type="Node"> </argument> <description> - Emitted when user change scene. The argument is a root node of freshly opened scene. + Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be null. </description> </signal> <signal name="scene_closed"> <argument index="0" name="filepath" type="String"> </argument> <description> - Emitted when user close scene. The argument is file path to a closed scene. + Emitted when user closes a scene. The argument is file path to a closed scene. </description> </signal> </signals> diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index dd3a8aa307..86b2db877e 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -475,7 +475,6 @@ void EditorPlugin::set_force_draw_over_forwarding_enabled() { } void EditorPlugin::notify_scene_changed(const Node *scn_root) { - if (scn_root == NULL) return; emit_signal("scene_changed", scn_root); } |