diff options
Diffstat (limited to 'doc/classes/VisualServer.xml')
-rw-r--r-- | doc/classes/VisualServer.xml | 344 |
1 files changed, 328 insertions, 16 deletions
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index a216d4b7b3..c00710ade9 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -6,8 +6,16 @@ <description> Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. + The visual server can be used to bypass the scene system entirely. + Resources are created using the [code]*_create[/code] functions. + All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas]. + In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any [Spatial] node with [method Spatial.get_world]. Otherwise, a scenario can be created with [method scenario_create]. + Similarly in 2D, a canvas is needed to draw all canvas items. + In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. + In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html</link> </tutorials> <methods> <method name="black_bars_set_images"> @@ -45,6 +53,7 @@ </return> <description> Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="camera_set_cull_mask"> @@ -142,7 +151,8 @@ <return type="RID"> </return> <description> - Creates a canvas and returns the assigned [RID]. + Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_item_add_circle"> @@ -441,7 +451,8 @@ <return type="RID"> </return> <description> - Creates a new [CanvasItem] and returns its [RID]. + Creates a new [CanvasItem] and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_item_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_item_set_clip"> @@ -555,7 +566,7 @@ <argument index="1" name="parent" type="RID"> </argument> <description> - Sets the parent for the [CanvasItem]. + Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport. </description> </method> <method name="canvas_item_set_self_modulate"> @@ -650,7 +661,8 @@ <return type="RID"> </return> <description> - Creates a canvas light. + Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_attach_to_canvas"> @@ -668,7 +680,8 @@ <return type="RID"> </return> <description> - Creates a light occluder. + Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_set_enabled"> @@ -932,7 +945,8 @@ <return type="RID"> </return> <description> - Creates a new light occluder polygon. + Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_occluder_polygon_set_cull_mode"> @@ -999,6 +1013,8 @@ </return> <description> Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="draw"> @@ -1017,6 +1033,7 @@ </return> <description> Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="environment_set_adjustment"> @@ -1388,6 +1405,22 @@ Returns the id of the test texture. Creates one if none exists. </description> </method> + <method name="get_video_adapter_name" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + </description> + </method> + <method name="get_video_adapter_vendor" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + </description> + </method> <method name="get_white_texture"> <return type="RID"> </return> @@ -1399,6 +1432,9 @@ <return type="RID"> </return> <description> + Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]gi_probe_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this GI probe to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="gi_probe_get_bias" qualifiers="const"> @@ -1407,6 +1443,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias]. </description> </method> <method name="gi_probe_get_bounds" qualifiers="const"> @@ -1415,6 +1452,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the axis-aligned bounding box that covers the full extent of the GI probe. </description> </method> <method name="gi_probe_get_cell_size" qualifiers="const"> @@ -1423,6 +1461,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the cell size set by [method gi_probe_set_cell_size]. </description> </method> <method name="gi_probe_get_dynamic_data" qualifiers="const"> @@ -1431,6 +1470,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the data used by the GI probe. </description> </method> <method name="gi_probe_get_dynamic_range" qualifiers="const"> @@ -1439,6 +1479,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range]. </description> </method> <method name="gi_probe_get_energy" qualifiers="const"> @@ -1447,6 +1488,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy]. </description> </method> <method name="gi_probe_get_normal_bias" qualifiers="const"> @@ -1455,6 +1497,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias]. </description> </method> <method name="gi_probe_get_propagation" qualifiers="const"> @@ -1463,6 +1506,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation]. </description> </method> <method name="gi_probe_get_to_cell_xform" qualifiers="const"> @@ -1471,6 +1515,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the Transform set by [method gi_probe_set_to_cell_xform]. </description> </method> <method name="gi_probe_is_compressed" qualifiers="const"> @@ -1479,6 +1524,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns [code]true[/code] if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress]. </description> </method> <method name="gi_probe_is_interior" qualifiers="const"> @@ -1487,6 +1533,7 @@ <argument index="0" name="probe" type="RID"> </argument> <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> </method> <method name="gi_probe_set_bias"> @@ -1497,6 +1544,7 @@ <argument index="1" name="bias" type="float"> </argument> <description> + Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias]. </description> </method> <method name="gi_probe_set_bounds"> @@ -1507,6 +1555,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> + Sets the axis-aligned bounding box that covers the extent of the GI probe. </description> </method> <method name="gi_probe_set_cell_size"> @@ -1517,6 +1566,7 @@ <argument index="1" name="range" type="float"> </argument> <description> + Sets the size of individual cells within the GI probe. </description> </method> <method name="gi_probe_set_compress"> @@ -1527,6 +1577,7 @@ <argument index="1" name="enable" type="bool"> </argument> <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> </method> <method name="gi_probe_set_dynamic_data"> @@ -1537,6 +1588,7 @@ <argument index="1" name="data" type="PoolIntArray"> </argument> <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> </method> <method name="gi_probe_set_dynamic_range"> @@ -1547,6 +1599,7 @@ <argument index="1" name="range" type="int"> </argument> <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> </method> <method name="gi_probe_set_energy"> @@ -1557,6 +1610,7 @@ <argument index="1" name="energy" type="float"> </argument> <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> </method> <method name="gi_probe_set_interior"> @@ -1567,6 +1621,7 @@ <argument index="1" name="enable" type="bool"> </argument> <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> </method> <method name="gi_probe_set_normal_bias"> @@ -1577,6 +1632,7 @@ <argument index="1" name="bias" type="float"> </argument> <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> </method> <method name="gi_probe_set_propagation"> @@ -1587,6 +1643,7 @@ <argument index="1" name="propagation" type="float"> </argument> <description> + Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation]. </description> </method> <method name="gi_probe_set_to_cell_xform"> @@ -1597,6 +1654,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> + Sets the to cell [Transform] for this GI probe. </description> </method> <method name="has_changed" qualifiers="const"> @@ -1612,6 +1670,7 @@ <argument index="0" name="feature" type="int" enum="VisualServer.Features"> </argument> <description> + Not yet implemented. Always returns [code]false[/code]. </description> </method> <method name="has_os_feature" qualifiers="const"> @@ -1660,7 +1719,9 @@ <return type="RID"> </return> <description> - Creates an [ImmediateGeometry] and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] VisualServer functions. + Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="immediate_end"> @@ -1755,13 +1816,14 @@ <argument index="1" name="vertex" type="Vector2"> </argument> <description> + Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry.add_vertex]. </description> </method> <method name="init"> <return type="void"> </return> <description> - Initializes the visual server. + Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything. </description> </method> <method name="instance_attach_object_instance_id"> @@ -1772,6 +1834,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]. </description> </method> <method name="instance_attach_skeleton"> @@ -1782,12 +1845,16 @@ <argument index="1" name="skeleton" type="RID"> </argument> <description> + Attaches a skeleton to an instance. Removes the previous skeleton from the instance. </description> </method> <method name="instance_create"> <return type="RID"> </return> <description> + Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base]. </description> </method> <method name="instance_create2"> @@ -1798,6 +1865,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Creates a visual instance, adds it to the VisualServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="instance_geometry_set_as_instance_lod"> @@ -1808,6 +1877,7 @@ <argument index="1" name="as_lod_of_instance" type="RID"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="instance_geometry_set_cast_shadows_setting"> @@ -1818,6 +1888,7 @@ <argument index="1" name="shadow_casting_setting" type="int" enum="VisualServer.ShadowCastingSetting"> </argument> <description> + Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance.cast_shadow]. </description> </method> <method name="instance_geometry_set_draw_range"> @@ -1834,6 +1905,7 @@ <argument index="4" name="max_margin" type="float"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="instance_geometry_set_flag"> @@ -1846,6 +1918,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> + Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. </description> </method> <method name="instance_geometry_set_material_override"> @@ -1856,6 +1929,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance.material_override]. </description> </method> <method name="instance_set_base"> @@ -1866,6 +1940,7 @@ <argument index="1" name="base" type="RID"> </argument> <description> + Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. </description> </method> <method name="instance_set_blend_shape_weight"> @@ -1878,6 +1953,7 @@ <argument index="2" name="weight" type="float"> </argument> <description> + Sets the weight for a given blend shape associated with this instance. </description> </method> <method name="instance_set_custom_aabb"> @@ -1888,6 +1964,7 @@ <argument index="1" name="aabb" type="AABB"> </argument> <description> + Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance.set_custom_aabb]. </description> </method> <method name="instance_set_exterior"> @@ -1898,6 +1975,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Function not implemented in Godot 3.x. </description> </method> <method name="instance_set_extra_visibility_margin"> @@ -1908,6 +1986,7 @@ <argument index="1" name="margin" type="float"> </argument> <description> + Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance.extra_cull_margin]. </description> </method> <method name="instance_set_layer_mask"> @@ -1918,6 +1997,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> + Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance.layers]. </description> </method> <method name="instance_set_scenario"> @@ -1928,6 +2008,7 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. </description> </method> <method name="instance_set_surface_material"> @@ -1940,6 +2021,7 @@ <argument index="2" name="material" type="RID"> </argument> <description> + Sets the material of a specific surface. Equivalent to [method MeshInstance.set_surface_material]. </description> </method> <method name="instance_set_transform"> @@ -1950,6 +2032,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the world space transform of the instance. Equivalent to [member Spatial.transform]. </description> </method> <method name="instance_set_use_lightmap"> @@ -1962,6 +2045,7 @@ <argument index="2" name="lightmap" type="RID"> </argument> <description> + Sets the lightmap to use with this instance. </description> </method> <method name="instance_set_visible"> @@ -1972,6 +2056,7 @@ <argument index="1" name="visible" type="bool"> </argument> <description> + Sets whether an instance is drawn or not. Equivalent to [member Spatial.visible]. </description> </method> <method name="instances_cull_aabb" qualifiers="const"> @@ -1982,6 +2067,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <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. 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. </description> </method> <method name="instances_cull_convex" qualifiers="const"> @@ -1992,6 +2079,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <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. 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. </description> </method> <method name="instances_cull_ray" qualifiers="const"> @@ -2004,7 +2093,7 @@ <argument index="2" name="scenario" type="RID"> </argument> <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. </description> </method> @@ -2016,6 +2105,7 @@ <argument index="1" name="enable" type="bool"> </argument> <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> </method> <method name="light_directional_set_shadow_depth_range_mode"> @@ -2026,6 +2116,7 @@ <argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode"> </argument> <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> </method> <method name="light_directional_set_shadow_mode"> @@ -2036,6 +2127,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode"> </argument> <description> + Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. </description> </method> <method name="light_omni_set_shadow_detail"> @@ -2046,6 +2138,7 @@ <argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail"> </argument> <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> </method> <method name="light_omni_set_shadow_mode"> @@ -2056,6 +2149,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode"> </argument> <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> </method> <method name="light_set_color"> @@ -2066,6 +2160,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color of the light. Equivalent to [member Light.light_color]. </description> </method> <method name="light_set_cull_mask"> @@ -2076,6 +2171,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> + Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask]. </description> </method> <method name="light_set_negative"> @@ -2086,6 +2182,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light.light_negative]. </description> </method> <method name="light_set_param"> @@ -2098,6 +2195,7 @@ <argument index="2" name="value" type="float"> </argument> <description> + Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param]. </description> </method> <method name="light_set_projector"> @@ -2108,6 +2206,7 @@ <argument index="1" name="texture" type="RID"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="light_set_reverse_cull_face_mode"> @@ -2118,6 +2217,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <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> </method> <method name="light_set_shadow"> @@ -2128,6 +2228,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code], light will cast shadows. Equivalent to [member Light.shadow_enabled]. </description> </method> <method name="light_set_shadow_color"> @@ -2138,6 +2239,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color]. </description> </method> <method name="light_set_use_gi"> @@ -2155,6 +2257,9 @@ <return type="RID"> </return> <description> + Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="lightmap_capture_get_bounds" qualifiers="const"> @@ -2163,6 +2268,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the size of the lightmap capture area. </description> </method> <method name="lightmap_capture_get_energy" qualifiers="const"> @@ -2171,6 +2277,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the energy multiplier used by the lightmap capture. </description> </method> <method name="lightmap_capture_get_octree" qualifiers="const"> @@ -2179,6 +2286,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the octree used by the lightmap capture. </description> </method> <method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const"> @@ -2187,6 +2295,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the cell subdivision amount used by this lightmap capture's octree. </description> </method> <method name="lightmap_capture_get_octree_cell_transform" qualifiers="const"> @@ -2195,6 +2304,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the cell transform for this lightmap capture's octree. </description> </method> <method name="lightmap_capture_set_bounds"> @@ -2205,6 +2315,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> + Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds]. </description> </method> <method name="lightmap_capture_set_energy"> @@ -2215,6 +2326,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy]. </description> </method> <method name="lightmap_capture_set_octree"> @@ -2225,6 +2337,7 @@ <argument index="1" name="octree" type="PoolByteArray"> </argument> <description> + Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree]. </description> </method> <method name="lightmap_capture_set_octree_cell_subdiv"> @@ -2235,6 +2348,7 @@ <argument index="1" name="subdiv" type="int"> </argument> <description> + Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv]. </description> </method> <method name="lightmap_capture_set_octree_cell_transform"> @@ -2245,6 +2359,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> + Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform]. </description> </method> <method name="make_sphere_mesh"> @@ -2264,7 +2379,8 @@ <return type="RID"> </return> <description> - Returns an empty material. + Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="material_get_param" qualifiers="const"> @@ -2286,6 +2402,7 @@ <argument index="1" name="parameter" type="String"> </argument> <description> + Returns the default value for the param if available. Otherwise returns an empty [Variant]. </description> </method> <method name="material_get_shader" qualifiers="const"> @@ -2384,7 +2501,9 @@ <return type="RID"> </return> <description> - Creates a new mesh. + Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="mesh_get_blend_shape_count" qualifiers="const"> @@ -2556,6 +2675,7 @@ <argument index="3" name="array_index" type="int"> </argument> <description> + Function is unused in Godot 3.x. </description> </method> <method name="mesh_surface_get_format_stride" qualifiers="const"> @@ -2568,6 +2688,7 @@ <argument index="2" name="index_len" type="int"> </argument> <description> + Function is unused in Godot 3.x. </description> </method> <method name="mesh_surface_get_index_array" qualifiers="const"> @@ -2639,6 +2760,7 @@ <argument index="3" name="data" type="PoolByteArray"> </argument> <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> </method> <method name="multimesh_allocate"> @@ -2655,14 +2777,16 @@ <argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0"> </argument> <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> </method> <method name="multimesh_create"> <return type="RID"> </return> <description> - Creates a new multimesh on the VisualServer and returns an [RID] handle. + Creates a new multimesh on the VisualServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] VisualServer functions. Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="multimesh_get_aabb" qualifiers="const"> @@ -2671,6 +2795,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. </description> </method> <method name="multimesh_get_instance_count" qualifiers="const"> @@ -2679,6 +2804,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the number of instances allocated for this multimesh. </description> </method> <method name="multimesh_get_mesh" qualifiers="const"> @@ -2687,6 +2813,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the RID of the mesh that will be used in drawing this multimesh. </description> </method> <method name="multimesh_get_visible_instances" qualifiers="const"> @@ -2695,6 +2822,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the number of visible instances for this multimesh. </description> </method> <method name="multimesh_instance_get_color" qualifiers="const"> @@ -2705,6 +2833,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the color by which the specified instance will be modulated. </description> </method> <method name="multimesh_instance_get_custom_data" qualifiers="const"> @@ -2715,6 +2844,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the custom data associated with the specified instance. </description> </method> <method name="multimesh_instance_get_transform" qualifiers="const"> @@ -2725,6 +2855,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the [Transform] of the specified instance. </description> </method> <method name="multimesh_instance_get_transform_2d" qualifiers="const"> @@ -2735,6 +2866,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms. </description> </method> <method name="multimesh_instance_set_color"> @@ -2747,6 +2879,7 @@ <argument index="2" name="color" type="Color"> </argument> <description> + Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]. </description> </method> <method name="multimesh_instance_set_custom_data"> @@ -2759,6 +2892,7 @@ <argument index="2" name="custom_data" type="Color"> </argument> <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> </method> <method name="multimesh_instance_set_transform"> @@ -2771,6 +2905,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. </description> </method> <method name="multimesh_instance_set_transform_2d"> @@ -2783,6 +2918,7 @@ <argument index="2" name="transform" type="Transform2D"> </argument> <description> + Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. </description> </method> <method name="multimesh_set_as_bulk_array"> @@ -2793,6 +2929,11 @@ <argument index="1" name="array" type="PoolRealArray"> </argument> <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> </method> <method name="multimesh_set_mesh"> @@ -2803,6 +2944,7 @@ <argument index="1" name="mesh" type="RID"> </argument> <description> + Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. </description> </method> <method name="multimesh_set_visible_instances"> @@ -2813,18 +2955,25 @@ <argument index="1" name="visible" type="int"> </argument> <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> </method> <method name="omni_light_create"> <return type="RID"> </return> <description> + Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="particles_create"> <return type="RID"> </return> <description> + Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="particles_get_current_aabb"> @@ -2833,6 +2982,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb]. </description> </method> <method name="particles_get_emitting"> @@ -2841,6 +2991,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Returns [code]true[/code] if particles are currently set to emitting. </description> </method> <method name="particles_is_inactive"> @@ -2849,6 +3000,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Returns [code]true[/code] if particles are not emitting and particles are set to inactive. </description> </method> <method name="particles_request_process"> @@ -2857,6 +3009,7 @@ <argument index="0" name="particles" type="RID"> </argument> <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> </method> <method name="particles_restart"> @@ -2865,6 +3018,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Reset the particles on the next update. Equivalent to [method Particles.restart] </description> </method> <method name="particles_set_amount"> @@ -2875,6 +3029,7 @@ <argument index="1" name="amount" type="int"> </argument> <description> + Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount]. </description> </method> <method name="particles_set_custom_aabb"> @@ -2885,6 +3040,7 @@ <argument index="1" name="aabb" type="AABB"> </argument> <description> + Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb]. </description> </method> <method name="particles_set_draw_order"> @@ -2895,6 +3051,7 @@ <argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder"> </argument> <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> </method> <method name="particles_set_draw_pass_mesh"> @@ -2907,6 +3064,7 @@ <argument index="2" name="mesh" type="RID"> </argument> <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> </method> <method name="particles_set_draw_passes"> @@ -2917,6 +3075,7 @@ <argument index="1" name="count" type="int"> </argument> <description> + Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes]. </description> </method> <method name="particles_set_emission_transform"> @@ -2927,6 +3086,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] that will be used by the particles when they first emit. </description> </method> <method name="particles_set_emitting"> @@ -2937,6 +3097,7 @@ <argument index="1" name="emitting" type="bool"> </argument> <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> </method> <method name="particles_set_explosiveness_ratio"> @@ -2947,6 +3108,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness]. </description> </method> <method name="particles_set_fixed_fps"> @@ -2957,6 +3119,7 @@ <argument index="1" name="fps" type="int"> </argument> <description> + Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps]. </description> </method> <method name="particles_set_fractional_delta"> @@ -2967,6 +3130,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta]. </description> </method> <method name="particles_set_lifetime"> @@ -2977,6 +3141,7 @@ <argument index="1" name="lifetime" type="float"> </argument> <description> + Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime]. </description> </method> <method name="particles_set_one_shot"> @@ -2987,6 +3152,7 @@ <argument index="1" name="one_shot" type="bool"> </argument> <description> + If [code]true[/code], particles will emit once and then stop. Equivalent to [member Particles.one_shot]. </description> </method> <method name="particles_set_pre_process_time"> @@ -2997,6 +3163,7 @@ <argument index="1" name="time" type="float"> </argument> <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> </method> <method name="particles_set_process_material"> @@ -3007,6 +3174,7 @@ <argument index="1" name="material" type="RID"> </argument> <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> </method> <method name="particles_set_randomness_ratio"> @@ -3017,6 +3185,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness]. </description> </method> <method name="particles_set_speed_scale"> @@ -3027,6 +3196,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale]. </description> </method> <method name="particles_set_use_local_coordinates"> @@ -3037,12 +3207,16 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member Particles.local_coords]. </description> </method> <method name="reflection_probe_create"> <return type="RID"> </return> <description> + Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="reflection_probe_set_as_interior"> @@ -3053,6 +3227,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. </description> </method> <method name="reflection_probe_set_cull_mask"> @@ -3063,6 +3238,7 @@ <argument index="1" name="layers" type="int"> </argument> <description> + Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. </description> </method> <method name="reflection_probe_set_enable_box_projection"> @@ -3073,6 +3249,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. </description> </method> <method name="reflection_probe_set_enable_shadows"> @@ -3083,6 +3260,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. </description> </method> <method name="reflection_probe_set_extents"> @@ -3093,6 +3271,7 @@ <argument index="1" name="extents" type="Vector3"> </argument> <description> + Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. </description> </method> <method name="reflection_probe_set_intensity"> @@ -3103,6 +3282,7 @@ <argument index="1" name="intensity" type="float"> </argument> <description> + Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. </description> </method> <method name="reflection_probe_set_interior_ambient"> @@ -3113,6 +3293,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. </description> </method> <method name="reflection_probe_set_interior_ambient_energy"> @@ -3123,6 +3304,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. </description> </method> <method name="reflection_probe_set_interior_ambient_probe_contribution"> @@ -3133,6 +3315,7 @@ <argument index="1" name="contrib" type="float"> </argument> <description> + Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. </description> </method> <method name="reflection_probe_set_max_distance"> @@ -3143,6 +3326,7 @@ <argument index="1" name="distance" type="float"> </argument> <description> + Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]. </description> </method> <method name="reflection_probe_set_origin_offset"> @@ -3153,6 +3337,7 @@ <argument index="1" name="offset" type="Vector3"> </argument> <description> + Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. </description> </method> <method name="reflection_probe_set_update_mode"> @@ -3163,6 +3348,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.ReflectionProbeUpdateMode"> </argument> <description> + Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options. </description> </method> <method name="request_frame_drawn_callback"> @@ -3183,6 +3369,9 @@ <return type="RID"> </return> <description> + Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + The scenario is the 3D world that all the visual instances exist in. </description> </method> <method name="scenario_set_debug"> @@ -3193,6 +3382,7 @@ <argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode"> </argument> <description> + Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options. </description> </method> <method name="scenario_set_environment"> @@ -3203,6 +3393,7 @@ <argument index="1" name="environment" type="RID"> </argument> <description> + Sets the environment that will be used with this scenario. </description> </method> <method name="scenario_set_fallback_environment"> @@ -3213,6 +3404,7 @@ <argument index="1" name="environment" type="RID"> </argument> <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> </method> <method name="scenario_set_reflection_atlas_size"> @@ -3225,6 +3417,7 @@ <argument index="2" name="subdiv" type="int"> </argument> <description> + Sets the size of the reflection atlas shared by all reflection probes in this scenario. </description> </method> <method name="set_boot_image"> @@ -3248,6 +3441,7 @@ <argument index="0" name="generate" type="bool"> </argument> <description> + If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode. </description> </method> <method name="set_default_clear_color"> @@ -3256,13 +3450,15 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Sets the default clear color which is used when a specific clear color has not been selected. </description> </method> <method name="shader_create"> <return type="RID"> </return> <description> - Creates an empty shader. + Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="shader_get_code" qualifiers="const"> @@ -3328,6 +3524,7 @@ <argument index="2" name="is_2d_skeleton" type="bool" default="false"> </argument> <description> + Allocates the GPU buffers for this skeleton. </description> </method> <method name="skeleton_bone_get_transform" qualifiers="const"> @@ -3338,6 +3535,7 @@ <argument index="1" name="bone" type="int"> </argument> <description> + Returns the [Transform] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_get_transform_2d" qualifiers="const"> @@ -3348,6 +3546,7 @@ <argument index="1" name="bone" type="int"> </argument> <description> + Returns the [Transform2D] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform"> @@ -3360,6 +3559,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform_2d"> @@ -3372,12 +3572,15 @@ <argument index="2" name="transform" type="Transform2D"> </argument> <description> + Sets the [Transform2D] for a specific bone of this skeleton. </description> </method> <method name="skeleton_create"> <return type="RID"> </return> <description> + Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="skeleton_get_bone_count" qualifiers="const"> @@ -3386,13 +3589,15 @@ <argument index="0" name="skeleton" type="RID"> </argument> <description> + Returns the number of bones allocated for this skeleton. </description> </method> <method name="sky_create"> <return type="RID"> </return> <description> - Creates an empty sky. + Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="sky_set_texture"> @@ -3412,12 +3617,16 @@ <return type="RID"> </return> <description> + Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="sync"> <return type="void"> </return> <description> + Not implemented in Godot 3.x. </description> </method> <method name="texture_allocate"> @@ -3438,6 +3647,7 @@ <argument index="6" name="flags" type="int" default="7"> </argument> <description> + Allocates the GPU memory for the texture. </description> </method> <method name="texture_bind"> @@ -3455,7 +3665,8 @@ <return type="RID"> </return> <description> - Creates an empty texture. + Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="texture_create_from_image"> @@ -3493,6 +3704,7 @@ <argument index="0" name="texture" type="RID"> </argument> <description> + Returns the depth of the texture. </description> </method> <method name="texture_get_flags" qualifiers="const"> @@ -3546,6 +3758,7 @@ <argument index="0" name="texture" type="RID"> </argument> <description> + Returns the type of the texture, can be any of the [enum TextureType]. </description> </method> <method name="texture_get_width" qualifiers="const"> @@ -3594,6 +3807,7 @@ <argument index="9" name="layer" type="int" default="0"> </argument> <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> </method> <method name="texture_set_flags"> @@ -3639,6 +3853,7 @@ <argument index="3" name="depth" type="int"> </argument> <description> + Resizes the texture to the specified dimensions. </description> </method> <method name="textures_keep_original"> @@ -3696,7 +3911,8 @@ <return type="RID"> </return> <description> - Creates an empty viewport. + Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="viewport_detach"> @@ -3864,6 +4080,7 @@ <argument index="1" name="hidden" type="bool"> </argument> <description> + Currently unimplemented in Godot 3.x. </description> </method> <method name="viewport_set_msaa"> @@ -4021,6 +4238,7 @@ Marks an error that shows that the index array is empty. </constant> <constant name="ARRAY_WEIGHTS_SIZE" value="4"> + Number of weights/bones per vertex. </constant> <constant name="CANVAS_ITEM_Z_MIN" value="-4096"> The minimum Z-layer for canvas items. @@ -4029,8 +4247,10 @@ The maximum Z-layer for canvas items. </constant> <constant name="MAX_GLOW_LEVELS" value="7"> + Max number of glow levels that can be used with glow post-process effect. </constant> <constant name="MAX_CURSORS" value="8"> + Unused enum in Godot 3.x. </constant> <constant name="MATERIAL_RENDER_PRIORITY_MIN" value="-128"> The minimum renderpriority of all materials. @@ -4057,12 +4277,16 @@ Marks the back side of a cubemap. </constant> <constant name="TEXTURE_TYPE_2D" value="0" enum="TextureType"> + Normal texture with 2 dimensions, width and height. </constant> <constant name="TEXTURE_TYPE_CUBEMAP" value="1" enum="TextureType"> + Texture made up of six faces, can be looked up with a [code]vec3[/code] in shader. </constant> <constant name="TEXTURE_TYPE_2D_ARRAY" value="2" enum="TextureType"> + An array of 2-dimensional textures. </constant> <constant name="TEXTURE_TYPE_3D" value="3" enum="TextureType"> + A 3-dimensional texture with width, height, and depth. </constant> <constant name="TEXTURE_FLAG_MIPMAPS" value="1" enum="TextureFlags"> Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. @@ -4177,11 +4401,13 @@ Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> + Flag used to mark a compressed bone array. </constant> <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> Flag used to mark a compressed (half float) weight array. </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> + Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> Flag used to mark that the array contains 2D vertices. @@ -4217,8 +4443,10 @@ Represents the size of the [enum PrimitiveType] enum. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> + Blend shapes are normalized. </constant> <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> + Blend shapes are relative to base weight. </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. @@ -4251,47 +4479,67 @@ Scales the shadow color. </constant> <constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="8" enum="LightParam"> + Max distance that shadows will be rendered. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="LightParam"> + Proportion of shadow atlas occupied by the first split. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="LightParam"> + Proportion of shadow atlas occupied by the second split. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="LightParam"> + Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. </constant> <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="12" enum="LightParam"> + Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. </constant> <constant name="LIGHT_PARAM_SHADOW_BIAS" value="13" enum="LightParam"> + Bias the shadow lookup to fix self-shadowing artifacts. </constant> <constant name="LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="LightParam"> + Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. </constant> <constant name="LIGHT_PARAM_MAX" value="15" enum="LightParam"> Represents the size of the [enum LightParam] enum. </constant> <constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode"> + Use a dual paraboloid shadow map for omni lights. </constant> <constant name="LIGHT_OMNI_SHADOW_CUBE" value="1" enum="LightOmniShadowMode"> + Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. </constant> <constant name="LIGHT_OMNI_SHADOW_DETAIL_VERTICAL" value="0" enum="LightOmniShadowDetail"> + Use more detail vertically when computing shadow map. </constant> <constant name="LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL" value="1" enum="LightOmniShadowDetail"> + Use more detail horizontally when computing shadow map. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL" value="0" enum="LightDirectionalShadowMode"> + Use orthogonal shadow projection for directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS" value="1" enum="LightDirectionalShadowMode"> + Use 2 splits for shadow projection when using directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS" value="2" enum="LightDirectionalShadowMode"> + Use 4 splits for shadow projection when using directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE" value="0" enum="LightDirectionalShadowDepthRangeMode"> + Keeps shadows stable as camera moves but has lower effective resolution. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="LightDirectionalShadowDepthRangeMode"> + Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. </constant> <constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode"> + Do not update the viewport. </constant> <constant name="VIEWPORT_UPDATE_ONCE" value="1" enum="ViewportUpdateMode"> + Update the viewport once then set to disabled. </constant> <constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode"> + Update the viewport whenever it is visible. </constant> <constant name="VIEWPORT_UPDATE_ALWAYS" value="3" enum="ViewportUpdateMode"> + Always update the viewport. </constant> <constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode"> The viewport is always cleared before drawing. @@ -4336,16 +4584,22 @@ The Viewport renders 3D but without effects. </constant> <constant name="VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="ViewportRenderInfo"> + Number of objects drawn in a single frame. </constant> <constant name="VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME" value="1" enum="ViewportRenderInfo"> + Number of vertices drawn in a single frame. </constant> <constant name="VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="ViewportRenderInfo"> + Number of material changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="ViewportRenderInfo"> + Number of shader changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="ViewportRenderInfo"> + Number of surface changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5" enum="ViewportRenderInfo"> + Number of draw calls during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_MAX" value="6" enum="ViewportRenderInfo"> Represents the size of the [enum ViewportRenderInfo] enum. @@ -4363,12 +4617,16 @@ Debug draw draws objects in wireframe. </constant> <constant name="SCENARIO_DEBUG_DISABLED" value="0" enum="ScenarioDebugMode"> + Do not use a debug mode. </constant> <constant name="SCENARIO_DEBUG_WIREFRAME" value="1" enum="ScenarioDebugMode"> + Draw all objects as wireframe models. </constant> <constant name="SCENARIO_DEBUG_OVERDRAW" value="2" enum="ScenarioDebugMode"> + Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw. </constant> <constant name="SCENARIO_DEBUG_SHADELESS" value="3" enum="ScenarioDebugMode"> + Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code]. </constant> <constant name="INSTANCE_NONE" value="0" enum="InstanceType"> The instance does not have a type. @@ -4389,10 +4647,13 @@ The instance is a light. </constant> <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType"> + The instance is a reflection probe. </constant> <constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType"> + The instance is a GI probe. </constant> <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType"> + The instance is a lightmap capture. </constant> <constant name="INSTANCE_MAX" value="9" enum="InstanceType"> Represents the size of the [enum InstanceType] enum. @@ -4401,19 +4662,25 @@ A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). </constant> <constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags"> + Allows the instance to be used in baked lighting. </constant> <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="InstanceFlags"> + When set, manually requests to draw geometry on next frame. </constant> <constant name="INSTANCE_FLAG_MAX" value="2" enum="InstanceFlags"> Represents the size of the [enum InstanceFlags] enum. </constant> <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting"> + Disable shadows from this instance. </constant> <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting"> + Cast shadows from this instance. </constant> <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting"> + Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. </constant> <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting"> + Only render the shadows from the object. The object itself will not be drawn. </constant> <constant name="NINE_PATCH_STRETCH" value="0" enum="NinePatchAxisMode"> The nine patch gets stretched where needed. @@ -4437,16 +4704,22 @@ The light adds color depending on mask. </constant> <constant name="CANVAS_LIGHT_FILTER_NONE" value="0" enum="CanvasLightShadowFilter"> + Do not apply a filter to canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF3" value="1" enum="CanvasLightShadowFilter"> + Use PCF3 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF5" value="2" enum="CanvasLightShadowFilter"> + Use PCF5 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF7" value="3" enum="CanvasLightShadowFilter"> + Use PCF7 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF9" value="4" enum="CanvasLightShadowFilter"> + Use PCF9 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF13" value="5" enum="CanvasLightShadowFilter"> + Use PCF13 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_OCCLUDER_POLYGON_CULL_DISABLED" value="0" enum="CanvasOccluderPolygonCullMode"> Culling of the canvas occluder is disabled. @@ -4488,85 +4761,124 @@ The amount of vertex memory used. </constant> <constant name="FEATURE_SHADERS" value="0" enum="Features"> + Hardware supports shaders. This enum is currently unused in Godot 3.x. </constant> <constant name="FEATURE_MULTITHREADED" value="1" enum="Features"> + Hardware supports multithreading. This enum is currently unused in Godot 3.x. </constant> <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat"> + Use [Transform2D] to store MultiMesh transform. </constant> <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> + Use [Transform] to store MultiMesh transform. </constant> <constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat"> + MultiMesh does not use per-instance color. </constant> <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 name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat"> + MultiMesh color uses a float per channel. </constant> <constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat"> + MultiMesh does not use custom data. </constant> <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 name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat"> + MultiMesh custom data uses a float per component. </constant> <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> + Reflection probe will update reflections once and then stop. </constant> <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode"> + Reflection probe will update each frame. This mode is necessary to capture moving objects. </constant> <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder"> + Draw particles in the order that they appear in the particles array. </constant> <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> + Sort particles based on their lifetime. </constant> <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder"> + Sort particles based on their distance to the camera. </constant> <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG"> + Use the clear color as background. </constant> <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG"> + Use a specified color as the background. </constant> <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG"> + Use a sky resource for the background. </constant> <constant name="ENV_BG_COLOR_SKY" value="3" enum="EnvironmentBG"> + Use a custom color for background, but use a sky for shading and reflections. </constant> <constant name="ENV_BG_CANVAS" value="4" enum="EnvironmentBG"> + Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. </constant> <constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG"> + Do not clear the background, use whatever was rendered last frame as the background. </constant> <constant name="ENV_BG_MAX" value="7" enum="EnvironmentBG"> Represents the size of the [enum EnvironmentBG] enum. </constant> <constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality"> + Use lowest blur quality. Fastest, but may look bad. </constant> <constant name="ENV_DOF_BLUR_QUALITY_MEDIUM" value="1" enum="EnvironmentDOFBlurQuality"> + Use medium blur quality. </constant> <constant name="ENV_DOF_BLUR_QUALITY_HIGH" value="2" enum="EnvironmentDOFBlurQuality"> + Used highest blur quality. Looks the best, but is the slowest. </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode"> + Add the effect of the glow on top of the scene. </constant> <constant name="GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode"> + Blends the glow effect with the screen. Does not get as bright as additive. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode"> + Produces a subtle color disturbance around objects. </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode"> + Shows the glow effect by itself without the underlying scene. </constant> <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper"> + Output color as they came in. </constant> <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper"> + Use the Reinhard tonemapper. </constant> <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper"> + Use the filmic tonemapper. </constant> <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> + Use the ACES tonemapper. </constant> <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> + Lowest quality of screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> + Medium quality screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality"> + Highest quality screen space ambient occlusion. </constant> <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur"> + Disables the blur set for SSAO. Will make SSAO look noisier. </constant> <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur"> + Perform a 1x1 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur"> + Performs a 2x2 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur"> + Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. </constant> </constants> </class> |