Skip to content

Commit

Permalink
fix frame count, emit debug symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
camnewnham committed Nov 13, 2023
1 parent e4ef784 commit e95363d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Plugin/Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>none</DebugType>
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
4 changes: 2 additions & 2 deletions Plugin/TimelineComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ public override void AppendAdditionalMenuItems(ToolStripDropDown menu)
int recordedFrameCount = gH_SliderAnimator.StartAnimation();
m_recordAnimationViewport = null;

int targetFrameCount = Instances.Settings.GetValue("SlAnim:FrameCount", int.MinValue) + 1;
int targetFrameCount = Instances.Settings.GetValue("SlAnim:FrameCount", int.MinValue);
string targetFolder = Instances.Settings.GetValue("SlAnim:Folder", "");
string targetTemplate = Instances.Settings.GetValue("SlAnim:FileTemplate", "");

int width = Instances.Settings.GetValue("SlAnim:Width", 640);
int height = Instances.Settings.GetValue("SlAnim:Height", 480);

if (recordedFrameCount == targetFrameCount)
if (recordedFrameCount >= targetFrameCount)
{
string videoPath = FFmpegUtil.Compile(targetFolder, targetTemplate, targetFrameCount, 30, (int)(Math.Sqrt(width * height) / Math.Sqrt(1920 * 1080) * Bitrate1920x1080));
if (videoPath != null)
Expand Down

0 comments on commit e95363d

Please sign in to comment.