Skip to content

Commit

Permalink
convert arnold fps to usd frame+timecode per second (#1399)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpichard authored Jan 23, 2023
1 parent 9a7ef6c commit 17a4040
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions translator/writer/writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ void UsdArnoldWriter::Write(const AtUniverse *universe)
_shutterEnd = AiNodeGetFlt(camera, AtString("shutter_end"));
}

AtNode *options = AiUniverseGetOptions(universe);
if (options) {
const float fps = AiNodeGetFlt(options, AtString("fps"));
_stage->GetRootLayer()->SetFramesPerSecond(static_cast<double>(fps));
_stage->GetRootLayer()->SetTimeCodesPerSecond(static_cast<double>(fps));
}

// If a specific time was requested, we want to check if some data was already written
// to this USD stage for other frames. We do this by checking the scene custom metadata
// "timeCodeArray" , that will contain the list of frames
Expand Down

0 comments on commit 17a4040

Please sign in to comment.