@@ -230,10 +230,10 @@ void USDImporterImplTinyusdz::animations(
230
230
return ;
231
231
}
232
232
233
- pScene->mNumAnimations = render_scene.animations .size ();
233
+ pScene->mNumAnimations = unsigned ( render_scene.animations .size () );
234
234
pScene->mAnimations = new aiAnimation *[pScene->mNumAnimations ];
235
235
236
- for (int animationIndex = 0 ; animationIndex < pScene->mNumAnimations ; ++animationIndex) {
236
+ for (unsigned animationIndex = 0 ; animationIndex < pScene->mNumAnimations ; ++animationIndex) {
237
237
238
238
const auto &animation = render_scene.animations [animationIndex];
239
239
@@ -249,7 +249,8 @@ void USDImporterImplTinyusdz::animations(
249
249
250
250
// each channel affects a node (joint)
251
251
newAiAnimation->mTicksPerSecond = render_scene.meta .framesPerSecond ;
252
- newAiAnimation->mNumChannels = animation.channels_map .size ();
252
+ newAiAnimation->mNumChannels = unsigned (animation.channels_map .size ());
253
+
253
254
newAiAnimation->mChannels = new aiNodeAnim *[newAiAnimation->mNumChannels ];
254
255
int channelIndex = 0 ;
255
256
for (const auto &[jointName, animationChannelMap] : animation.channels_map ) {
@@ -330,15 +331,15 @@ void USDImporterImplTinyusdz::animations(
330
331
}
331
332
}
332
333
333
- newAiNodeAnim->mNumPositionKeys = positionKeys.size ();
334
+ newAiNodeAnim->mNumPositionKeys = unsigned ( positionKeys.size () );
334
335
newAiNodeAnim->mPositionKeys = new aiVectorKey[newAiNodeAnim->mNumPositionKeys ];
335
336
std::move (positionKeys.begin (), positionKeys.end (), newAiNodeAnim->mPositionKeys );
336
337
337
- newAiNodeAnim->mNumRotationKeys = rotationKeys.size ();
338
+ newAiNodeAnim->mNumRotationKeys = unsigned ( rotationKeys.size () );
338
339
newAiNodeAnim->mRotationKeys = new aiQuatKey[newAiNodeAnim->mNumRotationKeys ];
339
340
std::move (rotationKeys.begin (), rotationKeys.end (), newAiNodeAnim->mRotationKeys );
340
341
341
- newAiNodeAnim->mNumScalingKeys = scalingKeys.size ();
342
+ newAiNodeAnim->mNumScalingKeys = unsigned ( scalingKeys.size () );
342
343
newAiNodeAnim->mScalingKeys = new aiVectorKey[newAiNodeAnim->mNumScalingKeys ];
343
344
std::move (scalingKeys.begin (), scalingKeys.end (), newAiNodeAnim->mScalingKeys );
344
345
@@ -407,7 +408,7 @@ void USDImporterImplTinyusdz::verticesForMesh(
407
408
}
408
409
409
410
// Convert USD skeleton joints to Assimp bones
410
- const unsigned int numBones = skeletonNodes.size ();
411
+ const unsigned int numBones = unsigned ( skeletonNodes.size () );
411
412
pScene->mMeshes [meshIdx]->mNumBones = numBones;
412
413
pScene->mMeshes [meshIdx]->mBones = new aiBone *[numBones];
413
414
@@ -442,8 +443,8 @@ void USDImporterImplTinyusdz::verticesForMesh(
442
443
}
443
444
}
444
445
445
- for (int boneIndex = 0 ; boneIndex < numBones; ++boneIndex) {
446
- const unsigned int numWeightsForBone = aiBonesVertexWeights[boneIndex].size ();
446
+ for (unsigned boneIndex = 0 ; boneIndex < numBones; ++boneIndex) {
447
+ const auto numWeightsForBone = unsigned ( aiBonesVertexWeights[boneIndex].size () );
447
448
pScene->mMeshes [meshIdx]->mBones [boneIndex]->mWeights = new aiVertexWeight[numWeightsForBone];
448
449
pScene->mMeshes [meshIdx]->mBones [boneIndex]->mNumWeights = numWeightsForBone;
449
450
@@ -708,7 +709,7 @@ static aiTexture *ownedEmbeddedTextureFor(
708
709
string embTexName{image.asset_identifier .substr (pos + 1 )};
709
710
tex->mFilename .Set (image.asset_identifier .c_str ());
710
711
tex->mHeight = image.height ;
711
- // const size_t imageBytesCount{render_scene.buffers[image.buffer_id].data.size() / image.channels};
712
+
712
713
tex->mWidth = image.width ;
713
714
if (tex->mHeight == 0 ) {
714
715
pos = embTexName.find_last_of (' .' );
@@ -829,7 +830,7 @@ aiNode *USDImporterImplTinyusdz::nodesRecursive(
829
830
}
830
831
TINYUSDZLOGD (TAG, " %s" , ss.str ().c_str ());
831
832
832
- unsigned int numChildren = node.children .size ();
833
+ unsigned int numChildren = unsigned ( node.children .size () );
833
834
834
835
// Find any tinyusdz skeletons which might begin at this node
835
836
// Add the skeleton bones as child nodes
@@ -882,7 +883,7 @@ aiNode *USDImporterImplTinyusdz::skeletonNodesRecursive(
882
883
cNode->mNumChildren = static_cast <unsigned int >(joint.children .size ());
883
884
cNode->mChildren = new aiNode *[cNode->mNumChildren ];
884
885
885
- for (int i = 0 ; i < cNode->mNumChildren ; ++i) {
886
+ for (unsigned i = 0 ; i < cNode->mNumChildren ; ++i) {
886
887
const tinyusdz::tydra::SkelNode &childJoint = joint.children [i];
887
888
cNode->mChildren [i] = skeletonNodesRecursive (cNode, childJoint);
888
889
}
0 commit comments