Fixes Alembic Exports always defaulting to include a preroll run-up to the export from the preRollStartFrame, which defaulted to 0.
Also fixes this warning always being logged:
# Warning: Ignoring unsupported flag: -verbose
Additional info
The "pre roll" was not included in the exported data - but it did mean that for EVERY alembic export we basically ended up stepping through the frame ranges from frame 0 up to the start frame of the Alembic to export.
I'd say this is actually quite an inconvenience for scenes that happen to also be heavy to step through time before the start frame because it'd heavily influence the time taken if you actually did not care about pre roll at all.
The bug was introduced around April/May via these PRs:
I believe it all came from a misconception about what the preRoll argument on the AbcExport command was supposed to do. To explain that I'll just quote what I wrote as comment in the code for this PR:
Our logic is that preroll means:
True: include a preroll from preRollStartFrame to the start
frame that is not included in the exported file. Just 'roll up'
the export from there.
False: do not roll up from preRollStartFrame.
AbcExport however approaches this very differently.
A call to AbcExport allows to export multiple "jobs" of frame ranges in one go. Using -preroll argument there means: this one job in the full list of jobs SKIP writing these frames into the Alembic.
In short, marking that job as just preroll.
Then additionally, separate from -preroll the AbcExport command allows to supply preRollStartFrame which, when not None, means always RUN UP from that start frame. Since our preRollStartFrame is always an integer attribute we will convert the attributes so they behave like how we intended them initially
Testing notes:
How to debug
The easiest way to test this is to enable "Verbose" in settings: ayon+settings://maya/publish/ExtractAlembic/verbose
You will then end up seeing the frame numbers printed by the Alembic Exporter - e.g. this:
Going all the way from frame zero.
What to test
Alembic Exports should not default to prerolling from frame 0.
Enabling preroll on Alembic export for settings should still allow enabling the preroll.
Others that would be affected also calling extract_alembic and should now also NOT preroll from frame 0 but they did before this PR:
Extract Assembly
Extract Proxy ABC
Extract Unreal SkeletalMesh Abc
XGEN extractions with a Render (it was called here.
Changelog Description
Fixes Alembic Exports always defaulting to include a preroll run-up to the export from the
preRollStartFrame
, which defaulted to0
.Also fixes this warning always being logged:
Additional info
The "pre roll" was not included in the exported data - but it did mean that for EVERY alembic export we basically ended up stepping through the frame ranges from frame 0 up to the start frame of the Alembic to export.
I'd say this is actually quite an inconvenience for scenes that happen to also be heavy to step through time before the start frame because it'd heavily influence the time taken if you actually did not care about pre roll at all.
The bug was introduced around April/May via these PRs:
preRollStartFrame
argument this way.I believe it all came from a misconception about what the
preRoll
argument on theAbcExport
command was supposed to do. To explain that I'll just quote what I wrote as comment in the code for this PR:Testing notes:
How to debug
The easiest way to test this is to enable "Verbose" in settings:
ayon+settings://maya/publish/ExtractAlembic/verbose
You will then end up seeing the frame numbers printed by the Alembic Exporter - e.g. this:
Going all the way from frame zero.
What to test
Others that would be affected also calling
extract_alembic
and should now also NOT preroll from frame 0 but they did before this PR: