Skip to content

Commit

Permalink
Merge pull request #1363 from zenustech/abc_fps
Browse files Browse the repository at this point in the history
Abc fps
  • Loading branch information
littlemine authored Oct 16, 2023
2 parents 013edad + 8ca3356 commit 2cfac8f
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 2cfac8f

Please sign in to comment.