Finish documenting BakedLightmap and TextureLayered
(cherry picked from commit 5643bc71f7
)
This commit is contained in:
parent
11f012d2db
commit
453babc60d
|
@ -18,7 +18,7 @@
|
||||||
<argument index="1" name="create_visual_debug" type="bool" default="false">
|
<argument index="1" name="create_visual_debug" type="bool" default="false">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Bakes the lightmaps within the currently edited scene.
|
Bakes the lightmaps within the currently edited scene. Returns a [enum BakeError] to signify if the bake was successful, or if unsuccessful, how the bake failed.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="debug_bake">
|
<method name="debug_bake">
|
||||||
|
@ -81,14 +81,19 @@
|
||||||
More precise bake mode but can take considerably longer to bake.
|
More precise bake mode but can take considerably longer to bake.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="BAKE_ERROR_OK" value="0" enum="BakeError">
|
<constant name="BAKE_ERROR_OK" value="0" enum="BakeError">
|
||||||
|
Baking was successful.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="BAKE_ERROR_NO_SAVE_PATH" value="1" enum="BakeError">
|
<constant name="BAKE_ERROR_NO_SAVE_PATH" value="1" enum="BakeError">
|
||||||
|
Returns if no viable save path is found. This can happen where an [member image_path] is not specified or when the save location is invalid.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="BAKE_ERROR_NO_MESHES" value="2" enum="BakeError">
|
<constant name="BAKE_ERROR_NO_MESHES" value="2" enum="BakeError">
|
||||||
|
Currently unused.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="3" enum="BakeError">
|
<constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="3" enum="BakeError">
|
||||||
|
Returns when the baker cannot save per-mesh textures to file.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="BAKE_ERROR_USER_ABORTED" value="4" enum="BakeError">
|
<constant name="BAKE_ERROR_USER_ABORTED" value="4" enum="BakeError">
|
||||||
|
Returns if user cancels baking.
|
||||||
</constant>
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
Base class for 3D texture types.
|
Base class for 3D texture types.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
Base class for [Texture3D] and [TextureArray]. Cannot be used directly.
|
Base class for [Texture3D] and [TextureArray]. Cannot be used directly, but contains all the functions necessary for accessing and using [Texture3D] and [TextureArray]. Data is set on a per-layer basis. For [Texture3D]s, the layer sepcifies the depth or Z-index, they can be treated as a bunch of 2D slices. Similarly, for [TextureArray]s, the layer specifies the array layer.
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
@ -23,24 +23,28 @@
|
||||||
<argument index="4" name="flags" type="int" default="4">
|
<argument index="4" name="flags" type="int" default="4">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Creates the [Texture3D] or [TextureArray] with specified [code]width[/code], [code]height[/code], and [code]depth[/code]. See [enum Image.Format] for [code]format[/code] options. See [enum Flags] enumerator for [code]flags[/code] options.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_depth" qualifiers="const">
|
<method name="get_depth" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_format" qualifiers="const">
|
<method name="get_format" qualifiers="const">
|
||||||
<return type="int" enum="Image.Format">
|
<return type="int" enum="Image.Format">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the current format being used by this texture. See [enum Image.Format] for details.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_height" qualifiers="const">
|
<method name="get_height" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the height of the texture. Height is typically represented by the Y-axis.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_layer_data" qualifiers="const">
|
<method name="get_layer_data" qualifiers="const">
|
||||||
|
@ -49,12 +53,14 @@
|
||||||
<argument index="0" name="layer" type="int">
|
<argument index="0" name="layer" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Returns an [Image] resource with the data from specified [code]layer[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_width" qualifiers="const">
|
<method name="get_width" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the width of the texture. Width is typically represented by the X-axis.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_data_partial">
|
<method name="set_data_partial">
|
||||||
|
@ -71,6 +77,7 @@
|
||||||
<argument index="4" name="mipmap" type="int" default="0">
|
<argument index="4" name="mipmap" type="int" default="0">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Partially sets the data for a specified [code]layer[/code] by overwriting using the data of the specified [code]image[/code]. [code]x_offset[/code] and [code]y_offset[/code] determine where the [Image] is "stamped" over the texture. The [code]image[/code] must fit within the texture.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_layer_data">
|
<method name="set_layer_data">
|
||||||
|
@ -81,23 +88,30 @@
|
||||||
<argument index="1" name="layer" type="int">
|
<argument index="1" name="layer" type="int">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Sets the data for the specified layer. Data takes the form of a 2-dimensional [Image] resource.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"depth": 0,"flags": 4,"format": 37,"height": 0,"layers": [ ],"width": 0}">
|
<member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"depth": 0,"flags": 4,"format": 37,"height": 0,"layers": [ ],"width": 0}">
|
||||||
|
Returns a dictionary with all the data used by this texture.
|
||||||
</member>
|
</member>
|
||||||
<member name="flags" type="int" setter="set_flags" getter="get_flags" default="4">
|
<member name="flags" type="int" setter="set_flags" getter="get_flags" default="4">
|
||||||
|
Specifies which [enum Flags] apply to this texture.
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="FLAG_MIPMAPS" value="1" enum="Flags">
|
<constant name="FLAG_MIPMAPS" value="1" enum="Flags">
|
||||||
|
Texture will generate mipmaps on creation.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="FLAG_REPEAT" value="2" enum="Flags">
|
<constant name="FLAG_REPEAT" value="2" enum="Flags">
|
||||||
|
Texture will repeat when UV used is outside the 0-1 range.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="FLAG_FILTER" value="4" enum="Flags">
|
<constant name="FLAG_FILTER" value="4" enum="Flags">
|
||||||
|
Use filtering when reading from texture. Filtering smooths out pixels. Turning filtering off is slightly faster and more appropriate when you need access to individual pixels.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="FLAGS_DEFAULT" value="4" enum="Flags">
|
<constant name="FLAGS_DEFAULT" value="4" enum="Flags">
|
||||||
|
Equivalent to [constant FLAG_FILTER].
|
||||||
</constant>
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
|
|
Loading…
Reference in New Issue