Abort execution if MovieWriter can't write file or find a valid extension #95867
+24
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This avoids having the engine run without any movie recording if it was requested on the command line.
It might be worth displaying a GUI alert using
OS::get_singleton()->alert()
(so you can see those errors when running a project without a visible terminal), but this is a blocking operation that can be problematic in automation scenarios. Maybe we should have a CLI argument to ignorealert()
s (regardless of--headless
).Preview
Invalid extension (not registered by any MovieWriter)
There's a warning about ObjectDB instances that is also present with the other abort situation in
setup2()
(when you have._sc_
in a project folder and an editor binary in the same folder).I don't know how to fix the GDExtension error while ensuring GDExtensions are initialized at this point, since they can define additional MovieWriters.
Valid extension, but path is not writable
Unfortunately, this one does not exit cleanly yet. MovieWriter doesn't inherit SceneTree, so there's no
quit()
to call.Valid extension, but path is not writable after a certain frame
This will most likely occur when running out of space, or when the folder was moved or removed while frames are being written.
TODO: Not tested yet.