Skip to content

Commit

Permalink
Merge pull request #1985 from zenustech/improve-fbx
Browse files Browse the repository at this point in the history
fix no bones
  • Loading branch information
littlemine authored Aug 13, 2024
2 parents 4e4a2f7 + 8734102 commit 0ddb25f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/FBX/FBXSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,12 +666,12 @@ struct NewFBXImportSkin : INode {
std::vector<zeno::PrimitiveObject *> prims_ptr;
int maxnum_boneWeight = 0;
for (auto prim: prims) {
maxnum_boneWeight = zeno::max(maxnum_boneWeight, prim->userData().get2<int>("maxnum_boneWeight"));
maxnum_boneWeight = zeno::max(maxnum_boneWeight, prim->userData().get2<int>("maxnum_boneWeight", 0));
}
for (auto prim: prims) {
prims_ptr.push_back(prim.get());
std::vector<int> nameMapping;
auto boneName_count = prim->userData().get2<int>("boneName_count");
auto boneName_count = prim->userData().get2<int>("boneName_count", 0);
for (auto i = 0; i < boneName_count; i++) {
auto boneName = prim->userData().get2<std::string>(zeno::format("boneName_{}", i));
if (nameMappingGlobal.count(boneName) == 0) {
Expand Down

0 comments on commit 0ddb25f

Please sign in to comment.