Let effects declare whether they need source images
Whether an effect works from the loaded photographs is now part of the declarative plug-in contract, next to params(): Effect::needsSources() defaults to true, and blur — which only softens what it is handed — says no and blurs an empty canvas when given nothing. Only the first stage of a cascade ever sees the sources, so chainNeedsSources() just asks the first stage. Both front-ends gate on that instead of on "are there any images": the CLI only refuses an empty batch when the chain wants one, and the interface renders a blur-led chain with no images loaded, saying whichever thing is actually missing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,9 @@ private:
|
||||
void storeParams(); // widgets -> the selected stage's values
|
||||
void applyInitial(const Options& initial);
|
||||
|
||||
bool canRender() const; // a chain, and sources if the chain needs them
|
||||
std::string missingText() const; // what is still missing before a render
|
||||
void showPlaceholder(); // drops the preview and says what is missing
|
||||
void requestRender(); // coalesced: restarts the short debounce timer
|
||||
void startRender(); // starts a worker, or marks the result stale
|
||||
void onAddImages();
|
||||
|
||||
Reference in New Issue
Block a user