From eff13f6a40bb2cac50935bf9764595932373327e Mon Sep 17 00:00:00 2001 From: Steve M Date: Wed, 25 Jan 2023 20:52:25 -0800 Subject: [PATCH] Update morph mesh documentation now that gltf known to work --- include/assimp/anim.h | 5 ++++- include/assimp/mesh.h | 11 +++++++++-- port/PyAssimp/pyassimp/structs.py | 9 +++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/include/assimp/anim.h b/include/assimp/anim.h index edb048f50..49f0d5014 100644 --- a/include/assimp/anim.h +++ b/include/assimp/anim.h @@ -198,7 +198,10 @@ struct aiMeshMorphKey { /** The time of this key */ double mTime; - /** The values and weights at the time of this key */ + /** The values and weights at the time of this key + * - mValues: index of attachment mesh to apply weight at the same position in mWeights + * - mWeights: weight to apply to the blend shape index at the same position in mValues + */ unsigned int *mValues; double *mWeights; diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 363627464..c2d78a73c 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -737,13 +737,20 @@ struct aiMesh { **/ C_STRUCT aiString mName; - /** The number of attachment meshes. Note! Currently only works with Collada loader. */ + /** The number of attachment meshes. + * Currently known to work with loaders: + * - Collada + * - gltf + */ unsigned int mNumAnimMeshes; /** Attachment meshes for this mesh, for vertex-based animation. * Attachment meshes carry replacement data for some of the * mesh'es vertex components (usually positions, normals). - * Note! Currently only works with Collada loader.*/ + * Currently known to work with loaders: + * - Collada + * - gltf + */ C_STRUCT aiAnimMesh **mAnimMeshes; /** diff --git a/port/PyAssimp/pyassimp/structs.py b/port/PyAssimp/pyassimp/structs.py index e1fba1950..932998025 100644 --- a/port/PyAssimp/pyassimp/structs.py +++ b/port/PyAssimp/pyassimp/structs.py @@ -748,13 +748,18 @@ class Mesh(Structure): # - Vertex animations refer to meshes by their names. ("mName", String), - # The number of attachment meshes. Note! Currently only works with Collada loader. + # The number of attachment meshes. + # Currently known to work with loaders: + # - Collada + # - gltf ("mNumAnimMeshes", c_uint), # Attachment meshes for this mesh, for vertex-based animation. # Attachment meshes carry replacement data for some of the # mesh'es vertex components (usually positions, normals). - # Note! Currently only works with Collada loader. + # Currently known to work with loaders: + # - Collada + # - gltf ("mAnimMeshes", POINTER(POINTER(AnimMesh))), # Method of morphing when animeshes are specified.