Graechan wrote:
Ronounours wrote:
Ha you are right Graechan, maybe I should add a new argument to specify the output mode as well...
But I'm afraid doing this will break all existing scripts that are using gmic...
Is there a way to have 'optional' arguments in script-fu ?
David there is no way the script can change what gmic does with the output but if there was a way for any new filter to have the option to select the output mode then we could set this in scripts, this would have no effect on existing scripts that are using gmic, and would only change the plugin for the duration it is used
Or if you could enforce the plugin to always use the 'In place(default)' output mode then we could effect the output in a script e.g. if output 'New Image' was required we could create a new Image and copy the input layer to the new image then use the new image and its copied layer as the gmic input
David,
I guess it's important to find a solution for this problem if you want G'MIC be easily callable from inside a GIMP script.
If you know there are many scripts already calling G'MIC, a new interface call to set up all G'MIC parameters before making use of the current interface call could be a solution, as well as Graechan proposal to enforce "in place" inside the current interface.
If you know (or reasonably think) that currently the GIMP scripts calling G'MIC are only a few, well, an "incompatibility" could not be a drama (also GIMP itself creates from time to time incompatibilities in script functions)