Proper doc setup.

This commit is contained in:
Relintai 2019-12-25 14:11:34 +01:00
parent 604c330188
commit fbf5d0d634
5 changed files with 403 additions and 8 deletions

View File

@ -8,6 +8,8 @@ def get_doc_classes():
return [
"TextureMerger",
"TexturePacker",
"TextureLayerMerger",
"PackerImageResource",
]
def get_doc_path():

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PackerImageResource" inherits="Texture" category="Core" version="3.2">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<members>
<member name="data" type="Image" setter="set_data" getter="get_data">
</member>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="0" />
</members>
<constants>
</constants>
</class>

View File

@ -1,25 +1,142 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureLayerMerger" inherits="Reference" category="Addon" version="3.2">
<class name="TextureLayerMerger" inherits="Reference" category="Core" version="3.2">
<brief_description>
A class, that can merge textures as layers together.
</brief_description>
A class, that can merge textures as layers together.
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_texture">
<return type="AtlasTexture">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<argument index="3" name="rect" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
</argument>
<description>
</description>
</method>
<method name="clear">
<return type="void">
</return>
<description>
</description>
</method>
<method name="get_color">
<return type="Color">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="get_position">
<return type="Vector2">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="get_rect">
<return type="Rect2">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="get_result_as_texture" qualifiers="const">
<return type="ImageTexture">
</return>
<description>
</description>
</method>
<method name="get_texture">
<return type="Texture">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="get_texture_count">
<return type="int">
</return>
<description>
</description>
</method>
<method name="merge">
<return type="void">
</return>
<description>
</description>
</method>
<method name="remove_texture">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="set_color">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_position">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_rect">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="rect" type="Rect2">
</argument>
<description>
</description>
</method>
<method name="set_texture">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
</methods>
<members>
<member name="texture_flags" type="int" setter="set_texture_flags" getter="get_texture_flags" default="5">
<member name="base_color" type="Color" setter="set_base_color" getter="get_base_color" default="Color( 0, 0, 0, 1 )">
</member>
<member name="data" type="Image" setter="set_data" getter="get_data">
</member>
<member name="height" type="int" setter="set_height" getter="get_height" default="0">
</member>
<member name="texture_flags" type="int" setter="set_texture_flags" getter="get_texture_flags" default="0">
</member>
<member name="width" type="int" setter="set_width" getter="get_width" default="0">
</member>
</members>
<constants>

View File

@ -1,14 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureMerger" inherits="Node" category="Addon" version="3.2">
<class name="TextureMerger" inherits="Node" category="Core" version="3.2">
<brief_description>
A node, that can merge textures.
</brief_description>
This node can pack the textures given to it. It uses
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="_texture_added" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="texture" type="AtlasTexture">
</argument>
<description>
</description>
</method>
<method name="_texture_merged" qualifiers="virtual">
<return type="void">
</return>
<description>
</description>
</method>
<method name="_texture_removed" qualifiers="virtual">
<return type="void">
</return>
<description>
</description>
</method>
<method name="add_texture">
<return type="AtlasTexture">
</return>
@ -17,11 +36,155 @@
<description>
</description>
</method>
<method name="clear">
<return type="void">
</return>
<description>
</description>
</method>
<method name="get_dirty" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
<method name="get_generated_texture">
<return type="ImageTexture">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="get_generated_texture_count">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_original_texture">
<return type="Texture">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="get_packer" qualifiers="const">
<return type="TexturePacker">
</return>
<description>
</description>
</method>
<method name="get_texture">
<return type="AtlasTexture">
</return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="get_texture_count">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_texture_index">
<return type="AtlasTexture">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="merge">
<return type="void">
</return>
<description>
</description>
</method>
<method name="remove_texture">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="remove_texture_index">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="set_dirty">
<return type="void">
</return>
<argument index="0" name="value" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_packer">
<return type="void">
</return>
<argument index="0" name="packer" type="TexturePacker">
</argument>
<description>
</description>
</method>
<method name="unref_texture">
<return type="bool">
</return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="unref_texture_index">
<return type="bool">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
</methods>
<members>
<member name="automatic_merge" type="bool" setter="set_automatic_merge" getter="get_automatic_merge" default="false">
</member>
<member name="background_color" type="Color" setter="set_background_color" getter="get_background_color" default="Color( 0, 0, 0, 1 )">
</member>
<member name="keep_original_atlases" type="bool" setter="set_keep_original_atlases" getter="get_keep_original_atlases" default="false">
</member>
<member name="margin" type="int" setter="set_margin" getter="get_margin" default="0">
</member>
<member name="max_atlas_size" type="int" setter="set_max_atlas_size" getter="get_max_atlas_size" default="1024">
</member>
<member name="texture_flags" type="int" setter="set_texture_flags" getter="get_texture_flags" default="5">
</member>
<member name="textures" type="Array" setter="set_textures" getter="get_textures" default="[ ]">
</member>
</members>
<signals>
<signal name="texture_added">
<argument index="0" name="texture" type="AtlasTexture">
</argument>
<description>
</description>
</signal>
<signal name="texture_merged">
<description>
</description>
</signal>
<signal name="texture_removed">
<description>
</description>
</signal>
</signals>
<constants>
</constants>
</class>

View File

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TexturePacker" inherits="Reference" category="Addon" version="3.2">
<class name="TexturePacker" inherits="Reference" category="Core" version="3.2">
<brief_description>
A class, that can merge textures.
</brief_description>
This class can pack the textures given to it.
<description>
</description>
<tutorials>
@ -17,8 +16,104 @@
<description>
</description>
</method>
<method name="clear">
<return type="void">
</return>
<description>
</description>
</method>
<method name="get_generated_texture">
<return type="ImageTexture">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="get_generated_texture_count">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_original_texture">
<return type="Texture">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="get_texture">
<return type="AtlasTexture">
</return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="get_texture_count">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_texture_index">
<return type="AtlasTexture">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="merge">
<return type="void">
</return>
<description>
</description>
</method>
<method name="remove_texture">
<return type="void">
</return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="remove_texture_index">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="unref_texture">
<return type="bool">
</return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="unref_texture_index">
<return type="bool">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
</methods>
<members>
<member name="background_color" type="Color" setter="set_background_color" getter="get_background_color" default="Color( 0, 0, 0, 1 )">
</member>
<member name="keep_original_atlases" type="bool" setter="set_keep_original_atlases" getter="get_keep_original_atlases" default="false">
</member>
<member name="margin" type="int" setter="set_margin" getter="get_margin" default="0">
</member>
<member name="max_atlas_size" type="int" setter="set_max_atlas_size" getter="get_max_atlas_size" default="1024">
</member>
<member name="texture_flags" type="int" setter="set_texture_flags" getter="get_texture_flags" default="5">
</member>
</members>