Instead, count how many consecutive times the entry has been found to be
unused and delete it once that count exceeds a limit. This will prevent
excessive reallocating of extradata ID's in applications like folding.
This wasn't necessary before since the internal representation of
folds is be checked for consistency after each commit, but after the
switch to extradata fold operations would leave the extradata in an
invalid state. This isn't technically a problem, but it does leave more
extradata entries lying around than necessary, and it can trip up
automation scripts that aren't prepared for inconsistent fold state.
These commands were revamped in 0ef9963 but the default hotkeys were
never updated. The hotkeys were automatically migrated, but resetting
the settings back to defaults would still set invalid settings.
This would cause an assertion failure in functions like lua_for_each
when the given closure throws an error and thus leaves some values on
the stack. This can make Aegisub crash entirely instead of just catching
and reporting the error. Instead, these stack_checks can be done
manually.
wx doesn't seem to like the dialogs being created on some other worker
thread, which makes file dialogs opened by lua scripts crash in various
ways on Linux. Doing everything on the main thread hopefully fixes this.
FixesTypesettingTools/Aegisub#51 .
Add a utility library that wraps LWLibavSource and can parse its .lwi
file to obtain timecodes and keyframes. It also contains a function to
generate and save keyframes using WWXD or Scxvid. Update the default
scripts to use these functions.
This is nothing more than duct tape, do not pull.
In the long run boost::filesystem should just be replaced with
std::filesystem (as done in tgoyne/Aegisub:cmake), but this would
complicate the history and cause merge conflicts for a bunch of pulls.
Hence this horrible temporary solution.
When Avisynth is not installed or not functional, this would otherwise
cause a crash when trying to initialize Avisynth more than once, since
after the first time the refcount would have been incrased anyway.
Also, allow negative fsp.
This doesn't change the behaviour of the SpinCtrl increment/decrement
buttons, just the precision that can manually be set. Small values of
fsp can be useful as a hack to disable all ligatures. Precise values of
fscx/fscy can be useful to compensate for anamorphic resolutions. The
other fields were made more precise for consistency.
This fixes a crash on Windows when double-clicking the draggable
separator between the column headers "Command" and "Description" in the
hotkey configuration dialog.
This makes the internal juggling of fold data even more complicated, but
it has a number of advantages:
- Folds will preserved even when opening the file with Aegisub builds
that don't know about folding.
- Folds will be preserved by automation scripts that re-insert every
line.
- Folds do not break when adding or deleting lines in a text editor or
some other editor, as long as the lines involving folds aren't
touched.
- In particular, merging changes using tools like git will not break
folds.
- Copy/pasting folds also keeps the folds to some extent. This is
impossible to solve in full generality, but simple cases like
cut/pasting a folded section somewhere else work, as long as the file
isn't saved in between.
- This will give automation scripts full access to folding without
needing to set up any additional API functions.
Unlike the other arguments for the resize function, "range_in" does not
use the same format as in the frame props. A frame prop _Range=1 means
limited, while an argument range_in=1 means full range.
The highlighting distinguishes drawing commands from coordinates, and
colors x and y coordinates in different colors to make coordinates
easier to visually parse. Furthermore, in cubic Bezier curves, it
underlines the coordinates which corresponds to endpoints of the curves.
Aegisub will automatically override the YCbCr Matrix field of the
current file's Script Properties with the video's reported color space.
The FFMS2 provider guesses a color space for all videos, but we don't
do this for Vapoursynth. Thus, we now disable this overriding whenever
the colorspace isn't known.
On Windows, Python changes the application's locale upon being called,
which will break wxwidgets, causing various assertion error dialogs or
even crashes (for example when interacting with any sort of float edit
control). Saving the locale and restoring it afterwards seems to be
the only really possible way to remedy this.
The percent values used for the overscan masks follow the BBC's
guidelines, as in
https://en.wikipedia.org/wiki/Overscan#Overscan_amounts .
However, these measure the per-side width as opposed to the total
percentage of width/height being cut off. Thus, they should not be
divided by two when drawing the mask.