Blendshape channel naming problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working with FBX SDK to create and export blendshapes to output FBX. To each blendshape I add a channel and sometimes a second target shape to have "in-between" blendshape.
Here is the simple code:
auto blendShape = FbxBlendShape::Create(fbxScene, "blendShape");
auto blendShapeChannel = FbxBlendShapeChannel::Create(fbxScene, "channel");
for(int i = 0; i < 2; i++)
{
auto currentDeformPercent = 50.0 * i;
auto targetShapeName = "targetShape" +
std::to_string(currentDeformPercent);
auto targetShape = FbxShape::Create(fbxScene, targetShapeName.c_str());
blendShapeChannel->AddTargetShape(targetShapes[i], currentDeformPercent);
}
blendShape->AddBlendShapeChannel(blendShapeChannel);
nodeWithBaseMesh->GetMesh()->AddDeformer(blendShape);
In code everything looks OK and the names of target shapes are right but when I export this FBX and open in Maya the channel name is always equal to the last target shape name which I added to channel and in-between shape doesn't have any name:
It works fine, there is a in-between blendshape but channel has the last added target shape name with a strange ending and first added shape (doesn't have any name).