From de6640508be1b1205111d70253e3ac24f67dda7f Mon Sep 17 00:00:00 2001 From: zhouhang95 <765229842@qq.com> Date: Thu, 10 Aug 2023 16:48:32 +0800 Subject: [PATCH] abc fps --- projects/Alembic/WriteAlembic.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/Alembic/WriteAlembic.cpp b/projects/Alembic/WriteAlembic.cpp index cfc3592c7c..24e0c00374 100644 --- a/projects/Alembic/WriteAlembic.cpp +++ b/projects/Alembic/WriteAlembic.cpp @@ -302,6 +302,7 @@ struct WriteAlembic2 : INode { virtual void apply() override { auto prim = get_input("prim"); bool flipFrontBack = get_input2("flipFrontBack"); + float fps = get_input2("fps"); int frameid; if (has_input("frameid")) { frameid = get_input2("frameid"); @@ -313,7 +314,7 @@ struct WriteAlembic2 : INode { if (frameid == frame_start) { std::string path = get_input2("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" ); } @@ -492,6 +493,7 @@ ZENDEFNODE(WriteAlembic2, { {"writepath", "path", ""}, {"int", "frame_start", "0"}, {"int", "frame_end", "100"}, + {"float", "fps", "24"}, {"bool", "flipFrontBack", "1"}, }, {},