Updated docs for many VisualServer methods

This commit is contained in:
clayjohn 2019-12-14 16:38:19 -08:00
parent ce7d3bb1c7
commit f88f762240

View file

@ -44,6 +44,7 @@
<return type="RID"> <return type="RID">
</return> </return>
<description> <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.
</description> </description>
</method> </method>
<method name="camera_set_cull_mask"> <method name="camera_set_cull_mask">
@ -54,6 +55,7 @@
<argument index="1" name="layers" type="int"> <argument index="1" name="layers" type="int">
</argument> </argument>
<description> <description>
Sets the cull mask associated with this camera. The cull mask describes which 3d layers are rendered by this camera. Equivalent to [member Camera.cull_mask].
</description> </description>
</method> </method>
<method name="camera_set_environment"> <method name="camera_set_environment">
@ -64,6 +66,7 @@
<argument index="1" name="env" type="RID"> <argument index="1" name="env" type="RID">
</argument> </argument>
<description> <description>
Sets the environment used by this camera. Equivalent to [member Camera.environment].
</description> </description>
</method> </method>
<method name="camera_set_frustum"> <method name="camera_set_frustum">
@ -80,6 +83,7 @@
<argument index="4" name="z_far" type="float"> <argument index="4" name="z_far" type="float">
</argument> </argument>
<description> <description>
Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects.
</description> </description>
</method> </method>
<method name="camera_set_orthogonal"> <method name="camera_set_orthogonal">
@ -94,6 +98,7 @@
<argument index="3" name="z_far" type="float"> <argument index="3" name="z_far" type="float">
</argument> </argument>
<description> <description>
Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.
</description> </description>
</method> </method>
<method name="camera_set_perspective"> <method name="camera_set_perspective">
@ -108,6 +113,7 @@
<argument index="3" name="z_far" type="float"> <argument index="3" name="z_far" type="float">
</argument> </argument>
<description> <description>
Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away.
</description> </description>
</method> </method>
<method name="camera_set_transform"> <method name="camera_set_transform">
@ -118,6 +124,7 @@
<argument index="1" name="transform" type="Transform"> <argument index="1" name="transform" type="Transform">
</argument> </argument>
<description> <description>
Sets [Transform] of camera.
</description> </description>
</method> </method>
<method name="camera_set_use_vertical_aspect"> <method name="camera_set_use_vertical_aspect">
@ -128,6 +135,7 @@
<argument index="1" name="enable" type="bool"> <argument index="1" name="enable" type="bool">
</argument> </argument>
<description> <description>
If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT].
</description> </description>
</method> </method>
<method name="canvas_create"> <method name="canvas_create">
@ -198,6 +206,7 @@
<argument index="5" name="normal_map" type="RID"> <argument index="5" name="normal_map" type="RID">
</argument> </argument>
<description> <description>
Adds a mesh command to the [CanvasItem]'s draw commands.
</description> </description>
</method> </method>
<method name="canvas_item_add_multimesh"> <method name="canvas_item_add_multimesh">
@ -414,6 +423,7 @@
<argument index="10" name="antialiased" type="bool" default="false"> <argument index="10" name="antialiased" type="bool" default="false">
</argument> </argument>
<description> <description>
Adds a triangle array to the [CanvasItem]'s draw commands.
</description> </description>
</method> </method>
<method name="canvas_item_clear"> <method name="canvas_item_clear">
@ -477,6 +487,7 @@
<argument index="1" name="enabled" type="bool"> <argument index="1" name="enabled" type="bool">
</argument> </argument>
<description> <description>
Enables the use of distance fields for GUI elements that are rendering distance field based fonts.
</description> </description>
</method> </method>
<method name="canvas_item_set_draw_behind_parent"> <method name="canvas_item_set_draw_behind_parent">
@ -800,6 +811,7 @@
<argument index="1" name="scale" type="float"> <argument index="1" name="scale" type="float">
</argument> </argument>
<description> <description>
Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale].
</description> </description>
</method> </method>
<method name="canvas_light_set_shadow_buffer_size"> <method name="canvas_light_set_shadow_buffer_size">
@ -876,6 +888,7 @@
<argument index="1" name="texture" type="RID"> <argument index="1" name="texture" type="RID">
</argument> </argument>
<description> <description>
Sets texture to be used by light. Equivalent to [member Light2D.texture].
</description> </description>
</method> </method>
<method name="canvas_light_set_texture_offset"> <method name="canvas_light_set_texture_offset">
@ -886,6 +899,7 @@
<argument index="1" name="offset" type="Vector2"> <argument index="1" name="offset" type="Vector2">
</argument> </argument>
<description> <description>
Sets the offset of the light's texture. Equivalent to [member Light2D.offset].
</description> </description>
</method> </method>
<method name="canvas_light_set_transform"> <method name="canvas_light_set_transform">
@ -909,6 +923,7 @@
<argument index="2" name="max_z" type="int"> <argument index="2" name="max_z" type="int">
</argument> </argument>
<description> <description>
Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max].
</description> </description>
</method> </method>
<method name="canvas_occluder_polygon_create"> <method name="canvas_occluder_polygon_create">
@ -981,6 +996,7 @@
<return type="RID"> <return type="RID">
</return> </return>
<description> <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.
</description> </description>
</method> </method>
<method name="draw"> <method name="draw">
@ -991,12 +1007,14 @@
<argument index="1" name="frame_step" type="float" default="0.0"> <argument index="1" name="frame_step" type="float" default="0.0">
</argument> </argument>
<description> <description>
Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead.
</description> </description>
</method> </method>
<method name="environment_create"> <method name="environment_create">
<return type="RID"> <return type="RID">
</return> </return>
<description> <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.
</description> </description>
</method> </method>
<method name="environment_set_adjustment"> <method name="environment_set_adjustment">
@ -1015,6 +1033,7 @@
<argument index="5" name="ramp" type="RID"> <argument index="5" name="ramp" type="RID">
</argument> </argument>
<description> <description>
Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_ambient_light"> <method name="environment_set_ambient_light">
@ -1029,6 +1048,7 @@
<argument index="3" name="sky_contibution" type="float" default="0.0"> <argument index="3" name="sky_contibution" type="float" default="0.0">
</argument> </argument>
<description> <description>
Sets the ambient light parameters. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_background"> <method name="environment_set_background">
@ -1039,6 +1059,7 @@
<argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG"> <argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG">
</argument> </argument>
<description> <description>
Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode].
</description> </description>
</method> </method>
<method name="environment_set_bg_color"> <method name="environment_set_bg_color">
@ -1049,6 +1070,7 @@
<argument index="1" name="color" type="Color"> <argument index="1" name="color" type="Color">
</argument> </argument>
<description> <description>
Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes).
</description> </description>
</method> </method>
<method name="environment_set_bg_energy"> <method name="environment_set_bg_energy">
@ -1059,6 +1081,7 @@
<argument index="1" name="energy" type="float"> <argument index="1" name="energy" type="float">
</argument> </argument>
<description> <description>
Sets the intensity of the background color.
</description> </description>
</method> </method>
<method name="environment_set_canvas_max_layer"> <method name="environment_set_canvas_max_layer">
@ -1069,6 +1092,7 @@
<argument index="1" name="max_layer" type="int"> <argument index="1" name="max_layer" type="int">
</argument> </argument>
<description> <description>
Sets the maximum layer to use if using Canvas background mode.
</description> </description>
</method> </method>
<method name="environment_set_dof_blur_far"> <method name="environment_set_dof_blur_far">
@ -1087,6 +1111,7 @@
<argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality">
</argument> </argument>
<description> <description>
Sets the values to be used with the "DoF Far Blur" post-process effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_dof_blur_near"> <method name="environment_set_dof_blur_near">
@ -1105,6 +1130,7 @@
<argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality">
</argument> </argument>
<description> <description>
Sets the values to be used with the "DoF Near Blur" post-process effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_fog"> <method name="environment_set_fog">
@ -1121,6 +1147,7 @@
<argument index="4" name="sun_amount" type="float"> <argument index="4" name="sun_amount" type="float">
</argument> </argument>
<description> <description>
Sets the variables to be used with the scene fog. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_fog_depth"> <method name="environment_set_fog_depth">
@ -1141,6 +1168,7 @@
<argument index="6" name="transmit_curve" type="float"> <argument index="6" name="transmit_curve" type="float">
</argument> </argument>
<description> <description>
Sets the variables to be used with the fog depth effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_fog_height"> <method name="environment_set_fog_height">
@ -1157,6 +1185,7 @@
<argument index="4" name="height_curve" type="float"> <argument index="4" name="height_curve" type="float">
</argument> </argument>
<description> <description>
Sets the variables to be used with the fog height effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_glow"> <method name="environment_set_glow">
@ -1185,6 +1214,7 @@
<argument index="10" name="bicubic_upscale" type="bool"> <argument index="10" name="bicubic_upscale" type="bool">
</argument> </argument>
<description> <description>
Sets the variables to be used with the "glow" post-process effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_sky"> <method name="environment_set_sky">
@ -1195,6 +1225,7 @@
<argument index="1" name="sky" type="RID"> <argument index="1" name="sky" type="RID">
</argument> </argument>
<description> <description>
Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky].
</description> </description>
</method> </method>
<method name="environment_set_sky_custom_fov"> <method name="environment_set_sky_custom_fov">
@ -1205,6 +1236,7 @@
<argument index="1" name="scale" type="float"> <argument index="1" name="scale" type="float">
</argument> </argument>
<description> <description>
Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov].
</description> </description>
</method> </method>
<method name="environment_set_sky_orientation"> <method name="environment_set_sky_orientation">
@ -1215,6 +1247,7 @@
<argument index="1" name="orientation" type="Basis"> <argument index="1" name="orientation" type="Basis">
</argument> </argument>
<description> <description>
Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation].
</description> </description>
</method> </method>
<method name="environment_set_ssao"> <method name="environment_set_ssao">
@ -1247,6 +1280,7 @@
<argument index="12" name="bilateral_sharpness" type="float"> <argument index="12" name="bilateral_sharpness" type="float">
</argument> </argument>
<description> <description>
Sets the variables to be used with the "Screen Space Ambient Occlusion (SSAO)" post-process effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_ssr"> <method name="environment_set_ssr">
@ -1267,6 +1301,7 @@
<argument index="6" name="roughness" type="bool"> <argument index="6" name="roughness" type="bool">
</argument> </argument>
<description> <description>
Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="environment_set_tonemap"> <method name="environment_set_tonemap">
@ -1291,6 +1326,7 @@
<argument index="8" name="auto_exp_grey" type="float"> <argument index="8" name="auto_exp_grey" type="float">
</argument> </argument>
<description> <description>
Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details.
</description> </description>
</method> </method>
<method name="finish"> <method name="finish">
@ -1308,6 +1344,7 @@
<argument index="1" name="frame_step" type="float" default="0.0"> <argument index="1" name="frame_step" type="float" default="0.0">
</argument> </argument>
<description> <description>
Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution.
</description> </description>
</method> </method>
<method name="force_sync"> <method name="force_sync">
@ -1594,6 +1631,7 @@
<argument index="2" name="texture" type="RID"> <argument index="2" name="texture" type="RID">
</argument> </argument>
<description> <description>
Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin].
</description> </description>
</method> </method>
<method name="immediate_clear"> <method name="immediate_clear">
@ -1602,6 +1640,7 @@
<argument index="0" name="immediate" type="RID"> <argument index="0" name="immediate" type="RID">
</argument> </argument>
<description> <description>
Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear].
</description> </description>
</method> </method>
<method name="immediate_color"> <method name="immediate_color">
@ -1612,12 +1651,14 @@
<argument index="1" name="color" type="Color"> <argument index="1" name="color" type="Color">
</argument> </argument>
<description> <description>
Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color].
</description> </description>
</method> </method>
<method name="immediate_create"> <method name="immediate_create">
<return type="RID"> <return type="RID">
</return> </return>
<description> <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.
</description> </description>
</method> </method>
<method name="immediate_end"> <method name="immediate_end">
@ -1626,6 +1667,7 @@
<argument index="0" name="immediate" type="RID"> <argument index="0" name="immediate" type="RID">
</argument> </argument>
<description> <description>
Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end].
</description> </description>
</method> </method>
<method name="immediate_get_material" qualifiers="const"> <method name="immediate_get_material" qualifiers="const">
@ -1634,6 +1676,7 @@
<argument index="0" name="immediate" type="RID"> <argument index="0" name="immediate" type="RID">
</argument> </argument>
<description> <description>
Returns the material assigned to the [ImmediateGeometry].
</description> </description>
</method> </method>
<method name="immediate_normal"> <method name="immediate_normal">
@ -1644,6 +1687,7 @@
<argument index="1" name="normal" type="Vector3"> <argument index="1" name="normal" type="Vector3">
</argument> </argument>
<description> <description>
Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal].
</description> </description>
</method> </method>
<method name="immediate_set_material"> <method name="immediate_set_material">
@ -1654,6 +1698,7 @@
<argument index="1" name="material" type="RID"> <argument index="1" name="material" type="RID">
</argument> </argument>
<description> <description>
Sets the material to be used to draw the [ImmediateGeometry].
</description> </description>
</method> </method>
<method name="immediate_tangent"> <method name="immediate_tangent">
@ -1664,6 +1709,7 @@
<argument index="1" name="tangent" type="Plane"> <argument index="1" name="tangent" type="Plane">
</argument> </argument>
<description> <description>
Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent].
</description> </description>
</method> </method>
<method name="immediate_uv"> <method name="immediate_uv">
@ -1674,6 +1720,7 @@
<argument index="1" name="tex_uv" type="Vector2"> <argument index="1" name="tex_uv" type="Vector2">
</argument> </argument>
<description> <description>
Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv].
</description> </description>
</method> </method>
<method name="immediate_uv2"> <method name="immediate_uv2">
@ -1684,6 +1731,7 @@
<argument index="1" name="tex_uv" type="Vector2"> <argument index="1" name="tex_uv" type="Vector2">
</argument> </argument>
<description> <description>
Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2].
</description> </description>
</method> </method>
<method name="immediate_vertex"> <method name="immediate_vertex">
@ -1694,6 +1742,7 @@
<argument index="1" name="vertex" type="Vector3"> <argument index="1" name="vertex" type="Vector3">
</argument> </argument>
<description> <description>
Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry.add_vertex].
</description> </description>
</method> </method>
<method name="immediate_vertex_2d"> <method name="immediate_vertex_2d">
@ -3956,10 +4005,12 @@
<signals> <signals>
<signal name="frame_post_draw"> <signal name="frame_post_draw">
<description> <description>
Emitted at the end of the frame, after the VisualServer has finished updating all the Viewports.
</description> </description>
</signal> </signal>
<signal name="frame_pre_draw"> <signal name="frame_pre_draw">
<description> <description>
Emitted at the beginning of the frame, before the VisualServer updates all the Viewports.
</description> </description>
</signal> </signal>
</signals> </signals>