Document most VisualServer functions

This commit is contained in:
clayjohn 2020-01-05 00:33:16 -08:00
parent 35d288b2ef
commit 566ffc2695
1 changed files with 107 additions and 3 deletions

View File

@ -1417,6 +1417,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias].
</description> </description>
</method> </method>
<method name="gi_probe_get_bounds" qualifiers="const"> <method name="gi_probe_get_bounds" qualifiers="const">
@ -1425,6 +1426,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the axis-aligned bounding box that covers the full extent of the GI probe.
</description> </description>
</method> </method>
<method name="gi_probe_get_cell_size" qualifiers="const"> <method name="gi_probe_get_cell_size" qualifiers="const">
@ -1433,6 +1435,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the cell size set by [method gi_probe_set_cell_size].
</description> </description>
</method> </method>
<method name="gi_probe_get_dynamic_data" qualifiers="const"> <method name="gi_probe_get_dynamic_data" qualifiers="const">
@ -1441,6 +1444,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the data used by the GI probe.
</description> </description>
</method> </method>
<method name="gi_probe_get_dynamic_range" qualifiers="const"> <method name="gi_probe_get_dynamic_range" qualifiers="const">
@ -1449,6 +1453,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range].
</description> </description>
</method> </method>
<method name="gi_probe_get_energy" qualifiers="const"> <method name="gi_probe_get_energy" qualifiers="const">
@ -1457,6 +1462,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy].
</description> </description>
</method> </method>
<method name="gi_probe_get_normal_bias" qualifiers="const"> <method name="gi_probe_get_normal_bias" qualifiers="const">
@ -1465,6 +1471,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias].
</description> </description>
</method> </method>
<method name="gi_probe_get_propagation" qualifiers="const"> <method name="gi_probe_get_propagation" qualifiers="const">
@ -1473,6 +1480,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation].
</description> </description>
</method> </method>
<method name="gi_probe_get_to_cell_xform" qualifiers="const"> <method name="gi_probe_get_to_cell_xform" qualifiers="const">
@ -1481,6 +1489,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns the Transform set by [method gi_probe_set_to_cell_xform].
</description> </description>
</method> </method>
<method name="gi_probe_is_compressed" qualifiers="const"> <method name="gi_probe_is_compressed" qualifiers="const">
@ -1489,6 +1498,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress].
</description> </description>
</method> </method>
<method name="gi_probe_is_interior" qualifiers="const"> <method name="gi_probe_is_interior" qualifiers="const">
@ -1497,6 +1507,7 @@
<argument index="0" name="probe" type="RID"> <argument index="0" name="probe" type="RID">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior].
</description> </description>
</method> </method>
<method name="gi_probe_set_bias"> <method name="gi_probe_set_bias">
@ -1507,6 +1518,7 @@
<argument index="1" name="bias" type="float"> <argument index="1" name="bias" type="float">
</argument> </argument>
<description> <description>
Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias].
</description> </description>
</method> </method>
<method name="gi_probe_set_bounds"> <method name="gi_probe_set_bounds">
@ -1517,6 +1529,7 @@
<argument index="1" name="bounds" type="AABB"> <argument index="1" name="bounds" type="AABB">
</argument> </argument>
<description> <description>
Sets the axis-aligned bounding box that covers the extent of the GI probe.
</description> </description>
</method> </method>
<method name="gi_probe_set_cell_size"> <method name="gi_probe_set_cell_size">
@ -1527,6 +1540,7 @@
<argument index="1" name="range" type="float"> <argument index="1" name="range" type="float">
</argument> </argument>
<description> <description>
Sets the size of individual cells within the GI probe.
</description> </description>
</method> </method>
<method name="gi_probe_set_compress"> <method name="gi_probe_set_compress">
@ -1537,6 +1551,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress].
</description> </description>
</method> </method>
<method name="gi_probe_set_dynamic_data"> <method name="gi_probe_set_dynamic_data">
@ -1547,6 +1562,7 @@
<argument index="1" name="data" type="PoolIntArray"> <argument index="1" name="data" type="PoolIntArray">
</argument> </argument>
<description> <description>
Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself.
</description> </description>
</method> </method>
<method name="gi_probe_set_dynamic_range"> <method name="gi_probe_set_dynamic_range">
@ -1557,6 +1573,7 @@
<argument index="1" name="range" type="int"> <argument index="1" name="range" type="int">
</argument> </argument>
<description> <description>
Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [member GIProbe.dynamic_range].
</description> </description>
</method> </method>
<method name="gi_probe_set_energy"> <method name="gi_probe_set_energy">
@ -1567,6 +1584,7 @@
<argument index="1" name="energy" type="float"> <argument index="1" name="energy" type="float">
</argument> </argument>
<description> <description>
Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy].
</description> </description>
</method> </method>
<method name="gi_probe_set_interior"> <method name="gi_probe_set_interior">
@ -1577,6 +1595,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [member GIProbe.interior].
</description> </description>
</method> </method>
<method name="gi_probe_set_normal_bias"> <method name="gi_probe_set_normal_bias">
@ -1587,6 +1606,7 @@
<argument index="1" name="bias" type="float"> <argument index="1" name="bias" type="float">
</argument> </argument>
<description> <description>
Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [member GIProbe.normal_bias].
</description> </description>
</method> </method>
<method name="gi_probe_set_propagation"> <method name="gi_probe_set_propagation">
@ -1597,6 +1617,7 @@
<argument index="1" name="propagation" type="float"> <argument index="1" name="propagation" type="float">
</argument> </argument>
<description> <description>
Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation].
</description> </description>
</method> </method>
<method name="gi_probe_set_to_cell_xform"> <method name="gi_probe_set_to_cell_xform">
@ -1607,6 +1628,7 @@
<argument index="1" name="xform" type="Transform"> <argument index="1" name="xform" type="Transform">
</argument> </argument>
<description> <description>
Sets the to cell [Transform] for this GI probe.
</description> </description>
</method> </method>
<method name="has_changed" qualifiers="const"> <method name="has_changed" qualifiers="const">
@ -2019,7 +2041,7 @@
<argument index="1" name="scenario" type="RID"> <argument index="1" name="scenario" type="RID">
</argument> </argument>
<description> <description>
Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description> </description>
</method> </method>
@ -2031,7 +2053,7 @@
<argument index="1" name="scenario" type="RID"> <argument index="1" name="scenario" type="RID">
</argument> </argument>
<description> <description>
Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description> </description>
</method> </method>
@ -2045,7 +2067,7 @@
<argument index="2" name="scenario" type="RID"> <argument index="2" name="scenario" type="RID">
</argument> </argument>
<description> <description>
Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description> </description>
</method> </method>
@ -2057,6 +2079,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits].
</description> </description>
</method> </method>
<method name="light_directional_set_shadow_depth_range_mode"> <method name="light_directional_set_shadow_depth_range_mode">
@ -2067,6 +2090,7 @@
<argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode"> <argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode">
</argument> </argument>
<description> <description>
Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options.
</description> </description>
</method> </method>
<method name="light_directional_set_shadow_mode"> <method name="light_directional_set_shadow_mode">
@ -2077,6 +2101,7 @@
<argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode"> <argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode">
</argument> </argument>
<description> <description>
Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options.
</description> </description>
</method> </method>
<method name="light_omni_set_shadow_detail"> <method name="light_omni_set_shadow_detail">
@ -2087,6 +2112,7 @@
<argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail"> <argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail">
</argument> </argument>
<description> <description>
Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [member OmniLight.omni_shadow_detail].
</description> </description>
</method> </method>
<method name="light_omni_set_shadow_mode"> <method name="light_omni_set_shadow_mode">
@ -2097,6 +2123,7 @@
<argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode"> <argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode">
</argument> </argument>
<description> <description>
Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight.omni_shadow_mode].
</description> </description>
</method> </method>
<method name="light_set_color"> <method name="light_set_color">
@ -2107,6 +2134,7 @@
<argument index="1" name="color" type="Color"> <argument index="1" name="color" type="Color">
</argument> </argument>
<description> <description>
Sets the color of the light. Equivalent to [member Light.light_color].
</description> </description>
</method> </method>
<method name="light_set_cull_mask"> <method name="light_set_cull_mask">
@ -2117,6 +2145,7 @@
<argument index="1" name="mask" type="int"> <argument index="1" name="mask" type="int">
</argument> </argument>
<description> <description>
Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask].
</description> </description>
</method> </method>
<method name="light_set_negative"> <method name="light_set_negative">
@ -2127,6 +2156,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light.light_negative].
</description> </description>
</method> </method>
<method name="light_set_param"> <method name="light_set_param">
@ -2139,6 +2169,7 @@
<argument index="2" name="value" type="float"> <argument index="2" name="value" type="float">
</argument> </argument>
<description> <description>
Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param].
</description> </description>
</method> </method>
<method name="light_set_projector"> <method name="light_set_projector">
@ -2149,6 +2180,7 @@
<argument index="1" name="texture" type="RID"> <argument index="1" name="texture" type="RID">
</argument> </argument>
<description> <description>
Not implemented in Godot 3.x.
</description> </description>
</method> </method>
<method name="light_set_reverse_cull_face_mode"> <method name="light_set_reverse_cull_face_mode">
@ -2159,6 +2191,7 @@
<argument index="1" name="enabled" type="bool"> <argument index="1" name="enabled" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light.shadow_reverse_cull_face].
</description> </description>
</method> </method>
<method name="light_set_shadow"> <method name="light_set_shadow">
@ -2169,6 +2202,7 @@
<argument index="1" name="enabled" type="bool"> <argument index="1" name="enabled" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], light will cast shadows. Equivalent to [member Light.shadow_enabled].
</description> </description>
</method> </method>
<method name="light_set_shadow_color"> <method name="light_set_shadow_color">
@ -2179,6 +2213,7 @@
<argument index="1" name="color" type="Color"> <argument index="1" name="color" type="Color">
</argument> </argument>
<description> <description>
Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color].
</description> </description>
</method> </method>
<method name="light_set_use_gi"> <method name="light_set_use_gi">
@ -2331,6 +2366,7 @@
<argument index="1" name="parameter" type="String"> <argument index="1" name="parameter" type="String">
</argument> </argument>
<description> <description>
Returns the default value for the param if available. Otherwise returns an empty [Variant].
</description> </description>
</method> </method>
<method name="material_get_shader" qualifiers="const"> <method name="material_get_shader" qualifiers="const">
@ -2603,6 +2639,7 @@
<argument index="3" name="array_index" type="int"> <argument index="3" name="array_index" type="int">
</argument> </argument>
<description> <description>
Function is unused in Godot 3.x.
</description> </description>
</method> </method>
<method name="mesh_surface_get_format_stride" qualifiers="const"> <method name="mesh_surface_get_format_stride" qualifiers="const">
@ -2615,6 +2652,7 @@
<argument index="2" name="index_len" type="int"> <argument index="2" name="index_len" type="int">
</argument> </argument>
<description> <description>
Function is unused in Godot 3.x.
</description> </description>
</method> </method>
<method name="mesh_surface_get_index_array" qualifiers="const"> <method name="mesh_surface_get_index_array" qualifiers="const">
@ -2686,6 +2724,7 @@
<argument index="3" name="data" type="PoolByteArray"> <argument index="3" name="data" type="PoolByteArray">
</argument> </argument>
<description> <description>
Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh.
</description> </description>
</method> </method>
<method name="multimesh_allocate"> <method name="multimesh_allocate">
@ -2702,6 +2741,7 @@
<argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0"> <argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0">
</argument> </argument>
<description> <description>
Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count].
</description> </description>
</method> </method>
<method name="multimesh_create"> <method name="multimesh_create">
@ -2719,6 +2759,7 @@
<argument index="0" name="multimesh" type="RID"> <argument index="0" name="multimesh" type="RID">
</argument> </argument>
<description> <description>
Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh.
</description> </description>
</method> </method>
<method name="multimesh_get_instance_count" qualifiers="const"> <method name="multimesh_get_instance_count" qualifiers="const">
@ -2727,6 +2768,7 @@
<argument index="0" name="multimesh" type="RID"> <argument index="0" name="multimesh" type="RID">
</argument> </argument>
<description> <description>
Returns the number of instances allocated for this multimesh.
</description> </description>
</method> </method>
<method name="multimesh_get_mesh" qualifiers="const"> <method name="multimesh_get_mesh" qualifiers="const">
@ -2735,6 +2777,7 @@
<argument index="0" name="multimesh" type="RID"> <argument index="0" name="multimesh" type="RID">
</argument> </argument>
<description> <description>
Returns the RID of the mesh that will be used in drawing this multimesh.
</description> </description>
</method> </method>
<method name="multimesh_get_visible_instances" qualifiers="const"> <method name="multimesh_get_visible_instances" qualifiers="const">
@ -2743,6 +2786,7 @@
<argument index="0" name="multimesh" type="RID"> <argument index="0" name="multimesh" type="RID">
</argument> </argument>
<description> <description>
Returns the number of visible instances for this multimesh.
</description> </description>
</method> </method>
<method name="multimesh_instance_get_color" qualifiers="const"> <method name="multimesh_instance_get_color" qualifiers="const">
@ -2753,6 +2797,7 @@
<argument index="1" name="index" type="int"> <argument index="1" name="index" type="int">
</argument> </argument>
<description> <description>
Returns the color by which the specified instance will be modulated.
</description> </description>
</method> </method>
<method name="multimesh_instance_get_custom_data" qualifiers="const"> <method name="multimesh_instance_get_custom_data" qualifiers="const">
@ -2763,6 +2808,7 @@
<argument index="1" name="index" type="int"> <argument index="1" name="index" type="int">
</argument> </argument>
<description> <description>
Returns the custom data associated with the specified instance.
</description> </description>
</method> </method>
<method name="multimesh_instance_get_transform" qualifiers="const"> <method name="multimesh_instance_get_transform" qualifiers="const">
@ -2773,6 +2819,7 @@
<argument index="1" name="index" type="int"> <argument index="1" name="index" type="int">
</argument> </argument>
<description> <description>
Returns the [Transform] of the specified instance.
</description> </description>
</method> </method>
<method name="multimesh_instance_get_transform_2d" qualifiers="const"> <method name="multimesh_instance_get_transform_2d" qualifiers="const">
@ -2783,6 +2830,7 @@
<argument index="1" name="index" type="int"> <argument index="1" name="index" type="int">
</argument> </argument>
<description> <description>
Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms.
</description> </description>
</method> </method>
<method name="multimesh_instance_set_color"> <method name="multimesh_instance_set_color">
@ -2795,6 +2843,7 @@
<argument index="2" name="color" type="Color"> <argument index="2" name="color" type="Color">
</argument> </argument>
<description> <description>
Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color].
</description> </description>
</method> </method>
<method name="multimesh_instance_set_custom_data"> <method name="multimesh_instance_set_custom_data">
@ -2807,6 +2856,7 @@
<argument index="2" name="custom_data" type="Color"> <argument index="2" name="custom_data" type="Color">
</argument> </argument>
<description> <description>
Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data].
</description> </description>
</method> </method>
<method name="multimesh_instance_set_transform"> <method name="multimesh_instance_set_transform">
@ -2819,6 +2869,7 @@
<argument index="2" name="transform" type="Transform"> <argument index="2" name="transform" type="Transform">
</argument> </argument>
<description> <description>
Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform].
</description> </description>
</method> </method>
<method name="multimesh_instance_set_transform_2d"> <method name="multimesh_instance_set_transform_2d">
@ -2831,6 +2882,7 @@
<argument index="2" name="transform" type="Transform2D"> <argument index="2" name="transform" type="Transform2D">
</argument> </argument>
<description> <description>
Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d].
</description> </description>
</method> </method>
<method name="multimesh_set_as_bulk_array"> <method name="multimesh_set_as_bulk_array">
@ -2841,6 +2893,11 @@
<argument index="1" name="array" type="PoolRealArray"> <argument index="1" name="array" type="PoolRealArray">
</argument> </argument>
<description> <description>
Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative.
All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc.
[Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats.
</description> </description>
</method> </method>
<method name="multimesh_set_mesh"> <method name="multimesh_set_mesh">
@ -2851,6 +2908,7 @@
<argument index="1" name="mesh" type="RID"> <argument index="1" name="mesh" type="RID">
</argument> </argument>
<description> <description>
Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh].
</description> </description>
</method> </method>
<method name="multimesh_set_visible_instances"> <method name="multimesh_set_visible_instances">
@ -2861,6 +2919,7 @@
<argument index="1" name="visible" type="int"> <argument index="1" name="visible" type="int">
</argument> </argument>
<description> <description>
Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count].
</description> </description>
</method> </method>
<method name="omni_light_create"> <method name="omni_light_create">
@ -2887,6 +2946,7 @@
<argument index="0" name="particles" type="RID"> <argument index="0" name="particles" type="RID">
</argument> </argument>
<description> <description>
Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb].
</description> </description>
</method> </method>
<method name="particles_get_emitting"> <method name="particles_get_emitting">
@ -2895,6 +2955,7 @@
<argument index="0" name="particles" type="RID"> <argument index="0" name="particles" type="RID">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if particles are currently set to emitting.
</description> </description>
</method> </method>
<method name="particles_is_inactive"> <method name="particles_is_inactive">
@ -2903,6 +2964,7 @@
<argument index="0" name="particles" type="RID"> <argument index="0" name="particles" type="RID">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if particles are not emitting and particles are set to inactive.
</description> </description>
</method> </method>
<method name="particles_request_process"> <method name="particles_request_process">
@ -2911,6 +2973,7 @@
<argument index="0" name="particles" type="RID"> <argument index="0" name="particles" type="RID">
</argument> </argument>
<description> <description>
Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray].
</description> </description>
</method> </method>
<method name="particles_restart"> <method name="particles_restart">
@ -2919,6 +2982,7 @@
<argument index="0" name="particles" type="RID"> <argument index="0" name="particles" type="RID">
</argument> </argument>
<description> <description>
Reset the particles on the next update. Equivalent to [method Particles.restart]
</description> </description>
</method> </method>
<method name="particles_set_amount"> <method name="particles_set_amount">
@ -2929,6 +2993,7 @@
<argument index="1" name="amount" type="int"> <argument index="1" name="amount" type="int">
</argument> </argument>
<description> <description>
Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount].
</description> </description>
</method> </method>
<method name="particles_set_custom_aabb"> <method name="particles_set_custom_aabb">
@ -2939,6 +3004,7 @@
<argument index="1" name="aabb" type="AABB"> <argument index="1" name="aabb" type="AABB">
</argument> </argument>
<description> <description>
Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb].
</description> </description>
</method> </method>
<method name="particles_set_draw_order"> <method name="particles_set_draw_order">
@ -2949,6 +3015,7 @@
<argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder"> <argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder">
</argument> </argument>
<description> <description>
Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member Particles.draw_order].
</description> </description>
</method> </method>
<method name="particles_set_draw_pass_mesh"> <method name="particles_set_draw_pass_mesh">
@ -2961,6 +3028,7 @@
<argument index="2" name="mesh" type="RID"> <argument index="2" name="mesh" type="RID">
</argument> </argument>
<description> <description>
Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4].
</description> </description>
</method> </method>
<method name="particles_set_draw_passes"> <method name="particles_set_draw_passes">
@ -2971,6 +3039,7 @@
<argument index="1" name="count" type="int"> <argument index="1" name="count" type="int">
</argument> </argument>
<description> <description>
Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes].
</description> </description>
</method> </method>
<method name="particles_set_emission_transform"> <method name="particles_set_emission_transform">
@ -2981,6 +3050,7 @@
<argument index="1" name="transform" type="Transform"> <argument index="1" name="transform" type="Transform">
</argument> </argument>
<description> <description>
Sets the [Transform] that will be used by the particles when they first emit.
</description> </description>
</method> </method>
<method name="particles_set_emitting"> <method name="particles_set_emitting">
@ -2991,6 +3061,7 @@
<argument index="1" name="emitting" type="bool"> <argument index="1" name="emitting" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member Particles.emitting].
</description> </description>
</method> </method>
<method name="particles_set_explosiveness_ratio"> <method name="particles_set_explosiveness_ratio">
@ -3001,6 +3072,7 @@
<argument index="1" name="ratio" type="float"> <argument index="1" name="ratio" type="float">
</argument> </argument>
<description> <description>
Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness].
</description> </description>
</method> </method>
<method name="particles_set_fixed_fps"> <method name="particles_set_fixed_fps">
@ -3011,6 +3083,7 @@
<argument index="1" name="fps" type="int"> <argument index="1" name="fps" type="int">
</argument> </argument>
<description> <description>
Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps].
</description> </description>
</method> </method>
<method name="particles_set_fractional_delta"> <method name="particles_set_fractional_delta">
@ -3021,6 +3094,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta].
</description> </description>
</method> </method>
<method name="particles_set_lifetime"> <method name="particles_set_lifetime">
@ -3031,6 +3105,7 @@
<argument index="1" name="lifetime" type="float"> <argument index="1" name="lifetime" type="float">
</argument> </argument>
<description> <description>
Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime].
</description> </description>
</method> </method>
<method name="particles_set_one_shot"> <method name="particles_set_one_shot">
@ -3041,6 +3116,7 @@
<argument index="1" name="one_shot" type="bool"> <argument index="1" name="one_shot" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], particles will emit once and then stop. Equivalent to [member Particles.one_shot].
</description> </description>
</method> </method>
<method name="particles_set_pre_process_time"> <method name="particles_set_pre_process_time">
@ -3051,6 +3127,7 @@
<argument index="1" name="time" type="float"> <argument index="1" name="time" type="float">
</argument> </argument>
<description> <description>
Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member Particles.preprocess].
</description> </description>
</method> </method>
<method name="particles_set_process_material"> <method name="particles_set_process_material">
@ -3061,6 +3138,7 @@
<argument index="1" name="material" type="RID"> <argument index="1" name="material" type="RID">
</argument> </argument>
<description> <description>
Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material].
</description> </description>
</method> </method>
<method name="particles_set_randomness_ratio"> <method name="particles_set_randomness_ratio">
@ -3071,6 +3149,7 @@
<argument index="1" name="ratio" type="float"> <argument index="1" name="ratio" type="float">
</argument> </argument>
<description> <description>
Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness].
</description> </description>
</method> </method>
<method name="particles_set_speed_scale"> <method name="particles_set_speed_scale">
@ -3081,6 +3160,7 @@
<argument index="1" name="scale" type="float"> <argument index="1" name="scale" type="float">
</argument> </argument>
<description> <description>
Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale].
</description> </description>
</method> </method>
<method name="particles_set_use_local_coordinates"> <method name="particles_set_use_local_coordinates">
@ -3091,6 +3171,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member Particles.local_coords].
</description> </description>
</method> </method>
<method name="reflection_probe_create"> <method name="reflection_probe_create">
@ -3253,6 +3334,7 @@
<argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode"> <argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode">
</argument> </argument>
<description> <description>
Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options.
</description> </description>
</method> </method>
<method name="scenario_set_environment"> <method name="scenario_set_environment">
@ -3263,6 +3345,7 @@
<argument index="1" name="environment" type="RID"> <argument index="1" name="environment" type="RID">
</argument> </argument>
<description> <description>
Sets the environment that will be used with this scenario.
</description> </description>
</method> </method>
<method name="scenario_set_fallback_environment"> <method name="scenario_set_fallback_environment">
@ -3273,6 +3356,7 @@
<argument index="1" name="environment" type="RID"> <argument index="1" name="environment" type="RID">
</argument> </argument>
<description> <description>
Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment.
</description> </description>
</method> </method>
<method name="scenario_set_reflection_atlas_size"> <method name="scenario_set_reflection_atlas_size">
@ -3285,6 +3369,7 @@
<argument index="2" name="subdiv" type="int"> <argument index="2" name="subdiv" type="int">
</argument> </argument>
<description> <description>
Sets the size of the reflection atlas shared by all reflection probes in this scenario.
</description> </description>
</method> </method>
<method name="set_boot_image"> <method name="set_boot_image">
@ -3308,6 +3393,7 @@
<argument index="0" name="generate" type="bool"> <argument index="0" name="generate" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode.
</description> </description>
</method> </method>
<method name="set_default_clear_color"> <method name="set_default_clear_color">
@ -3316,6 +3402,7 @@
<argument index="0" name="color" type="Color"> <argument index="0" name="color" type="Color">
</argument> </argument>
<description> <description>
Sets the default clear color which is used when a specific clear color has not been selected.
</description> </description>
</method> </method>
<method name="shader_create"> <method name="shader_create">
@ -3485,6 +3572,7 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Not implemented in Godot 3.x.
</description> </description>
</method> </method>
<method name="texture_allocate"> <method name="texture_allocate">
@ -3505,6 +3593,7 @@
<argument index="6" name="flags" type="int" default="7"> <argument index="6" name="flags" type="int" default="7">
</argument> </argument>
<description> <description>
Allocates the GPU memory for the texture.
</description> </description>
</method> </method>
<method name="texture_bind"> <method name="texture_bind">
@ -3561,6 +3650,7 @@
<argument index="0" name="texture" type="RID"> <argument index="0" name="texture" type="RID">
</argument> </argument>
<description> <description>
Returns the depth of the texture.
</description> </description>
</method> </method>
<method name="texture_get_flags" qualifiers="const"> <method name="texture_get_flags" qualifiers="const">
@ -3614,6 +3704,7 @@
<argument index="0" name="texture" type="RID"> <argument index="0" name="texture" type="RID">
</argument> </argument>
<description> <description>
Returns the type of the texture, can be any of the [enum TextureType].
</description> </description>
</method> </method>
<method name="texture_get_width" qualifiers="const"> <method name="texture_get_width" qualifiers="const">
@ -3662,6 +3753,7 @@
<argument index="9" name="layer" type="int" default="0"> <argument index="9" name="layer" type="int" default="0">
</argument> </argument>
<description> <description>
Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly.
</description> </description>
</method> </method>
<method name="texture_set_flags"> <method name="texture_set_flags">
@ -3707,6 +3799,7 @@
<argument index="3" name="depth" type="int"> <argument index="3" name="depth" type="int">
</argument> </argument>
<description> <description>
Resizes the texture to the specified dimensions.
</description> </description>
</method> </method>
<method name="textures_keep_original"> <method name="textures_keep_original">
@ -4459,10 +4552,13 @@
The instance is a light. The instance is a light.
</constant> </constant>
<constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType"> <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType">
The instance is a reflection probe.
</constant> </constant>
<constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType"> <constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType">
The instance is a GI probe.
</constant> </constant>
<constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType"> <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType">
The instance is a lightmap capture.
</constant> </constant>
<constant name="INSTANCE_MAX" value="9" enum="InstanceType"> <constant name="INSTANCE_MAX" value="9" enum="InstanceType">
Represents the size of the [enum InstanceType] enum. Represents the size of the [enum InstanceType] enum.
@ -4568,20 +4664,28 @@
<constant name="FEATURE_MULTITHREADED" value="1" enum="Features"> <constant name="FEATURE_MULTITHREADED" value="1" enum="Features">
</constant> </constant>
<constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat"> <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat">
Use [Transform2D] to store MultiMesh transform.
</constant> </constant>
<constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat">
Use [Transform] to store MultiMesh transform.
</constant> </constant>
<constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat"> <constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat">
MultiMesh does not use per-instance color.
</constant> </constant>
<constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat"> <constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat">
MultiMesh color uses 8 bits per component. This packs the color into a single float.
</constant> </constant>
<constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat"> <constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat">
MultiMesh color uses a float per channel.
</constant> </constant>
<constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat"> <constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat">
MultiMesh does not use custom data.
</constant> </constant>
<constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat"> <constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat">
MultiMesh custom data uses 8 bits per component. This packs the 4-component custom data into a single float.
</constant> </constant>
<constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat"> <constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat">
MultiMesh custom data uses a float per component.
</constant> </constant>
<constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode">
</constant> </constant>