Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Jul 19, 2024
1 parent 8e450e4 commit 4119bd8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libguc/src/converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,14 +718,13 @@ namespace guc
isConstant &= (i == 0) || (jointIndices[i - 1] == jointIndices[i]);
}

UsdGeomPrimvar primvar = skelApi.CreateJointIndicesPrimvar(isConstant, jointIndices.size()); // TODO: create Attr with VtValue default?
UsdGeomPrimvar primvar = skelApi.CreateJointIndicesPrimvar(isConstant, jointIndices.size());
primvar.Set(jointIndices);
}

// weights
// joint weights
{
VtArray<float> jointWeights(meshData->weights_count);
memcpy(jointWeights.data(), meshData->weights, jointWeights.size()); // TODO: better way?
VtArray<float> jointWeights(meshData->weights, &meshData->weights[meshData->weights_count]);

UsdGeomPrimvar primvar = skelApi.CreateJointWeightsPrimvar(isConstant, jointWeights.size());
primvar.Set(jointWeights);
Expand Down

0 comments on commit 4119bd8

Please sign in to comment.