Skip to content

Give Linear Output the Export panel's destination rules - #862

Merged
marcinz606 merged 1 commit into
marcinz606:mainfrom
seanharding:fix/linear-export-destination
Aug 16, 2026
Merged

Give Linear Output the Export panel's destination rules#862
marcinz606 merged 1 commit into
marcinz606:mainfrom
seanharding:fix/linear-export-destination

Conversation

@seanharding

Copy link
Copy Markdown
Contributor

Linear Output ignored the Destination section and always wrote <export_path>/_linear: "Same as source" and "Subfolder of source" went to the absolute path anyway, and the filename template did nothing. The Export panel hid the whole settings form under the Linear intent, so there were no destination controls to see this with either (#859).

The gap dates to the feature's first commit (6410002). Linear started with a per-export save dialog; when batch support replaced it with a write to the export folder, the replacement imitated print's outcome instead of calling print's resolver. With the default output mode (Absolute) the two agree, which is why it went unnoticed.

Linear now resolves its destination through the same code print and flat use: resolve_export_dir's body moves into resolve_output_dir(source_path, settings), and the linear task builder calls that plus render_export_filename. _linear is still appended to the rendered name, so a dump written next to its source cannot overwrite that source, and Overwrite is honoured in place of the automatic _2/_3 renaming. The form keeps DESTINATION visible under Linear and hides FORMAT/SIZE/COLOR, which a raw dump has no use for.

Also fixes a silent no-op: _ensure_valid_export_path returns "" in the source-relative modes, which never read the path, and every caller treated that as a cancel — an unset path made Export do nothing, without a message. Callers now test is None, and the printing-notes and contact-sheet paths resolve their folder through the shared helper instead of open-coding the SAME_AS_SOURCE case.

Fixes #859

Linear Output ignored the Destination section and always wrote
<export_path>/<stem>_linear: "Same as source" and "Subfolder of source"
went to the absolute path anyway, and the filename template did nothing.
The Export panel hid the whole settings form under the Linear intent, so
there were no destination controls to see this with either (marcinz606#859).

The gap dates to the feature's first commit (6410002). Linear started
with a per-export save dialog; when batch support replaced it with a
write to the export folder, the replacement imitated print's outcome
instead of calling print's resolver. With the default output mode
(Absolute) the two agree, which is why it went unnoticed.

Linear now resolves its destination through the same code print and flat
use: resolve_export_dir's body moves into resolve_output_dir(source_path,
settings), and the linear task builder calls that plus
render_export_filename. `_linear` is still appended to the rendered name,
so a dump written next to its source cannot overwrite that source, and
Overwrite is honoured in place of the automatic _2/_3 renaming. The form
keeps DESTINATION visible under Linear and hides FORMAT/SIZE/COLOR, which
a raw dump has no use for.

Also fixes a silent no-op: _ensure_valid_export_path returns "" in the
source-relative modes, which never read the path, and every caller
treated that as a cancel — an unset path made Export do nothing, without
a message. Callers now test `is None`, and the printing-notes and
contact-sheet paths resolve their folder through the shared helper
instead of open-coding the SAME_AS_SOURCE case.
@marcinz606
marcinz606 merged commit 0fedd27 into marcinz606:main Aug 16, 2026
1 check passed
marcinz606 added a commit that referenced this pull request Aug 16, 2026
One conflict, in controller.py: both sides added an import next to the other.
Kept both — diptych_configs from the half-frame helpers and render_export_filename
from the Linear Output destination work (#862).
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.

[Bug]: Linear export lacks destination settings (folder, path, filename)

2 participants