Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Blendshape channel naming problem

Macmik
Explorer

Blendshape channel naming problem

Macmik
Explorer
Explorer

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:

Macmik_0-1645102644516.png

 

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).

0 Likes
Reply
191 Views
0 Replies
Replies (0)