Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abc fps #1363

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Abc fps #1363

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion projects/Alembic/WriteAlembic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ struct WriteAlembic2 : INode {
virtual void apply() override {
auto prim = get_input<PrimitiveObject>("prim");
bool flipFrontBack = get_input2<int>("flipFrontBack");
float fps = has_input("fps")? get_input2<float>("fps") : 24.0f;
int frameid;
if (has_input("frameid")) {
frameid = get_input2<int>("frameid");
Expand All @@ -313,7 +314,7 @@ struct WriteAlembic2 : INode {
if (frameid == frame_start) {
std::string path = get_input2<std::string>("path");
archive = {Alembic::AbcCoreOgawa::WriteArchive(), path};
archive.addTimeSampling(TimeSampling(1.0/24, frame_start / 24.0));
archive.addTimeSampling(TimeSampling(1.0/fps, frame_start / fps));
if (prim->polys.size() || prim->tris.size()) {
meshyObj = OPolyMesh( OObject( archive, 1 ), "mesh" );
}
Expand Down Expand Up @@ -492,6 +493,7 @@ ZENDEFNODE(WriteAlembic2, {
{"writepath", "path", ""},
{"int", "frame_start", "0"},
{"int", "frame_end", "100"},
{"fps"},
{"bool", "flipFrontBack", "1"},
},
{},
Expand Down
Loading