浏览代码

Merge pull request #68933 from fire/meow-meow-meow

Add GLTFDocument documentation.
Rémi Verschelde 2 年之前
父节点
当前提交
404184105e
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      modules/gltf/doc_classes/GLTFDocument.xml

+ 9 - 0
modules/gltf/doc_classes/GLTFDocument.xml

@@ -16,6 +16,8 @@
 			<param index="3" name="flags" type="int" default="0" />
 			<param index="3" name="flags" type="int" default="0" />
 			<param index="4" name="bake_fps" type="int" default="30" />
 			<param index="4" name="bake_fps" type="int" default="30" />
 			<description>
 			<description>
+				Takes a [PackedByteArray] defining a gLTF and returns a [GLTFState] object through the [param state] parameter.
+				[b]Note:[/b] The [param base_path] tells [method append_from_buffer] where to find dependencies and can be empty.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="append_from_file">
 		<method name="append_from_file">
@@ -26,6 +28,8 @@
 			<param index="3" name="bake_fps" type="int" default="30" />
 			<param index="3" name="bake_fps" type="int" default="30" />
 			<param index="4" name="base_path" type="String" default="&quot;&quot;" />
 			<param index="4" name="base_path" type="String" default="&quot;&quot;" />
 			<description>
 			<description>
+				Takes a path to a gLTF file and returns a [GLTFState] object through the [param state] parameter.
+				[b]Note:[/b] The [param base_path] tells [method append_from_file] where to find dependencies and can be empty.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="append_from_scene">
 		<method name="append_from_scene">
@@ -35,12 +39,14 @@
 			<param index="2" name="flags" type="int" default="0" />
 			<param index="2" name="flags" type="int" default="0" />
 			<param index="3" name="bake_fps" type="int" default="30" />
 			<param index="3" name="bake_fps" type="int" default="30" />
 			<description>
 			<description>
+				Takes a Godot Engine scene node and returns a [GLTFState] object through the [param state] parameter.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="generate_buffer">
 		<method name="generate_buffer">
 			<return type="PackedByteArray" />
 			<return type="PackedByteArray" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="0" name="state" type="GLTFState" />
 			<description>
 			<description>
+				Takes a [GLTFState] object through the [param state] parameter and returns a gLTF [PackedByteArray].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="generate_scene">
 		<method name="generate_scene">
@@ -48,6 +54,7 @@
 			<param index="0" name="state" type="GLTFState" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="1" name="bake_fps" type="int" default="30" />
 			<param index="1" name="bake_fps" type="int" default="30" />
 			<description>
 			<description>
+				Takes a [GLTFState] object through the [param state] parameter and returns a Godot Engine scene node.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="register_gltf_document_extension" qualifiers="static">
 		<method name="register_gltf_document_extension" qualifiers="static">
@@ -64,6 +71,8 @@
 			<param index="0" name="state" type="GLTFState" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="1" name="path" type="String" />
 			<param index="1" name="path" type="String" />
 			<description>
 			<description>
+				Takes a [GLTFState] object through the [param state] parameter and writes a glTF file to the filesystem.
+				[b]Note:[/b] The extension of the glTF file determines if it is a .glb binary file or a .gltf file.
 			</description>
 			</description>
 		</method>
 		</method>
 	</methods>
 	</methods>