Skip to content

Commit

Permalink
fix no bones
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhang95 committed Aug 12, 2024
1 parent 5cdc270 commit 8734102
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 8734102

Please sign in to comment.