From 047515d7c769f2445e89a5c5c1df90d5defc138e Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sat, 27 Apr 2024 02:20:21 +0900 Subject: [PATCH] Fix timecode was not set properly. --- examples/tydra_to_renderscene/to-renderscene-main.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/tydra_to_renderscene/to-renderscene-main.cc b/examples/tydra_to_renderscene/to-renderscene-main.cc index 0fbe1eeb..5ec2e28e 100644 --- a/examples/tydra_to_renderscene/to-renderscene-main.cc +++ b/examples/tydra_to_renderscene/to-renderscene-main.cc @@ -203,7 +203,9 @@ int main(int argc, char **argv) { // env.asset_resolver(arr); } - double timecode = tinyusdz::value::TimeCode::Default(); + // When Xform, Mesh, Material, etc. have time-varying values, + // values are evaluated at `timecode` time(except for animation values in SkelAnimation) + env.timecode = tinyusdz::value::TimeCode::Default(); bool ret = converter.ConvertToRenderScene(env, &render_scene); if (!ret) { std::cerr << "Failed to convert USD Stage to RenderScene: \n" << converter.GetError() << "\n";