doc: Sync classref with current source

Adds API changes from the new GPU lightmapper.
This commit is contained in:
Rémi Verschelde 2020-05-12 10:10:34 +02:00
parent 845ac76b23
commit d3bd219362
22 changed files with 317 additions and 185 deletions

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BakedLightmap" inherits="VisualInstance3D" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0005">
</member>
<member name="bounces" type="int" setter="set_bounces" getter="get_bounces" default="1">
</member>
<member name="directional" type="bool" setter="set_directional" getter="is_directional" default="false">
</member>
<member name="environment_custom_color" type="Color" setter="set_environment_custom_color" getter="get_environment_custom_color">
</member>
<member name="environment_custom_energy" type="float" setter="set_environment_custom_energy" getter="get_environment_custom_energy">
</member>
<member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky">
</member>
<member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="BakedLightmap.EnvironmentMode" default="0">
</member>
<member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="BakedLightmap.GenerateProbes" default="0">
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
</member>
<member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data">
</member>
<member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384">
</member>
<member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1">
</member>
<member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true">
</member>
</members>
<constants>
<constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality">
</constant>
<constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality">
</constant>
<constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality">
</constant>
<constant name="BAKE_QUALITY_ULTRA" value="3" enum="BakeQuality">
</constant>
<constant name="GENERATE_PROBES_DISABLED" value="0" enum="GenerateProbes">
</constant>
<constant name="GENERATE_PROBES_SUBDIV_4" value="1" enum="GenerateProbes">
</constant>
<constant name="GENERATE_PROBES_SUBDIV_8" value="2" enum="GenerateProbes">
</constant>
<constant name="GENERATE_PROBES_SUBDIV_16" value="3" enum="GenerateProbes">
</constant>
<constant name="GENERATE_PROBES_SUBDIV_32" value="4" enum="GenerateProbes">
</constant>
<constant name="BAKE_ERROR_OK" value="0" enum="BakeError">
</constant>
<constant name="BAKE_ERROR_NO_LIGHTMAPPER" value="1" enum="BakeError">
</constant>
<constant name="BAKE_ERROR_NO_SAVE_PATH" value="2" enum="BakeError">
</constant>
<constant name="BAKE_ERROR_NO_MESHES" value="3" enum="BakeError">
</constant>
<constant name="BAKE_ERROR_MESHES_INVALID" value="4" enum="BakeError">
</constant>
<constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="5" enum="BakeError">
</constant>
<constant name="BAKE_ERROR_USER_ABORTED" value="6" enum="BakeError">
</constant>
<constant name="ENVIRONMENT_MODE_DISABLED" value="0" enum="EnvironmentMode">
</constant>
<constant name="ENVIRONMENT_MODE_SCENE" value="1" enum="EnvironmentMode">
</constant>
<constant name="ENVIRONMENT_MODE_CUSTOM_SKY" value="2" enum="EnvironmentMode">
</constant>
<constant name="ENVIRONMENT_MODE_CUSTOM_COLOR" value="3" enum="EnvironmentMode">
</constant>
</constants>
</class>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BakedLightmapData" inherits="Resource" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_user">
<return type="void">
</return>
<argument index="0" name="path" type="NodePath">
</argument>
<argument index="1" name="lightmap" type="Rect2">
</argument>
<argument index="2" name="offset" type="int">
</argument>
<argument index="3" name="arg3" type="int">
</argument>
<description>
</description>
</method>
<method name="clear_users">
<return type="void">
</return>
<description>
</description>
</method>
<method name="get_user_count" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_user_path" qualifiers="const">
<return type="NodePath">
</return>
<argument index="0" name="user_idx" type="int">
</argument>
<description>
</description>
</method>
<method name="is_using_spherical_harmonics" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
<method name="set_uses_spherical_harmonics">
<return type="void">
</return>
<argument index="0" name="uses_spherical_harmonics" type="bool">
</argument>
<description>
</description>
</method>
</methods>
<members>
<member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Cubemap" inherits="TextureLayered" version="4.0">
<class name="Cubemap" inherits="ImageTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CubemapArray" inherits="TextureLayered" version="4.0">
<class name="CubemapArray" inherits="ImageTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>

View File

@ -19,7 +19,7 @@
<argument index="1" name="create_visual_debug" type="bool" default="false">
</argument>
<description>
Bakes the effect from all [GeometryInstance3D]s marked with [member GeometryInstance3D.use_in_baked_light] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring.
Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring.
</description>
</method>
<method name="debug_bake">

View File

@ -9,15 +9,6 @@
<tutorials>
</tutorials>
<methods>
<method name="get_flag" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="flag" type="int" enum="GeometryInstance3D.Flags">
</argument>
<description>
Returns the [enum GeometryInstance3D.Flags] that have been set for this object.
</description>
</method>
<method name="get_shader_instance_uniform" qualifiers="const">
<return type="Variant">
</return>
@ -35,17 +26,6 @@
Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero.
</description>
</method>
<method name="set_flag">
<return type="void">
</return>
<argument index="0" name="flag" type="int" enum="GeometryInstance3D.Flags">
</argument>
<argument index="1" name="value" type="bool">
</argument>
<description>
Sets the [enum GeometryInstance3D.Flags] specified. See [enum GeometryInstance3D.Flags] for options.
</description>
</method>
<method name="set_shader_instance_uniform">
<return type="void">
</return>
@ -64,6 +44,10 @@
<member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0">
The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box.
</member>
<member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale" default="0">
</member>
<member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0">
</member>
<member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0">
The GeometryInstance3D's max LOD distance.
[b]Note:[/b] This property currently has no effect.
@ -84,11 +68,6 @@
The material override for the whole geometry.
If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
</member>
<member name="use_dynamic_gi" type="bool" setter="set_flag" getter="get_flag" default="false">
</member>
<member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], this GeometryInstance3D will be used when baking lights using a [GIProbe].
</member>
</members>
<constants>
<constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
@ -106,16 +85,21 @@
Will only show the shadows casted from this object.
In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
</constant>
<constant name="FLAG_USE_BAKED_LIGHT" value="0" enum="Flags">
Will allow the GeometryInstance3D to be used when baking lights using a [GIProbe].
<constant name="GI_MODE_DISABLED" value="0" enum="GIMode">
</constant>
<constant name="FLAG_USE_DYNAMIC_GI" value="1" enum="Flags">
<constant name="GI_MODE_BAKED" value="1" enum="GIMode">
</constant>
<constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="2" enum="Flags">
Unused in this class, exposed for consistency with [enum RenderingServer.InstanceFlags].
<constant name="GI_MODE_DYNAMIC" value="2" enum="GIMode">
</constant>
<constant name="FLAG_MAX" value="3" enum="Flags">
Represents the size of the [enum Flags] enum.
<constant name="LIGHTMAP_SCALE_1X" value="0" enum="LightmapScale">
</constant>
<constant name="LIGHTMAP_SCALE_2X" value="1" enum="LightmapScale">
</constant>
<constant name="LIGHTMAP_SCALE_4X" value="2" enum="LightmapScale">
</constant>
<constant name="LIGHTMAP_SCALE_8X" value="3" enum="LightmapScale">
</constant>
<constant name="LIGHTMAP_SCALE_MAX" value="4" enum="LightmapScale">
</constant>
</constants>
</class>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapProbe" inherits="Node3D" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapperRD" inherits="Lightmapper" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -102,7 +102,7 @@
</method>
</methods>
<members>
<member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )">
<member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i( 0, 0 )">
Sets a hint to be used for lightmap resolution.
</member>
</members>

View File

@ -977,8 +977,32 @@
<member name="rendering/environment/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
[Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here.
</member>
<member name="rendering/gpu_lightmapper/performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
</member>
<member name="rendering/gpu_lightmapper/performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
</member>
<member name="rendering/gpu_lightmapper/performance/region_size" type="int" setter="" getter="" default="512">
</member>
<member name="rendering/gpu_lightmapper/quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512">
</member>
<member name="rendering/gpu_lightmapper/quality/high_quality_ray_count" type="int" setter="" getter="" default="256">
</member>
<member name="rendering/gpu_lightmapper/quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64">
</member>
<member name="rendering/gpu_lightmapper/quality/low_quality_ray_count" type="int" setter="" getter="" default="16">
</member>
<member name="rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256">
</member>
<member name="rendering/gpu_lightmapper/quality/medium_quality_ray_count" type="int" setter="" getter="" default="64">
</member>
<member name="rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048">
</member>
<member name="rendering/gpu_lightmapper/quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024">
</member>
<member name="rendering/high_end/global_shader_variables_buffer_size" type="int" setter="" getter="" default="65536">
</member>
<member name="rendering/lightmapper/probe_capture_update_speed" type="float" setter="" getter="" default="15">
</member>
<member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="128000">
Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves.
</member>

View File

@ -1282,7 +1282,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 RenderingServer 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.
Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap, 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">
@ -1377,19 +1377,6 @@
Sets the world space transform of the instance. Equivalent to [member Node3D.transform].
</description>
</method>
<method name="instance_set_use_lightmap">
<return type="void">
</return>
<argument index="0" name="instance" type="RID">
</argument>
<argument index="1" name="lightmap_instance" type="RID">
</argument>
<argument index="2" name="lightmap" type="RID">
</argument>
<description>
Sets the lightmap to use with this instance.
</description>
</method>
<method name="instance_set_visible">
<return type="void">
</return>
@ -1584,115 +1571,6 @@
Sets whether GI probes capture light information from this light.
</description>
</method>
<method name="lightmap_capture_create">
<return type="RID">
</return>
<description>
Creates a lightmap capture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] RenderingServer functions.
Once finished with your RID, you will want to free the RID using the RenderingServer'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">
<return type="AABB">
</return>
<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">
<return type="float">
</return>
<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">
<return type="PackedByteArray">
</return>
<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">
<return type="int">
</return>
<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">
<return type="Transform">
</return>
<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">
<return type="void">
</return>
<argument index="0" name="capture" type="RID">
</argument>
<argument index="1" name="bounds" type="AABB">
</argument>
<description>
Sets the size of the area covered by the lightmap capture.
</description>
</method>
<method name="lightmap_capture_set_energy">
<return type="void">
</return>
<argument index="0" name="capture" type="RID">
</argument>
<argument index="1" name="energy" type="float">
</argument>
<description>
Sets the energy multiplier for this lightmap capture.
</description>
</method>
<method name="lightmap_capture_set_octree">
<return type="void">
</return>
<argument index="0" name="capture" type="RID">
</argument>
<argument index="1" name="octree" type="PackedByteArray">
</argument>
<description>
Sets the octree to be used by this lightmap capture.
</description>
</method>
<method name="lightmap_capture_set_octree_cell_subdiv">
<return type="void">
</return>
<argument index="0" name="capture" type="RID">
</argument>
<argument index="1" name="subdiv" type="int">
</argument>
<description>
Sets the subdivision level of this lightmap capture's octree.
</description>
</method>
<method name="lightmap_capture_set_octree_cell_transform">
<return type="void">
</return>
<argument index="0" name="capture" type="RID">
</argument>
<argument index="1" name="xform" type="Transform">
</argument>
<description>
Sets the octree cell transform for this lightmap capture's octree.
</description>
</method>
<method name="make_sphere_mesh">
<return type="RID">
</return>
@ -3725,8 +3603,8 @@
<constant name="INSTANCE_GI_PROBE" value="8" enum="InstanceType">
The instance is a GI probe.
</constant>
<constant name="INSTANCE_LIGHTMAP_CAPTURE" value="9" enum="InstanceType">
The instance is a lightmap capture.
<constant name="INSTANCE_LIGHTMAP" value="9" enum="InstanceType">
The instance is a lightmap.
</constant>
<constant name="INSTANCE_MAX" value="10" enum="InstanceType">
Represents the size of the [enum InstanceType] enum.

View File

@ -6,7 +6,7 @@
<description>
Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the [ResourceLoader] singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine.
Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a [ResourceFormatSaver].
[b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture]) first, so they can be loaded with better efficiency on the graphics card.
[b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture2D]) first, so they can be loaded with better efficiency on the graphics card.
</description>
<tutorials>
</tutorials>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StreamCubemap" inherits="StreamTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StreamCubemapArray" inherits="StreamTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StreamTexture" inherits="Texture2D" version="4.0">
<class name="StreamTexture2D" inherits="Texture2D" version="4.0">
<brief_description>
A [code].stex[/code] texture.
</brief_description>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StreamTexture2DArray" inherits="StreamTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
</class>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StreamTextureLayered" inherits="TextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="load">
<return type="int" enum="Error">
</return>
<argument index="0" name="path" type="String">
</argument>
<description>
</description>
</method>
</methods>
<members>
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
</member>
</members>
<constants>
</constants>
</class>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Texture2DArray" inherits="TextureLayered" version="4.0">
<class name="Texture2DArray" inherits="ImageTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>

View File

@ -9,14 +9,6 @@
<tutorials>
</tutorials>
<methods>
<method name="create_from_images">
<return type="int" enum="Error">
</return>
<argument index="0" name="images" type="Array">
</argument>
<description>
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format">
</return>
@ -40,6 +32,12 @@
Returns an [Image] resource with the data from specified [code]layer[/code].
</description>
</method>
<method name="get_layered_type" qualifiers="const">
<return type="int" enum="TextureLayered.LayeredType">
</return>
<description>
</description>
</method>
<method name="get_layers" qualifiers="const">
<return type="int">
</return>
@ -53,17 +51,19 @@
Returns the width of the texture. Width is typically represented by the X-axis.
</description>
</method>
<method name="update_layer">
<return type="void">
<method name="has_mipmaps" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="image" type="Image">
</argument>
<argument index="1" name="layer" type="int">
</argument>
<description>
</description>
</method>
</methods>
<constants>
<constant name="LAYERED_TYPE_2D_ARRAY" value="0" enum="LayeredType">
</constant>
<constant name="LAYERED_TYPE_CUBEMAP" value="1" enum="LayeredType">
</constant>
<constant name="LAYERED_TYPE_CUBEMAP_ARRAY" value="2" enum="LayeredType">
</constant>
</constants>
</class>

View File

@ -29,6 +29,7 @@
/*************************************************************************/
#include "baked_lightmap.h"
#include "core/io/config_file.h"
#include "core/io/resource_saver.h"
#include "core/math/camera_matrix.h"
@ -1477,10 +1478,19 @@ void BakedLightmap::_bind_methods() {
BIND_ENUM_CONSTANT(BAKE_QUALITY_LOW);
BIND_ENUM_CONSTANT(BAKE_QUALITY_MEDIUM);
BIND_ENUM_CONSTANT(BAKE_QUALITY_HIGH);
BIND_ENUM_CONSTANT(BAKE_QUALITY_ULTRA);
BIND_ENUM_CONSTANT(GENERATE_PROBES_DISABLED);
BIND_ENUM_CONSTANT(GENERATE_PROBES_SUBDIV_4);
BIND_ENUM_CONSTANT(GENERATE_PROBES_SUBDIV_8);
BIND_ENUM_CONSTANT(GENERATE_PROBES_SUBDIV_16);
BIND_ENUM_CONSTANT(GENERATE_PROBES_SUBDIV_32);
BIND_ENUM_CONSTANT(BAKE_ERROR_OK);
BIND_ENUM_CONSTANT(BAKE_ERROR_NO_LIGHTMAPPER);
BIND_ENUM_CONSTANT(BAKE_ERROR_NO_SAVE_PATH);
BIND_ENUM_CONSTANT(BAKE_ERROR_NO_MESHES);
BIND_ENUM_CONSTANT(BAKE_ERROR_MESHES_INVALID);
BIND_ENUM_CONSTANT(BAKE_ERROR_CANT_CREATE_IMAGE);
BIND_ENUM_CONSTANT(BAKE_ERROR_USER_ABORTED);

View File

@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef BAKED_INDIRECT_LIGHT_H
#define BAKED_INDIRECT_LIGHT_H
#ifndef BAKED_LIGHTMAP_H
#define BAKED_LIGHTMAP_H
#include "core/local_vector.h"
#include "scene/3d/light_3d.h"
@ -110,6 +110,7 @@ public:
BAKE_QUALITY_HIGH,
BAKE_QUALITY_ULTRA,
};
enum GenerateProbes {
GENERATE_PROBES_DISABLED,
GENERATE_PROBES_SUBDIV_4,
@ -125,8 +126,7 @@ public:
BAKE_ERROR_NO_MESHES,
BAKE_ERROR_MESHES_INVALID,
BAKE_ERROR_CANT_CREATE_IMAGE,
BAKE_ERROR_USER_ABORTED
BAKE_ERROR_USER_ABORTED,
};
enum EnvironmentMode {
@ -276,9 +276,9 @@ public:
BakedLightmap();
};
VARIANT_ENUM_CAST(BakedLightmap::GenerateProbes);
VARIANT_ENUM_CAST(BakedLightmap::BakeQuality);
VARIANT_ENUM_CAST(BakedLightmap::GenerateProbes);
VARIANT_ENUM_CAST(BakedLightmap::BakeError);
VARIANT_ENUM_CAST(BakedLightmap::EnvironmentMode);
#endif // BAKED_INDIRECT_LIGHT_H
#endif // BAKED_LIGHTMAP_H

View File

@ -1938,7 +1938,7 @@ void TextureLayered::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_height"), &TextureLayered::get_height);
ClassDB::bind_method(D_METHOD("get_layers"), &TextureLayered::get_layers);
ClassDB::bind_method(D_METHOD("has_mipmaps"), &TextureLayered::has_mipmaps);
ClassDB::bind_method(D_METHOD("get_layer_data"), &TextureLayered::get_layer_data);
ClassDB::bind_method(D_METHOD("get_layer_data", "layer"), &TextureLayered::get_layer_data);
BIND_ENUM_CONSTANT(LAYERED_TYPE_2D_ARRAY);
BIND_ENUM_CONSTANT(LAYERED_TYPE_CUBEMAP);