/WSG_animation_markers

Custom extension to export animation timeline markers for an internal Engine at Winning Streak Games GmbH

Primary LanguagePython

Blender glTF three.js

Pose markers to extras extension

Custom extension to export action pose markers as extras in glTF. Adjusted for internal use at Winning Streak Games GmbH.

Installation

Install the addon in Blender by choosing: Preferences → Add-ons → Install...

How it works

Warning: This extension will delete any existing custom properties on all actions!

This is neccesary to work with Blender 3.6.0, because the hooks provided the glTF exporter do not allow to add extension data for each animation any longer, even though it is supported by the glTF specification. Instead, during the export process, all pose markers on all actions are converted to custom properties using the marker name as the key and the offset in seconds as the value. After the export, all custom properties on all actions are removed again.

In the resulting glTF file, the pose markers can be found under extras like so:

{
    "animations": [
        {
            "name":"CubeAction",
            "extras": {
                "marker1": 1.0333333333333334,
                "marker2": 1.2833333333333334
            }
        }
    ]
}