summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2021-10-15 19:04:35 -0300
committerreduz <reduzio@gmail.com>2021-10-16 08:36:05 -0300
commitae1c0165472181967b01ee7bc0087456611d26bf (patch)
tree5ba9e3cf3d28977737693b0f0a39506ff12c5c19 /doc
parent96410f55b24e47af045e3ad31545331ce124d999 (diff)
downloadredot-engine-ae1c0165472181967b01ee7bc0087456611d26bf.tar.gz
Implement Animation Blend Shape Tracks
* New track type BLEND_SHAPE * Blend shapes are imported via this new track type * Processing is more optimized (no longer relies on variants) * Modified the Blend Shape API in MeshInstance3D to use indices rather than StringNames (more optimizes) * Promo: Fixed a small bug in gizmo updating in Node3D that affected performance Dedicated BlendShape tracks are required for both optimization and eventually implementing them in animation compression.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Animation.xml18
-rw-r--r--doc/classes/MeshInstance3D.xml24
2 files changed, 38 insertions, 4 deletions
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index a35b784106..ebcced7dc4 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -201,6 +201,14 @@
Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
+ <method name="blend_shape_track_insert_key">
+ <return type="int" />
+ <argument index="0" name="track_idx" type="int" />
+ <argument index="1" name="time" type="float" />
+ <argument index="2" name="amount" type="float" />
+ <description>
+ </description>
+ </method>
<method name="clear">
<return type="void" />
<description>
@@ -552,16 +560,18 @@
</constant>
<constant name="TYPE_SCALE_3D" value="3" enum="TrackType">
</constant>
- <constant name="TYPE_METHOD" value="4" enum="TrackType">
+ <constant name="TYPE_BLEND_SHAPE" value="4" enum="TrackType">
+ </constant>
+ <constant name="TYPE_METHOD" value="5" enum="TrackType">
Method tracks call functions with given arguments per key.
</constant>
- <constant name="TYPE_BEZIER" value="5" enum="TrackType">
+ <constant name="TYPE_BEZIER" value="6" enum="TrackType">
Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]).
</constant>
- <constant name="TYPE_AUDIO" value="6" enum="TrackType">
+ <constant name="TYPE_AUDIO" value="7" enum="TrackType">
Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation.
</constant>
- <constant name="TYPE_ANIMATION" value="7" enum="TrackType">
+ <constant name="TYPE_ANIMATION" value="8" enum="TrackType">
Animation tracks play animations in other [AnimationPlayer] nodes.
</constant>
<constant name="INTERPOLATION_NEAREST" value="0" enum="InterpolationType">
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index 507a76197a..b72ce46310 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -41,6 +41,12 @@
This helper creates a [StaticBody3D] child node with a [ConcavePolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing.
</description>
</method>
+ <method name="find_blend_shape_by_name">
+ <return type="int" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
<method name="get_active_material" qualifiers="const">
<return type="Material" />
<argument index="0" name="surface" type="int" />
@@ -48,6 +54,17 @@
Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance3D.material_override], the surface override [Material] defined in this [MeshInstance3D], or the surface [Material] defined in the [Mesh]. For example, if [member GeometryInstance3D.material_override] is used, all surfaces will return the override material.
</description>
</method>
+ <method name="get_blend_shape_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_value" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="blend_shape_idx" type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_surface_override_material" qualifiers="const">
<return type="Material" />
<argument index="0" name="surface" type="int" />
@@ -61,6 +78,13 @@
Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count].
</description>
</method>
+ <method name="set_blend_shape_value">
+ <return type="void" />
+ <argument index="0" name="blend_shape_idx" type="int" />
+ <argument index="1" name="value" type="float" />
+ <description>
+ </description>
+ </method>
<method name="set_surface_override_material">
<return type="void" />
<argument index="0" name="surface" type="int" />