Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting all the shapes associated with a mesh.

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
186 Views, 2 Replies

Getting all the shapes associated with a mesh.

I've been writing an importer on and off for the past few months. Currently, I'm trying to support blend shapes. I'd like to be able to get all the shapes associated with a particular mesh.

The old KFbxGeometry::GetShape function, which takes only a single index, has been deprecated. The new function takes three indices and, presumably, accesses the shapes through the deformers. I'm not actually sure since the documentation has the description from the old function. Can I be certain that all these shapes are unique, or is it possible for deformers to share shapes?

If the shapes aren't guaranteed to be unique, is there some non-deprecated way to get all the shapes associated with a mesh, perhaps GetSrcObject or something?
2 REPLIES 2
Message 2 of 3
jiayang.xu
in reply to: Anonymous

There is no guarantee that a shape is unique for one mesh.
It makes sense to not prevent user from re-use the shape on different blendshape channels and deformers.
The old way to connect shapes with geometry directly is actually limited the flexibility of blendshape.

So to reach your goal the only way I have in mind is to always check if the shape is already added to the list.
This can be done by compare names (if you know the shapes have unique names), compare KFbxShape pointers to see if they point to the same memory, or compare the control points of two shapes, choose different way to do the comparison depending on different cases.

This is similar to a system that support instance, if there is no way to explicitly indicate which node is a instanced one, then we have to use comparison to judge if they are actually the same node but just instanced.
Unfortunately, there is no such way in FBX system to explicitly indicate a shape is re-used or not, so user has to do this comparison by self.
Message 3 of 3
Anonymous
in reply to: Anonymous

Well, that is unfortunate, but at least now I know. Thank you for your response.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report