07-25-2023, 07:07 PM 
	
	
	
		I am doing a script that I want to execute very quickly with a shortcut, or more slowly with a option window. Something similar to "save" (quickly executed with ctrl+s) and "save as ..." (with a window to precise options). How should I do ?
The code would look like that :
	
	
	
	
- Should I do two completely separated plug-ins ?
 - Or one plug-in with two python files in it (one importing the other I guess) ?
 - Or can I put several register function in one python script ?
 - other ?
 
The code would look like that :
Code:
from gimpfu import * 
def slow_function(image, layer, other, options):
    #some code
def quick_function(image, layer):
    slow_function(image, layer, defaults, values)
register(
    "python-fu-quick-function",
    "description",
    "description",
    "Your Name",
    "Your Name",
    "2023",
    "<Image>/Filters/quick function",
    "*",
    [],
    [],
   quick_function)
register(
    "python-fu-slow-function",
    "description",
    "description",
    "Your Name",
    "Your Name",
    "2023",
    "<Image>/Filters/slow function ...",
    "*",
    [
        (PF_IMAGE,  'image',            'Image', None),
        (PF_OPTION, 'some option')],
        (PF_OPTION, 'some other option')]
    [],
    slow_function)
main()

