diff options
Diffstat (limited to 'doc')
23 files changed, 380 insertions, 54 deletions
diff --git a/doc/classes/@VisualScript.xml b/doc/classes/@VisualScript.xml index 2392e3ecca..fe40bc45e9 100644 --- a/doc/classes/@VisualScript.xml +++ b/doc/classes/@VisualScript.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="@VisualScript" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Built-in visual script functions. </brief_description> <description> + A list of built-in visual script functions, see [VisualScriptBuiltinFunc] and [VisualScript]. </description> <tutorials> </tutorials> diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml index 4ff39390b2..6e11034073 100644 --- a/doc/classes/ARVRAnchor.xml +++ b/doc/classes/ARVRAnchor.xml @@ -34,6 +34,13 @@ Returns true if the anchor is being tracked and false if no anchor with this id is currently known. </description> </method> + <method name="get_plane" qualifiers="const"> + <return type="Plane"> + </return> + <description> + Returns a plane aligned with our anchor, handy for intersection testing + </description> + </method> <method name="get_size" qualifiers="const"> <return type="Vector3"> </return> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index fad9571628..1c2e761b57 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -12,6 +12,20 @@ <demos> </demos> <methods> + <method name="get_anchor_detection_is_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns true if achor detection is enabled (AR only). + </description> + </method> + <method name="get_capabilities" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns a combination of flags providing information about the capabilities of this interface. + </description> + </method> <method name="get_name" qualifiers="const"> <return type="String"> </return> @@ -26,11 +40,11 @@ Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. </description> </method> - <method name="hmd_is_present"> - <return type="bool"> + <method name="get_tracking_status" qualifiers="const"> + <return type="int" enum="ARVRInterface.Tracking_status"> </return> <description> - Returns true if an HMD is available for this interface. + If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking. </description> </method> <method name="initialize"> @@ -51,34 +65,45 @@ Returns true if this interface is active. </description> </method> - <method name="is_installed"> + <method name="is_primary"> <return type="bool"> </return> <description> - Returns true if this interface has been installed. Say your game is designed to work with OpenVR so you are using the OpenVR interface but the user hasn't installed SteamVR, this would return false. + Returns true if this interface is currently the primary interface (the interface responsible for showing the output). </description> </method> - <method name="is_primary"> + <method name="is_stereo"> <return type="bool"> </return> <description> - Returns true if this interface is currently the primary interface (the interface responsible for showing the output). + Returns true if the current output of this interface is in stereo. </description> </method> - <method name="set_is_primary"> + <method name="set_anchor_detection_is_enabled"> <return type="void"> </return> <argument index="0" name="enable" type="bool"> </argument> <description> - Set this interface to the primary interface (unset the old one). + Enables anchor detection, this is used on AR interfaces and enables the extra logic that will detect planes, features, objects, etc. and adds/modifies anchor points. </description> </method> - <method name="supports_hmd"> - <return type="bool"> + <method name="set_is_initialized"> + <return type="void"> + </return> + <argument index="0" name="initialized" type="bool"> + </argument> + <description> + Initialise/uninitilise this interface (same effect as calling intialize/uninitialize). + </description> + </method> + <method name="set_is_primary"> + <return type="void"> </return> + <argument index="0" name="enable" type="bool"> + </argument> <description> - Returns true if this interface supports HMDs and by extension uses stereo scopic rendering. + Set this interface to the primary interface (unset the old one). </description> </method> <method name="uninitialize"> @@ -90,10 +115,32 @@ </method> </methods> <members> - <member name="primary" type="bool" setter="set_is_primary" getter="is_primary"> + <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled"> + On an AR interface, is our anchor detection enabled? + </member> + <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized"> + Has this interface been initialized? + </member> + <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary"> + Is this our primary interface? </member> </members> <constants> + <constant name="ARVR_NONE" value="0"> + No ARVR capabilities. + </constant> + <constant name="ARVR_MONO" value="1"> + This interface can work with normal rendering output (non-HMD based AR). + </constant> + <constant name="ARVR_STEREO" value="2"> + This interface supports stereoscopic rendering. + </constant> + <constant name="ARVR_AR" value="4"> + This interface support AR (video background and real world tracking). + </constant> + <constant name="ARVR_EXTERNAL" value="8"> + This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_recommended_render_targetsize. Using a seperate viewport node frees up the main viewport for other purposes. + </constant> <constant name="EYE_MONO" value="0"> Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. </constant> @@ -103,5 +150,20 @@ <constant name="EYE_RIGHT" value="2"> Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information. </constant> + <constant name="ARVR_NORMAL_TRACKING" value="0"> + Tracking is behaving as expected. + </constant> + <constant name="ARVR_EXCESSIVE_MOTION" value="1"> + Tracking is hindered by excessive motion, player is moving faster then tracking can keep up. + </constant> + <constant name="ARVR_INSUFFICIENT_FEATURES" value="2"> + Tracking is hindered by insufficient features, it's too dark (for camera based tracking), player is blocked, etc. + </constant> + <constant name="ARVR_UNKNOWN_TRACKING" value="3"> + We don't know the status of the tracking or this interface does not provide feedback. + </constant> + <constant name="ARVR_NOT_TRACKING" value="4"> + Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.) + </constant> </constants> </class> diff --git a/doc/classes/ARVRScriptInterface.xml b/doc/classes/ARVRScriptInterface.xml index 54415539e0..182147a015 100644 --- a/doc/classes/ARVRScriptInterface.xml +++ b/doc/classes/ARVRScriptInterface.xml @@ -29,6 +29,20 @@ Outputs a finished render buffer to the AR/VR device for the given eye. </description> </method> + <method name="get_anchor_detection_is_enabled" qualifiers="virtual"> + <return type="bool"> + </return> + <description> + Returns true if achor detection is enabled (AR only). + </description> + </method> + <method name="get_capabilities" qualifiers="virtual"> + <return type="int"> + </return> + <description> + Returns a combination of flags providing information about the capabilities of this interface. + </description> + </method> <method name="get_recommended_render_targetsize" qualifiers="virtual"> <return type="Vector2"> </return> @@ -36,6 +50,13 @@ Returns the size at which we should render our scene to get optimal quality on the output device. </description> </method> + <method name="get_tracking_status" qualifiers="virtual"> + <return type="int"> + </return> + <description> + If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking. + </description> + </method> <method name="get_transform_for_eye" qualifiers="virtual"> <return type="Transform"> </return> @@ -47,13 +68,6 @@ Get the location and orientation transform used when rendering a specific eye. </description> </method> - <method name="hmd_is_present" qualifiers="virtual"> - <return type="bool"> - </return> - <description> - Return true is an HMD is available. - </description> - </method> <method name="initialize" qualifiers="virtual"> <return type="bool"> </return> @@ -68,13 +82,6 @@ Returns true if this interface has been initialized and is active. </description> </method> - <method name="is_installed" qualifiers="virtual"> - <return type="bool"> - </return> - <description> - Returns true if the required middleware is installed. - </description> - </method> <method name="is_stereo" qualifiers="virtual"> <return type="bool"> </return> @@ -89,11 +96,13 @@ Gets called before rendering each frame so tracking data gets updated in time. </description> </method> - <method name="supports_hmd" qualifiers="virtual"> - <return type="bool"> + <method name="set_anchor_detection_is_enabled" qualifiers="virtual"> + <return type="void"> </return> + <argument index="0" name="enabled" type="bool"> + </argument> <description> - Returns true if this interface supports HMDs. + Enables anchor detection, this is used on AR interfaces and enables the extra logic that will detect planes, features, objects, etc. and adds/modifies anchor points. </description> </method> <method name="uninitialize" qualifiers="virtual"> diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index 282f25bec9..6a7262bd14 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -20,6 +20,22 @@ Mostly exposed for GDNative based interfaces, this is called to register an available interface with the AR/VR server. </description> </method> + <method name="center_on_hmd"> + <return type="void"> + </return> + <argument index="0" name="ignore_tilt" type="bool"> + </argument> + <argument index="1" name="keep_height" type="bool"> + </argument> + <description> + This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently. + For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world. + For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera. + This method allows you to center our tracker on the location of the HMD, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world. + For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game. + You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism. + </description> + </method> <method name="find_interface" qualifiers="const"> <return type="ARVRInterface"> </return> @@ -84,22 +100,6 @@ Removes a registered interface, again exposed mostly for GDNative based interfaces. </description> </method> - <method name="request_reference_frame"> - <return type="void"> - </return> - <argument index="0" name="ignore_tilt" type="bool"> - </argument> - <argument index="1" name="keep_height" type="bool"> - </argument> - <description> - This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently. - For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world. - For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera. - This method allows you to create a reference frame, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world. - For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game. - You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism. - </description> - </method> <method name="set_primary_interface"> <return type="void"> </return> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 65200c4769..d411d07979 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -326,6 +326,7 @@ <return type="int"> </return> <description> + Returns the amount of static memory being used by the program in bytes. </description> </method> <method name="get_system_dir" qualifiers="const"> @@ -340,6 +341,7 @@ <return type="int"> </return> <description> + Returns the epoch time of the operating system in seconds. </description> </method> <method name="get_ticks_msec" qualifiers="const"> @@ -435,6 +437,9 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if the build is a debug build. + Returns [code]true[/code] when running in the editor. + Returns [code]false[/code] if the build is a release build. </description> </method> <method name="is_in_low_processor_usage_mode" qualifiers="const"> @@ -472,10 +477,18 @@ Return true if the engine was executed with -v (verbose stdout). </description> </method> + <method name="is_userfs_persistent" qualifiers="const"> + <return type="bool"> + </return> + <description> + If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable. + </description> + </method> <method name="is_vsync_enabled" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if synchronizing the framerate to the monitor's refresh rate is enabled. </description> </method> <method name="is_window_fullscreen" qualifiers="const"> @@ -688,6 +701,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + If [code]true[/code] the framerate will synchronize to the monitor's refresh rate. </description> </method> <method name="set_window_fullscreen"> diff --git a/doc/classes/RegEx.xml b/doc/classes/RegEx.xml index 626f8f1a93..4577672c72 100644 --- a/doc/classes/RegEx.xml +++ b/doc/classes/RegEx.xml @@ -5,7 +5,7 @@ </brief_description> <description> Class for finding text patterns in a string using regular expressions. It can not perform replacements. Regular expressions are a way to define patterns of text to be searched. Details on writing patterns are too long to explain here but the Internet is full of tutorials and detailed explanations. - Once created, the RegEx object needs to be compiled with the pattern before it can be used. The pattern must be escaped first for gdscript before it is escaped for the expression. For example: + Once created, the RegEx object needs to be compiled with the search pattern before it can be used. The search pattern must be escaped first for gdscript before it is escaped for the expression. For example: [code]var exp = RegEx.new()[/code] [code]exp.compile("\\d+")[/code] would be read by RegEx as [code]\d+[/code] @@ -47,7 +47,7 @@ <argument index="0" name="pattern" type="String"> </argument> <description> - Compiles and assign the regular expression pattern to use. + Compiles and assign the search pattern to use. </description> </method> <method name="get_group_count" qualifiers="const"> @@ -68,14 +68,14 @@ <return type="String"> </return> <description> - Returns the expression used to compile the code. + Returns the search pattern used to compile the code. </description> </method> <method name="is_valid" qualifiers="const"> <return type="bool"> </return> <description> - Returns whether this object has a valid regular expression assigned. + Returns whether this object has a valid search pattern assigned. </description> </method> <method name="search" qualifiers="const"> @@ -88,7 +88,7 @@ <argument index="2" name="end" type="int" default="-1"> </argument> <description> - Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching reult if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be. + Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching result if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be. </description> </method> <method name="sub" qualifiers="const"> diff --git a/doc/classes/RegExMatch.xml b/doc/classes/RegExMatch.xml index 9e021ed6c8..abf2e383d5 100644 --- a/doc/classes/RegExMatch.xml +++ b/doc/classes/RegExMatch.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RegExMatch" inherits="Reference" category="Core" version="3.0.alpha.custom_build"> <brief_description> + Contains the results of a regex search. </brief_description> <description> + Contains the results of a regex search. [method RegEx.search] returns an instance of [code]RegExMatch[/code] if it finds the search pattern in the [source] string. </description> <tutorials> </tutorials> @@ -15,7 +17,7 @@ <argument index="0" name="name" type="Variant" default="0"> </argument> <description> - Returns the end position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + Returns the end position of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). </description> </method> <method name="get_group_count" qualifiers="const"> @@ -38,7 +40,7 @@ <argument index="0" name="name" type="Variant" default="0"> </argument> <description> - Returns the starting position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + Returns the starting position of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). </description> </method> <method name="get_string" qualifiers="const"> @@ -47,19 +49,21 @@ <argument index="0" name="name" type="Variant" default="0"> </argument> <description> - Returns the result of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + Returns the result of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). </description> </method> <method name="get_strings" qualifiers="const"> <return type="Array"> </return> <description> + Returns an [Array] of the matches in the [source] string. </description> </method> <method name="get_subject" qualifiers="const"> <return type="String"> </return> <description> + Returns the [source] string used with the search pattern to find this matching result. </description> </method> </methods> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 57e417974e..bac7d1e3b0 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -156,6 +156,15 @@ Set the video stream for this player. </description> </method> + <method name="set_stream_position"> + <return type="void"> + </return> + <argument index="0" name="position" type="float"> + </argument> + <description> + Set the current position of the stream, in seconds. + </description> + </method> <method name="set_volume"> <return type="void"> </return> diff --git a/doc/classes/VisualScript.xml b/doc/classes/VisualScript.xml index 6473b074d3..e44547cd8f 100644 --- a/doc/classes/VisualScript.xml +++ b/doc/classes/VisualScript.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScript" inherits="Script" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A script implemented in the Visual Script programming environment. </brief_description> <description> + A script implemented in the Visual Script programming environment. The script exends the functionality of all objects that instance it. + [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. + You are most likely to use this class via the Visual Script editor or when writing plugins for it. </description> <tutorials> </tutorials> @@ -15,6 +19,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Add a custom signal with the specified name to the VisualScript. </description> </method> <method name="add_function"> @@ -23,6 +28,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Add a function with the specified name to the VisualScript. </description> </method> <method name="add_node"> @@ -37,6 +43,7 @@ <argument index="3" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> + Add a node to a function of the VisualScript. </description> </method> <method name="add_variable"> @@ -49,6 +56,7 @@ <argument index="2" name="export" type="bool" default="false"> </argument> <description> + Add a variable to the VisualScript, optionally giving it a default value or marking it as exported. </description> </method> <method name="custom_signal_add_argument"> @@ -63,6 +71,7 @@ <argument index="3" name="index" type="int" default="-1"> </argument> <description> + Add an argument to a custom signal added with [method add_custom_signal]. </description> </method> <method name="custom_signal_get_argument_count" qualifiers="const"> @@ -71,6 +80,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Get the count of a custom signal's arguments. </description> </method> <method name="custom_signal_get_argument_name" qualifiers="const"> @@ -81,6 +91,7 @@ <argument index="1" name="argidx" type="int"> </argument> <description> + Get the name of a custom signal's argument. </description> </method> <method name="custom_signal_get_argument_type" qualifiers="const"> @@ -91,6 +102,7 @@ <argument index="1" name="argidx" type="int"> </argument> <description> + Get the type of a custom signal's argument. </description> </method> <method name="custom_signal_remove_argument"> @@ -101,6 +113,7 @@ <argument index="1" name="argidx" type="int"> </argument> <description> + Remove a specific custom signal's argument. </description> </method> <method name="custom_signal_set_argument_name"> @@ -113,6 +126,7 @@ <argument index="2" name="argname" type="String"> </argument> <description> + Rename a custom signal's argument. </description> </method> <method name="custom_signal_set_argument_type"> @@ -125,6 +139,7 @@ <argument index="2" name="type" type="int" enum="Variant.Type"> </argument> <description> + Change the type of a custom signal's argument. </description> </method> <method name="custom_signal_swap_argument"> @@ -137,6 +152,7 @@ <argument index="2" name="withidx" type="int"> </argument> <description> + Swap two of the arguments of a custom signal. </description> </method> <method name="data_connect"> @@ -153,6 +169,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Connect two data ports. The value of [code]from_node[/code]'s [code]from_port[/code] would be fed into [code]to_node[/code]'s [code]to_port[/code]. </description> </method> <method name="data_disconnect"> @@ -169,6 +186,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Disconnect two data ports previously connected with [method data_connect]. </description> </method> <method name="get_function_node_id" qualifiers="const"> @@ -177,6 +195,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the id of a function's entry point node. </description> </method> <method name="get_function_scroll" qualifiers="const"> @@ -185,6 +204,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the position of the center of the screen for a given function. </description> </method> <method name="get_node" qualifiers="const"> @@ -195,6 +215,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Returns a node given its id and its function. </description> </method> <method name="get_node_position" qualifiers="const"> @@ -205,6 +226,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Returns a node's position in pixels. </description> </method> <method name="get_variable_default_value" qualifiers="const"> @@ -213,6 +235,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the default (initial) value of a variable. </description> </method> <method name="get_variable_export" qualifiers="const"> @@ -221,6 +244,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns whether a variable is exported. </description> </method> <method name="get_variable_info" qualifiers="const"> @@ -229,6 +253,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the info for a given variable as a dictionary. The information includes its name, type, hint and usage. </description> </method> <method name="has_custom_signal" qualifiers="const"> @@ -237,6 +262,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns whether a signal exists with the specified name. </description> </method> <method name="has_data_connection" qualifiers="const"> @@ -253,6 +279,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Returns whether the specified data ports are connected. </description> </method> <method name="has_function" qualifiers="const"> @@ -261,6 +288,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns whether a function exists with the specified name. </description> </method> <method name="has_node" qualifiers="const"> @@ -271,6 +299,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Returns whether a node exists with the given id. </description> </method> <method name="has_sequence_connection" qualifiers="const"> @@ -285,6 +314,7 @@ <argument index="3" name="to_node" type="int"> </argument> <description> + Returns whether the specified sequence ports are connected. </description> </method> <method name="has_variable" qualifiers="const"> @@ -293,6 +323,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns whether a variable exists with the specified name. </description> </method> <method name="remove_custom_signal"> @@ -301,6 +332,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Remove a custom signal with the given name. </description> </method> <method name="remove_function"> @@ -309,6 +341,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Remove a specific function and its nodes from the script. </description> </method> <method name="remove_node"> @@ -319,6 +352,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Remove a specific node. </description> </method> <method name="remove_variable"> @@ -327,6 +361,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Remove a variable with the given name. </description> </method> <method name="rename_custom_signal"> @@ -337,6 +372,7 @@ <argument index="1" name="new_name" type="String"> </argument> <description> + Change the name of a custom signal. </description> </method> <method name="rename_function"> @@ -347,6 +383,7 @@ <argument index="1" name="new_name" type="String"> </argument> <description> + Change the name of a function. </description> </method> <method name="rename_variable"> @@ -357,6 +394,7 @@ <argument index="1" name="new_name" type="String"> </argument> <description> + Change the name of a variable. </description> </method> <method name="sequence_connect"> @@ -371,6 +409,8 @@ <argument index="3" name="to_node" type="int"> </argument> <description> + Connect two sequence ports. The execution will flow from of [code]from_node[/code]'s [code]from_output[/code] into [code]to_node[/code]. + Unlike [method data_connect], there isn't a [code]to_port[/code], since the target node can have only one sequence port. </description> </method> <method name="sequence_disconnect"> @@ -385,6 +425,7 @@ <argument index="3" name="to_node" type="int"> </argument> <description> + Disconnect two sequence ports previously connected with [method sequence_connect]. </description> </method> <method name="set_function_scroll"> @@ -395,6 +436,7 @@ <argument index="1" name="ofs" type="Vector2"> </argument> <description> + Position the center of the screen for a function. </description> </method> <method name="set_instance_base_type"> @@ -403,6 +445,7 @@ <argument index="0" name="type" type="String"> </argument> <description> + Set the base type of the script. </description> </method> <method name="set_node_position"> @@ -415,6 +458,7 @@ <argument index="2" name="position" type="Vector2"> </argument> <description> + Position a node on the screen. </description> </method> <method name="set_variable_default_value"> @@ -425,6 +469,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Change the default (initial) value of a variable. </description> </method> <method name="set_variable_export"> @@ -435,6 +480,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Change whether a variable is exported. </description> </method> <method name="set_variable_info"> @@ -445,6 +491,7 @@ <argument index="1" name="value" type="Dictionary"> </argument> <description> + Set a variable's info, using the same format as [method get_variable_info]. </description> </method> </methods> @@ -459,6 +506,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Emitted when the ports of a node are changed. </description> </signal> </signals> diff --git a/doc/classes/VisualScriptBasicTypeConstant.xml b/doc/classes/VisualScriptBasicTypeConstant.xml index 5b066f9925..cc09815481 100644 --- a/doc/classes/VisualScriptBasicTypeConstant.xml +++ b/doc/classes/VisualScriptBasicTypeConstant.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node representing a constant from the base types. </brief_description> <description> + A Visual Script node representing a constant from base types, such as [Vector3.AXIS_X]. </description> <tutorials> </tutorials> @@ -40,8 +42,10 @@ </methods> <members> <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> + The type to get the constant from. </member> <member name="constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant"> + The name of the constant to return. </member> </members> <constants> diff --git a/doc/classes/VisualScriptBuiltinFunc.xml b/doc/classes/VisualScriptBuiltinFunc.xml index a88633749e..f48f5a5308 100644 --- a/doc/classes/VisualScriptBuiltinFunc.xml +++ b/doc/classes/VisualScriptBuiltinFunc.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node used to call built-in functions. </brief_description> <description> + A built-in function used inside a [VisualScript]. It is usually a math function or an utility function. + See also [@GDScript], for the same functions in the GDScript language. </description> <tutorials> </tutorials> @@ -26,124 +29,183 @@ </methods> <members> <member name="function" type="int" setter="set_func" getter="get_func" enum="VisualScriptBuiltinFunc.BuiltinFunc"> + The function to be executed. </member> </members> <constants> <constant name="MATH_SIN" value="0"> + Return the sine of the input. </constant> <constant name="MATH_COS" value="1"> + Return the cosine of the input. </constant> <constant name="MATH_TAN" value="2"> + Return the tangent of the input. </constant> <constant name="MATH_SINH" value="3"> + Return the hyperbolic sine of the input. </constant> <constant name="MATH_COSH" value="4"> + Return the hyperbolic cosine of the input. </constant> <constant name="MATH_TANH" value="5"> + Return the hyperbolic tangent of the input. </constant> <constant name="MATH_ASIN" value="6"> + Return the arc sine of the input. </constant> <constant name="MATH_ACOS" value="7"> + Return the arc cosine of the input. </constant> <constant name="MATH_ATAN" value="8"> + Return the arc tangent of the input. </constant> <constant name="MATH_ATAN2" value="9"> + Return the arc tangent of the input, using the signs of both parameters to determine the exact angle. </constant> <constant name="MATH_SQRT" value="10"> + Return the square root of the input. </constant> <constant name="MATH_FMOD" value="11"> + Return the remainder of one input divided by the other, using floating-point numbers. </constant> <constant name="MATH_FPOSMOD" value="12"> + Return the positive remainder of one input divided by the other, using floating-point numbers. </constant> <constant name="MATH_FLOOR" value="13"> + Return the input rounded down. </constant> <constant name="MATH_CEIL" value="14"> + Return the input rounded up. </constant> <constant name="MATH_ROUND" value="15"> + Return the input rounded to the nearest integer. </constant> <constant name="MATH_ABS" value="16"> + Return the absolute value of the input. </constant> <constant name="MATH_SIGN" value="17"> + Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative. </constant> <constant name="MATH_POW" value="18"> + Return the input raised to a given power. </constant> <constant name="MATH_LOG" value="19"> + Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use. </constant> <constant name="MATH_EXP" value="20"> + Return [b]e[/b] raised to the power of the input. [b]e[/b] sometimes called "Euler's number" is a mathematical constant whose value is approximately 2.71828. </constant> <constant name="MATH_ISNAN" value="21"> + Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist. </constant> <constant name="MATH_ISINF" value="22"> + Return whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist. </constant> <constant name="MATH_EASE" value="23"> + Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. </constant> <constant name="MATH_DECIMALS" value="24"> + Return the number of digit places after the decimal that the first non-zero digit occurs. </constant> <constant name="MATH_STEPIFY" value="25"> + Return the input snapped to a given step. </constant> <constant name="MATH_LERP" value="26"> + Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula [code]a + (a - b) * t[/code]. </constant> <constant name="MATH_DECTIME" value="27"> + Return the result of 'value' decreased by 'step' * 'amount'. </constant> <constant name="MATH_RANDOMIZE" value="28"> + Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. </constant> <constant name="MATH_RAND" value="29"> + Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function. </constant> <constant name="MATH_RANDF" value="30"> + Return a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication. </constant> <constant name="MATH_RANDOM" value="31"> + Return a random floating-point value between the two inputs. </constant> <constant name="MATH_SEED" value="32"> + Set the seed for the random number generator. </constant> <constant name="MATH_RANDSEED" value="33"> + Return a random value from the given seed, along with the new seed. </constant> <constant name="MATH_DEG2RAD" value="34"> + Convert the input from degrees to radians. </constant> <constant name="MATH_RAD2DEG" value="35"> + Convert the input from radians to degrees. </constant> <constant name="MATH_LINEAR2DB" value="36"> + Convert the input from linear volume to decibel volume. </constant> <constant name="MATH_DB2LINEAR" value="37"> + Convert the input from decibel volume to linear volume. </constant> <constant name="LOGIC_MAX" value="38"> + Return the greater of the two numbers, also known as their maximum. </constant> <constant name="LOGIC_MIN" value="39"> + Return the lesser of the two numbers, also known as their minimum. </constant> <constant name="LOGIC_CLAMP" value="40"> + Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to `min(max(input, range_low), range_high)` </constant> <constant name="LOGIC_NEAREST_PO2" value="41"> + Return the nearest power of 2 to the input. </constant> <constant name="OBJ_WEAKREF" value="42"> + Create a [WeakRef] from the input. </constant> <constant name="FUNC_FUNCREF" value="43"> + Create a [FuncRef] from the input. </constant> <constant name="TYPE_CONVERT" value="44"> + Convert between types. </constant> <constant name="TYPE_OF" value="45"> + Return the type of the input as an integer. Check [enum Variant.Type] for the integers that might be returned. </constant> <constant name="TYPE_EXISTS" value="46"> + Checks if a type is registered in the [ClassDB]. </constant> <constant name="TEXT_CHAR" value="47"> + Return a character with the given ascii value. </constant> <constant name="TEXT_STR" value="48"> + Convert the input to a string. </constant> <constant name="TEXT_PRINT" value="49"> + Print the given string to the output window. </constant> <constant name="TEXT_PRINTERR" value="50"> + Print the given string to the standard error output. </constant> <constant name="TEXT_PRINTRAW" value="51"> + Print the given string to the standard output, without adding a newline. </constant> <constant name="VAR_TO_STR" value="52"> + Serialize a [Variant] to a string. </constant> <constant name="STR_TO_VAR" value="53"> + Deserialize a [Variant] from a string serialized using [VAR_TO_STR]. </constant> <constant name="VAR_TO_BYTES" value="54"> + Serialize a [Variant] to a [PoolByteArray]. </constant> <constant name="BYTES_TO_VAR" value="55"> + Deserialize a [Variant] from a [PoolByteArray] serialized using [VAR_TO_BYTES]. </constant> <constant name="COLORN" value="56"> + Return the [Color] with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc. </constant> <constant name="FUNC_MAX" value="57"> + The maximum value the [member function] property can have. </constant> </constants> </class> diff --git a/doc/classes/VisualScriptClassConstant.xml b/doc/classes/VisualScriptClassConstant.xml index 5e43b4972c..70e7de5dd9 100644 --- a/doc/classes/VisualScriptClassConstant.xml +++ b/doc/classes/VisualScriptClassConstant.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node representing a constant from a class. </brief_description> <description> + A Visual Script node representing a constant from the classes, such as [@GlobalScope.TYPE_INT]. </description> <tutorials> </tutorials> @@ -40,8 +42,10 @@ </methods> <members> <member name="base_type" type="String" setter="set_base_type" getter="get_base_type"> + The type to get the constant from. </member> <member name="constant" type="String" setter="set_class_constant" getter="get_class_constant"> + The name of the constant to return. </member> </members> <constants> diff --git a/doc/classes/VisualScriptComment.xml b/doc/classes/VisualScriptComment.xml index be4eefd775..da65998e78 100644 --- a/doc/classes/VisualScriptComment.xml +++ b/doc/classes/VisualScriptComment.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node used to store information for the developer. </brief_description> <description> + A Visual Script node used to display text, so that code is more readable and better documented. + Comment nodes can be resized so they encompass a group of nodes. </description> <tutorials> </tutorials> @@ -54,10 +57,13 @@ </methods> <members> <member name="description" type="String" setter="set_description" getter="get_description"> + The text inside the comment node. </member> <member name="size" type="Vector2" setter="set_size" getter="get_size"> + The size (in pixels) of the comment node. </member> <member name="title" type="String" setter="set_title" getter="get_title"> + The title of the comment node. </member> </members> <constants> diff --git a/doc/classes/VisualScriptCondition.xml b/doc/classes/VisualScriptCondition.xml index 73f1b69c02..de814a6b17 100644 --- a/doc/classes/VisualScriptCondition.xml +++ b/doc/classes/VisualScriptCondition.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which branches the flow. </brief_description> <description> + A Visual Script node which switches the flow based on a boolean. It acts similar to if/else in typical programming languages. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualScriptConstant.xml b/doc/classes/VisualScriptConstant.xml index b0af3bda98..508087a928 100644 --- a/doc/classes/VisualScriptConstant.xml +++ b/doc/classes/VisualScriptConstant.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which returns a constant value. </brief_description> <description> + A Visual Script node which returns the specified constant value. </description> <tutorials> </tutorials> @@ -40,8 +42,10 @@ </methods> <members> <member name="type" type="int" setter="set_constant_type" getter="get_constant_type" enum="Variant.Type"> + The constant's type. </member> <member name="value" type="Variant" setter="set_constant_value" getter="get_constant_value"> + The constant's value. </member> </members> <constants> diff --git a/doc/classes/VisualScriptConstructor.xml b/doc/classes/VisualScriptConstructor.xml index e8afd36b9c..3b1fc5e385 100644 --- a/doc/classes/VisualScriptConstructor.xml +++ b/doc/classes/VisualScriptConstructor.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which calls a base type constructor. </brief_description> <description> + A Visual Script node which calls a base type constructor. It can be used for type conversion as well. </description> <tutorials> </tutorials> @@ -40,8 +42,26 @@ </methods> <members> <member name="constructor" type="Dictionary" setter="set_constructor" getter="get_constructor"> + The constructor function's method info. Has roughly the following structure: + [codeblock] + { + name = "string", + args = [{ + name = "string" + class_name = "string" + type = TYPE_* + hint = PROPERTY_HINT_* + hint_string = "string" + }] + default_args = [] # Array of variants + flags = METHOD_FLAG_* + id = 0 + return = {type = TYPE_*} + } + [/codeblock] </member> <member name="type" type="int" setter="set_constructor_type" getter="get_constructor_type" enum="Variant.Type"> + The type to be constructed. </member> </members> <constants> diff --git a/doc/classes/VisualScriptCustomNode.xml b/doc/classes/VisualScriptCustomNode.xml index ec442e993c..e321c8854a 100644 --- a/doc/classes/VisualScriptCustomNode.xml +++ b/doc/classes/VisualScriptCustomNode.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A scripted Visual Script node. </brief_description> <description> + A custom Visual Script node which can be scripted in powerful ways. </description> <tutorials> </tutorials> @@ -13,18 +15,21 @@ <return type="String"> </return> <description> + Return the node's title. </description> </method> <method name="_get_category" qualifiers="virtual"> <return type="String"> </return> <description> + Return the node's category. </description> </method> <method name="_get_input_value_port_count" qualifiers="virtual"> <return type="int"> </return> <description> + Return the count of input value ports. </description> </method> <method name="_get_input_value_port_name" qualifiers="virtual"> @@ -33,6 +38,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified input port's name. </description> </method> <method name="_get_input_value_port_type" qualifiers="virtual"> @@ -41,12 +47,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified input port's type. See the TYPE_* enum in [@GlobalScope]. </description> </method> <method name="_get_output_sequence_port_count" qualifiers="virtual"> <return type="int"> </return> <description> + Return the amount of output [b]sequence[/b] ports. </description> </method> <method name="_get_output_sequence_port_text" qualifiers="virtual"> @@ -55,12 +63,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified [b]sequence[/b] output's name. </description> </method> <method name="_get_output_value_port_count" qualifiers="virtual"> <return type="int"> </return> <description> + Return the amount of output value ports. </description> </method> <method name="_get_output_value_port_name" qualifiers="virtual"> @@ -69,6 +79,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified output's name. </description> </method> <method name="_get_output_value_port_type" qualifiers="virtual"> @@ -77,24 +88,28 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Return the specified output's type. See the TYPE_* enum in [@GlobalScope]. </description> </method> <method name="_get_text" qualifiers="virtual"> <return type="String"> </return> <description> + Return the custom node's text, which is shown right next to the input [b]sequence[/b] port (if there is none, on the place that is usually taken by it). </description> </method> <method name="_get_working_memory_size" qualifiers="virtual"> <return type="int"> </return> <description> + Return the size of the custom node's working memory. See [method _step] for more details. </description> </method> <method name="_has_input_sequence_port" qualifiers="virtual"> <return type="bool"> </return> <description> + Return whether the custom node has an input [b]sequence[/b] port. </description> </method> <method name="_step" qualifiers="virtual"> @@ -109,25 +124,42 @@ <argument index="3" name="working_mem" type="Array"> </argument> <description> + Execute the custom node's logic, returning the index of the output sequence port to use or a [String] when there is an error. + + The [code]inputs[/code] array contains the values of the input ports. + [code]outputs[/code] is an array whose indices should be set to the respective outputs. + The [code]start_mode[/code] is usually [code]START_MODE_BEGIN_SEQUENCE[/code], unless you have used the STEP_* constants. + [code]working_mem[/code] is an array which can be used to persist information between runs of the custom node. + + When returning, you can mask the returned value with one of the STEP_* constants. </description> </method> </methods> <constants> <constant name="START_MODE_BEGIN_SEQUENCE" value="0"> + The start mode used the first time when [method _step] is called. </constant> <constant name="START_MODE_CONTINUE_SEQUENCE" value="1"> + The start mode used when [method _step] is called after coming back from a STEP_PUSH_STACK_BIT. </constant> <constant name="START_MODE_RESUME_YIELD" value="2"> + The start mode used when [method _step] is called after resuming from STEP_YIELD_BIT. </constant> <constant name="STEP_PUSH_STACK_BIT" value="16777216" enum=""> + Hint used by [method _step] to tell that control should return to it when there is no other node left to execute. + This is used by [VisualScriptCondition] to redirect the sequence to the "Done" port after the true/false branch has finished execution. </constant> <constant name="STEP_GO_BACK_BIT" value="33554432" enum=""> + Hint used by [method _step] to tell that control should return back, either hitting a previous STEP_PUSH_STACK_BIT or exiting the function. </constant> <constant name="STEP_NO_ADVANCE_BIT" value="67108864" enum=""> </constant> <constant name="STEP_EXIT_FUNCTION_BIT" value="134217728" enum=""> + Hint used by [method _step] to tell that control should stop and exit the function. </constant> <constant name="STEP_YIELD_BIT" value="268435456" enum=""> + Hint used by [method _step] to tell that the function should be yielded. + Using this requires you to have at least one working memory slot, which is used for the [VisualScriptFunctionState]. </constant> </constants> </class> diff --git a/doc/classes/VisualScriptDeconstruct.xml b/doc/classes/VisualScriptDeconstruct.xml index 5bb12539af..cd7d79ae56 100644 --- a/doc/classes/VisualScriptDeconstruct.xml +++ b/doc/classes/VisualScriptDeconstruct.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which deconstructs a base type instance into its parts. </brief_description> <description> + A Visual Script node which deconstructs a base type instance into its parts. </description> <tutorials> </tutorials> @@ -28,6 +30,7 @@ <member name="elem_cache" type="Array" setter="_set_elem_cache" getter="_get_elem_cache"> </member> <member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" enum="Variant.Type"> + The type to deconstruct. </member> </members> <constants> diff --git a/doc/classes/VisualScriptEmitSignal.xml b/doc/classes/VisualScriptEmitSignal.xml index 21af3c6ea0..844b5a40ec 100644 --- a/doc/classes/VisualScriptEmitSignal.xml +++ b/doc/classes/VisualScriptEmitSignal.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node which emits a specified signal. </brief_description> <description> + A Visual Script node which emits a specified signal when it is executed. </description> <tutorials> </tutorials> @@ -26,6 +28,7 @@ </methods> <members> <member name="signal" type="String" setter="set_signal" getter="get_signal"> + The signal to emit. </member> </members> <constants> diff --git a/doc/classes/VisualScriptEngineSingleton.xml b/doc/classes/VisualScriptEngineSingleton.xml index c00fd2a0a4..6606f10f11 100644 --- a/doc/classes/VisualScriptEngineSingleton.xml +++ b/doc/classes/VisualScriptEngineSingleton.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A Visual Script node returning a singleton from [@GlobalScope] </brief_description> <description> + A Visual Script node returning a singleton from [@GlobalScope] </description> <tutorials> </tutorials> @@ -26,6 +28,7 @@ </methods> <members> <member name="constant" type="String" setter="set_singleton" getter="get_singleton"> + The singleton's name. </member> </members> <constants> diff --git a/doc/classes/VisualScriptNode.xml b/doc/classes/VisualScriptNode.xml index dbb75e69fa..74ec9bdc2e 100644 --- a/doc/classes/VisualScriptNode.xml +++ b/doc/classes/VisualScriptNode.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualScriptNode" inherits="Resource" category="Core" version="3.0.alpha.custom_build"> <brief_description> + A node which is part of a [VisualScript]. </brief_description> <description> + A node which is part of a [VisualScript]. Not to be confused with [Node], which is a part of a [SceneTree]. </description> <tutorials> </tutorials> @@ -15,12 +17,21 @@ <argument index="0" name="port_idx" type="int"> </argument> <description> + Returns the default value of a given port. The default value is used when nothing is connected to the port. </description> </method> <method name="get_visual_script" qualifiers="const"> <return type="VisualScript"> </return> <description> + Returns the [VisualScript] instance the node is bound to. + </description> + </method> + <method name="ports_changed_notify"> + <return type="void"> + </return> + <description> + Notify that the node's ports have changed. Usually used in conjunction with [VisualScriptCustomNode] . </description> </method> <method name="set_default_input_value"> @@ -31,6 +42,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Change the default value of a given port. </description> </method> </methods> @@ -41,6 +53,7 @@ <signals> <signal name="ports_changed"> <description> + Emitted when the available input/output ports are changed. </description> </signal> </signals> diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index 75e18bbe81..6b936899d8 100644 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -23,6 +23,7 @@ flags = { 'o': True, 'i': False, 'a': True, + 'e': False, } flag_descriptions = { 'c': 'Toggle colors when outputting.', @@ -35,6 +36,7 @@ flag_descriptions = { 'o': 'Toggle overall column.', 'i': 'Toggle collapse of class items columns.', 'a': 'Toggle showing all items.', + 'e': 'Toggle hiding empty items.', } long_flags = { 'colors': 'c', @@ -64,6 +66,8 @@ long_flags = { 'collapse': 'i', 'all': 'a', + + 'empty': 'e', } table_columns = ['name', 'brief_description', 'description', 'methods', 'constants', 'members', 'signals'] table_column_names = ['Name', 'Brief Desc.', 'Desc.', 'Methods', 'Constants', 'Members', 'Signals'] @@ -192,6 +196,14 @@ class ClassStatus: ok = ok and self.progresses[k].is_ok() return ok + def is_empty(self): + sum = 0 + for k in self.progresses: + if self.progresses[k].is_ok(): + continue + sum += self.progresses[k].total + return sum < 1 + def make_output(self): output = {} output['name'] = color('name', self.name) @@ -396,6 +408,9 @@ for cn in filtered_classes: if (flags['b'] and status.is_ok()) or (flags['g'] and not status.is_ok()) or (not flags['a']): continue + if flags['e'] and status.is_empty(): + continue + out = status.make_output() row = [] for column in table_columns: |