Skip to content

Commit 343d4be

Browse files
Update imageFeed.js
Added setting to the Image Feed to display 'SaveImage' Nodes only if selected.
1 parent 943e5cc commit 343d4be

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

web/js/imageFeed.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,14 @@ Recommended: "enabled (max performance)" uness images are erroneously deduplicat
383383
type: "number",
384384
});
385385

386+
const saveNodeOnly = app.ui.settings.addSetting({
387+
id: "pysssss.ImageFeed.SaveNodeOnly",
388+
name: "🐍 Image Feed Display Nodes",
389+
tooltip: `Only show images from Save Image nodes. This prevents temporary previews from appearing in the feed.`,
390+
defaultValue: false,
391+
type: "boolean",
392+
});
393+
386394
const clearButton = $el("button.pysssss-image-feed-btn.clear-btn", {
387395
textContent: "Clear",
388396
onclick: () => {
@@ -533,6 +541,12 @@ Recommended: "enabled (max performance)" uness images are erroneously deduplicat
533541
const n = app.graph.getNodeById(detail.node.split(":")[0]);
534542
if (n?.getInnerNodes) return;
535543
}
544+
545+
// Apply "Display Save Image Node Only" filter if setting is enabled
546+
const nodeName = detail.node?.split(":")?.[0];
547+
const node = app.graph.getNodeById(nodeName);
548+
549+
if (saveNodeOnly.value && node?.type !== "SaveImage") return;
536550

537551
for (const src of detail.output.images) {
538552
const href = `./view?filename=${encodeURIComponent(src.filename)}&type=${src.type}&

0 commit comments

Comments
 (0)