summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-22 11:41:41 +0200
committerGitHub <noreply@github.com>2019-07-22 11:41:41 +0200
commitad616feda261f63bf2dd8ff0951bda58a90711ce (patch)
tree3a36699b05abefda9e89a598251a8a4dd85979c9 /doc
parent411c49b2abdff9daa2bfdc6232b824a6e67fb585 (diff)
parent2acc1e30797fde204e2305cc40b7b9df3a15f247 (diff)
Merge pull request #30659 from henriiquecampos/docs
Add description for EditorSceneImporter, EditorPlugin.enable/disable and EditorInterface.select_file
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/EditorInterface.xml1
-rw-r--r--doc/classes/EditorPlugin.xml54
-rw-r--r--doc/classes/EditorSceneImporter.xml1
3 files changed, 46 insertions, 10 deletions
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 6f07682b04..d55e810c9e 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -166,6 +166,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
+ Selects the file, with the path provided by [code]file[/code], in the FileSystem dock.
</description>
</method>
<method name="set_plugin_enabled">
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index bd9a100267..f03f6f187a 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -167,6 +167,7 @@
<return type="void">
</return>
<description>
+ Called by Godot when the user disables the [EditorPlugin] in the Plugin tab of the project settings window
</description>
</method>
<method name="edit" qualifiers="virtual">
@@ -182,6 +183,7 @@
<return type="void">
</return>
<description>
+ Called by Godot when the user enables the [EditorPlugin] in the Plugin tab of the project settings window
</description>
</method>
<method name="forward_canvas_draw_over_viewport" qualifiers="virtual">
@@ -190,12 +192,6 @@
<argument index="0" name="overlay" type="Control">
</argument>
<description>
- This method is called when there is an input event in the 2D viewport, e.g. the user clicks with the mouse in the 2D space (canvas GUI). Keep in mind that for this method to be called you have to first declare the virtual method [method handles] so the editor knows that you want to work with the workspace:
- [codeblock]
- func handles(object):
- return true
- [/codeblock]
- Also note that the edited scene must have a root node.
</description>
</method>
<method name="forward_canvas_force_draw_over_viewport" qualifiers="virtual">
@@ -212,6 +208,28 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
+ Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes.
+
+ E.g.
+ [codeblock]
+ # Prevents the InputEvent to reach other Editor classes
+ func forward_canvas_gui_input(event):
+ var forward = true
+ return forward
+ [/codeblock]
+
+ Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes.
+
+ E.g.
+ [codeblock]
+ # Consumes InputEventMouseMotion and forwards other InputEvent types
+ func forawrd_canvas_gui_input(event):
+ var forward = false
+ if event is InputEventMouseMotion:
+ forward = true
+ return forward
+ [/codeblock]
+
</description>
</method>
<method name="forward_spatial_gui_input" qualifiers="virtual">
@@ -222,12 +240,28 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- This method is called when there is an input event in the 3D viewport, e.g. the user clicks with the mouse in the 3D space (spatial GUI). Keep in mind that for this method to be called you have to first declare the virtual method [method handles] so the editor knows that you want to work with the workspace:
+ Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes.
+
+ E.g.
+ [codeblock]
+ # Prevents the InputEvent to reach other Editor classes
+ func forward_spatial_gui_input(camera, event):
+ var forward = true
+ return forward
+ [/codeblock]
+
+ Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes.
+
+ E.g.
[codeblock]
- func handles(object):
- return true
+ # Consumes InputEventMouseMotion and forwards other InputEvent types
+ func forawrd_spatial_gui_input(camera, event):
+ var forward = false
+ if event is InputEventMouseMotion:
+ forward = true
+ return forward
[/codeblock]
- Also note that the edited scene must have a root node.
+
</description>
</method>
<method name="get_breakpoints" qualifiers="virtual">
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index 4707543c91..96d8ce698d 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.2">
<brief_description>
+ Imports scenes from third-parties' 3D files.
</brief_description>
<description>
</description>