How to use blend shapes?


I have exported a 3d model with blend shapes and a skeleton animation with Blender’s Urho3D add-on:

But I can not figure out how to use blend shapes, can somebody show me a piece of code?

Thank you.

As I remember blendshapes stored in mdl binary file, That’s why there is no needing in additional *.ani files to animate blandshapes.
For using morph you just need get it or set weight from/for AnimatedModel with methods

[code]const Vector< ModelMorph > & GetMorphs () const

unsigned GetNumMorphs () const
Return number of vertex morphs.

float GetMorphWeight (unsigned index) const
Return vertex morph weight by index.

float GetMorphWeight (const String &name) const
Return vertex morph weight by name.

float GetMorphWeight (StringHash nameHash) const
Return vertex morph weight by name hash. [/code]
see doc: … model.html

Also check

Thanks, I have found that ‘AssetImporter’ does not support exporting blend shapes at present, I guess it is a TODO work in future.

edit: wow, did I even read the 1st post before writing this?! I must’ve been asleep when I wrote it. Pls, ignore.