Skip to content

Clear particle filenames when optimization fails (#2455)#2588

Merged
akenmorris merged 1 commit into
masterfrom
amorris/2455-clear-particles-on-failed-optimize
Jul 13, 2026
Merged

Clear particle filenames when optimization fails (#2455)#2588
akenmorris merged 1 commit into
masterfrom
amorris/2455-clear-particles-on-failed-optimize

Conversation

@akenmorris

Copy link
Copy Markdown
Contributor

Studio runs optimization with file output disabled and assigns each subject its output particle filenames during setup, writing the actual files only when the project is saved on success. If optimization fails or is aborted, those files are never written, but the dangling filenames remained on the subjects. Saving the project then persisted particle paths that don't exist, making the project fail to reload.

Adds Project::clear_particle_filenames(), which clears the local and world particle filenames for all non-fixed subjects (fixed subjects keep their pre-existing input particles). OptimizeTool::handle_optimize_failed now calls it so a subsequent save doesn't reference missing files.

Adds ProjectTests.clear_particle_filenames_test covering the clear plus a save/reload round-trip.

Studio runs optimization with file output disabled and assigns each
subject its output particle filenames during setup, writing the actual
files only when the project is saved on success. If optimization fails
or is aborted, those files are never written, but the dangling filenames
remained on the subjects. Saving the project then persisted particle
paths that don't exist, making the project fail to reload.

Adds Project::clear_particle_filenames(), which clears the local and
world particle filenames for all non-fixed subjects (fixed subjects keep
their pre-existing input particles). OptimizeTool::handle_optimize_failed
now calls it so a subsequent save doesn't reference missing files.

Adds ProjectTests.clear_particle_filenames_test covering the clear plus a
save/reload round-trip.
@akenmorris akenmorris merged commit adfa266 into master Jul 13, 2026
5 checks passed
@akenmorris akenmorris deleted the amorris/2455-clear-particles-on-failed-optimize branch July 13, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant