Add docs for EditorInterface, EditorPlugin and EditorSceneImporter
This commit is contained in:
parent
60efd67034
commit
c7b0eed757
@ -166,6 +166,7 @@
|
|||||||
<argument index="0" name="file" type="String">
|
<argument index="0" name="file" type="String">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Selects the file, with the path provided by [code]file[/code], in the FileSystem dock.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_plugin_enabled">
|
<method name="set_plugin_enabled">
|
||||||
|
@ -190,12 +190,6 @@
|
|||||||
<argument index="0" name="overlay" type="Control">
|
<argument index="0" name="overlay" type="Control">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="forward_canvas_force_draw_over_viewport" qualifiers="virtual">
|
<method name="forward_canvas_force_draw_over_viewport" qualifiers="virtual">
|
||||||
@ -212,6 +206,28 @@
|
|||||||
<argument index="0" name="event" type="InputEvent">
|
<argument index="0" name="event" type="InputEvent">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="forward_spatial_gui_input" qualifiers="virtual">
|
<method name="forward_spatial_gui_input" qualifiers="virtual">
|
||||||
@ -222,12 +238,28 @@
|
|||||||
<argument index="1" name="event" type="InputEvent">
|
<argument index="1" name="event" type="InputEvent">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<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]
|
[codeblock]
|
||||||
func handles(object):
|
# Prevents the InputEvent to reach other Editor classes
|
||||||
return true
|
func forward_spatial_gui_input(camera, event):
|
||||||
|
var forward = true
|
||||||
|
return forward
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
Also note that the edited scene must have a root node.
|
|
||||||
|
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_spatial_gui_input(camera, event):
|
||||||
|
var forward = false
|
||||||
|
if event is InputEventMouseMotion:
|
||||||
|
forward = true
|
||||||
|
return forward
|
||||||
|
[/codeblock]
|
||||||
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_breakpoints" qualifiers="virtual">
|
<method name="get_breakpoints" qualifiers="virtual">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.2">
|
<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.2">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
Imports scenes from third-parties' 3D files.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
|
Loading…
Reference in New Issue
Block a user