Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Reviewed By: TuurStuyck

Differential Revision: D58680434

fbshipit-source-id: 74e9443792b68ad0cb52ce3088c713a02eafd579
  • Loading branch information
jeongseok-meta authored and facebook-github-bot committed Jun 17, 2024
1 parent 69b9219 commit 0eabce2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions momentum/io/gltf/gltf_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void addSkeletonStatesToModel(
return;
}

// store paremeterized motion into joints for actual animation
// store parameterized motion into joints for actual animation
const auto numJoints = character.skeleton.joints.size();
std::vector<float> timestamps(numFrames);
std::vector<Vector3<bool>> useChannel(numJoints, Vector3<bool>::Constant(false));
Expand Down Expand Up @@ -486,15 +486,15 @@ void addMotionToModel(
const auto inputPoses = mapMotionToCharacter(inputMotion, character);
const auto inputOffset = mapIdentityToCharacter(inputIdentity, character);

// store paremeterized motion into joints for actual animation
// store parameterized motion into joints for actual animation
const auto numJoints = character.skeleton.joints.size();
std::vector<float> timestamps(numFrames);
std::vector<Vector3<bool>> useChannel(numJoints, Vector3<bool>::Constant(false));
std::vector<std::vector<Vector3f>> translation(numJoints, std::vector<Vector3f>(numFrames));
std::vector<std::vector<Vector4f>> rotation(numJoints, std::vector<Vector4f>(numFrames));
std::vector<std::vector<Vector3f>> scale(numJoints, std::vector<Vector3f>(numFrames));

// create sle;eton states from model params
// create skeleton states from model params
std::vector<momentum::SkeletonState> skeletonStates(numFrames);
CharacterParameters params;
params.offsets = inputOffset;
Expand Down
32 changes: 16 additions & 16 deletions momentum/io/gltf/gltf_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,22 +947,6 @@ fx::gltf::Document makeCharacterDocument(
return fileBuilder.getDocument();
}

void saveCharacter(
const filesystem::path& filename,
const Character& character,
const float fps,
const MotionParameters& motion,
const IdentityParameters& offsets,
const std::vector<std::vector<Marker>>& markerSequence,
const GltfFileFormat fileFormat) {
constexpr auto kEmbedResources = false; // Don't embed resource for saving glb
// create new model
fx::gltf::Document model =
makeCharacterDocument(character, fps, motion, offsets, markerSequence, kEmbedResources);

GltfBuilder::save(model, filename, fileFormat, kEmbedResources);
}

MarkerSequence loadMarkerSequence(const filesystem::path& filename) {
MarkerSequence result;

Expand Down Expand Up @@ -1027,6 +1011,22 @@ MarkerSequence loadMarkerSequence(const filesystem::path& filename) {
return result;
}

void saveCharacter(
const filesystem::path& filename,
const Character& character,
const float fps,
const MotionParameters& motion,
const IdentityParameters& offsets,
const std::vector<std::vector<Marker>>& markerSequence,
const GltfFileFormat fileFormat) {
constexpr auto kEmbedResources = false; // Don't embed resource for saving glb
// create new model
fx::gltf::Document model =
makeCharacterDocument(character, fps, motion, offsets, markerSequence, kEmbedResources);

GltfBuilder::save(model, filename, fileFormat, kEmbedResources);
}

void saveCharacter(
const filesystem::path& filename,
const Character& character,
Expand Down

0 comments on commit 0eabce2

Please sign in to comment.