Add option to bake a mesh from animated skeleton pose

Adds option to bake a mesh from animated skeleton  pose.
This commit is contained in:
smix8
2023-11-17 14:41:19 +01:00
parent e2dd56bea7
commit a99a1699aa
3 changed files with 176 additions and 0 deletions

View File

@ -21,6 +21,14 @@
[b]Performance:[/b] [Mesh] data needs to be received from the GPU, stalling the [RenderingServer] in the process.
</description>
</method>
<method name="bake_mesh_from_current_skeleton_pose">
<return type="ArrayMesh" />
<param index="0" name="existing" type="ArrayMesh" default="null" />
<description>
Takes a snapshot of the current animated skeleton pose of the skinned mesh and bakes it to the provided [param existing] mesh. If no [param existing] mesh is provided a new [ArrayMesh] is created, baked, and returned. Requires a skeleton with a registered skin to work. Blendshapes are ignored. Mesh surface materials are not copied.
[b]Performance:[/b] [Mesh] data needs to be retrieved from the GPU, stalling the [RenderingServer] in the process.
</description>
</method>
<method name="create_convex_collision">
<return type="void" />
<param index="0" name="clean" type="bool" default="true" />