def query(self): authorname = "Jérémie Ferry alias <mothsART>" copyrightname = "Jérémie Ferry alias <mothsART>" imgmenupath = "<Image>/Tools/Bear Engine/export/" date = "october 2011" script_sprite_create_help = _("""Build sprite files from the current image""") script_sprite_create_description = _("""Build multi-pictures files from a source (.xcf or .ora) file with a config file (yaml). The generated pictures can be resized and reported as an composite file. spritepos correspondent.""") script_sprite_create_label = _("""Build sprite files""") params = [ (PDB_INT32, "run_mode", "Run mode"), (PDB_IMAGE, "image", "Input image"), (PDB_DRAWABLE, "drawable", "Input drawable"), ] gimp.install_procedure("python_multi_export", script_sprite_create_description, script_sprite_create_help, authorname, copyrightname, date, "%s_multi-export..." % (imgmenupath), "RGB*, GRAY*", PLUGIN, params, [])
def _query(): for plugin in _registered_plugins_.keys(): (blurb, help, author, copyright, date, label, imagetypes, plugin_type, params, results, function, menu, domain, on_query, on_run) = _registered_plugins_[plugin] def make_params(params): return [(_type_mapping[x[0]], x[1], x[2]) for x in params] params = make_params(params) # add the run mode argument ... params.insert(0, (PDB_INT32, "run-mode", "Interactive, Non-Interactive")) results = make_params(results) if domain: try: (domain, locale_dir) = domain gimp.domain_register(domain, locale_dir) except ValueError: gimp.domain_register(domain) gimp.install_procedure(plugin, blurb, help, author, copyright, date, label, imagetypes, plugin_type, params, results) if menu: gimp.menu_register(plugin, menu) if on_query: on_query()
def query(self): gimp.install_procedure("plug_in_export_layers", "Export layers as separate images in specified file format to specified directory.", "Layer names are used as filenames for the exported images.", "khalim19", "khalim19", "2013", "<Image>/File/Export/E_xport Layers...", "*", gimpenums.PLUGIN, self.PLUG_IN_EXPORT_LAYERS_PARAMS, self.PLUG_IN_RETS ) gimp.install_procedure("plug_in_export_layers_to", "Run Export Layers with last values specified.", ("This plug-in runs plug-in-export-layers non-interactively, using last values specified in that plug-in. " "If plug-in-export-layers was not run for the first time, plug-in-export-layers will be run interactively, " "otherwise this plug-in will take effect. " "Refer to plug-in-export-layers for more information."), "khalim19", "khalim19", "2013", "<Image>/File/Export/Export Layers _to", "*", gimpenums.PLUGIN, self.PLUG_IN_EXPORT_LAYERS_TO_PARAMS, self.PLUG_IN_RETS )
def query(self): print "query\n" gimp.install_procedure( "minimal", "This is a minimal *real*, non-gimpfu python plugin", "", "Michael Schumacher", "Michael Schumacher", "2007", "<Toolbox>/Xtns/Minimal *Real* Python", "", PLUGIN, [(PDB_INT32, "run_mode", "Run mode")], [])
def _query(): for plugin in _registered_plugins_.keys(): (blurb, help, author, copyright, date, label, imagetypes, plugin_type, params, results, function, menu, domain, on_query, on_run) = _registered_plugins_[plugin] def make_params(params): return [(_type_mapping[x[0]], x[1], _string.replace(x[2], "_", "")) for x in params] params = make_params(params) # add the run mode argument ... params.insert( 0, (PDB_INT32, "run-mode", "The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }")) results = make_params(results) if domain: try: (domain, locale_dir) = domain gimp.domain_register(domain, locale_dir) except ValueError: gimp.domain_register(domain) gimp.install_procedure(plugin, blurb, help, author, copyright, date, label, imagetypes, plugin_type, params, results) if menu: gimp.menu_register(plugin, menu) if on_query: on_query()
def query(self): authorname = "dd" copyrightname = "dd" menu_location = "<Image>/Filters/Distorts/Bevel..." date = "2013" plug_description = "Selection bevel v2.2" plug_help = "Applies a bevel in the shape of the selection (or layer alpha channel, or both)" plug_params = [ (PDB_INT32, "run_mode", "Run mode"), (PDB_IMAGE, "image", "Input image"), (PDB_DRAWABLE, "drawable", "Input drawable"), ####### 3 params above needed by all scripts using gimpplugin.plugin ###################### #bevel parameters - radio buttons (PDB_INT32, "lmode", "Layer mode"), (PDB_INT32, "up", "Direction"), (PDB_INT32, "inner", "Type"), #sliders (PDB_FLOAT, "width", "Bevel width"), (PDB_FLOAT, "height", "Bevel height"), (PDB_FLOAT, "shape", "Shape"), (PDB_FLOAT, "prenoise", "Pre-emboss noise"), (PDB_FLOAT, "azimuth", "Light angle"), (PDB_FLOAT, "elevation", "Light elevation"), (PDB_FLOAT, "depth", "Depth"), (PDB_FLOAT, "postblur", "Post-emboss blur"), (PDB_FLOAT, "opacity", "Layer opacity"), (PDB_FLOAT, "gloss", "Gloss"), (PDB_INT32, "ialpha", "Intersect with alpha") ] gimp.install_procedure("python_fu_bevel", plug_description, plug_help, authorname, copyrightname, date, menu_location, "RGB*, GRAY*", PLUGIN, plug_params, [])
def query(self): gimp.domain_register(constants.DOMAIN_NAME, constants.LOCALE_PATH) gimp.install_procedure( "plug_in_export_layers", _("Export layers as separate images in specified file format to specified " "directory, using layer names as filenames"), "", "khalim19 <*****@*****.**>", "khalim19", "2013", _("E_xport Layers..."), "*", gimpenums.PLUGIN, self._create_plugin_params(self.export_layers_settings), self._create_plugin_params(self.export_layers_return_values) ) gimp.install_procedure( "plug_in_export_layers_to", _("Run \"{0}\" with the last values specified").format(constants.PLUGIN_TITLE), _("If the plug-in is run for the first time (i.e. no last values exist), " "default values will be used."), "khalim19 <*****@*****.**>", "khalim19", "2013", _("Export Layers _to"), "*", gimpenums.PLUGIN, self._create_plugin_params(self.export_layers_to_settings), self._create_plugin_params(self.export_layers_to_return_values) ) gimp.menu_register("plug_in_export_layers", "<Image>/File/Export") gimp.menu_register("plug_in_export_layers_to", "<Image>/File/Export")
def query(self): gimp.install_procedure( "plug_in_export_layers", "Export layers as separate images in specified file format to specified directory, " "using the layer names as filenames.", "", "khalim19", "khalim19", "2013", "<Image>/File/Export/E_xport Layers...", "*", gimpenums.PLUGIN, self._create_plugin_params(self.export_layers_settings), self._create_plugin_params(self.export_layers_return_values), ) gimp.install_procedure( "plug_in_export_layers_to", 'Run "' + constants.PLUGIN_TITLE + '" with the last values specified.', ("If the plug-in is run for the first time (i.e. no last values exist), " "default values will be used."), "khalim19", "khalim19", "2013", "<Image>/File/Export/Export Layers _to", "*", gimpenums.PLUGIN, self._create_plugin_params(self.export_layers_to_settings), self._create_plugin_params(self.export_layers_to_return_values), )
def install_plugin(plugin_procedure, blurb="", description="", author="", copyright_notice="", date="", menu_name="", menu_path=None, image_types="*", parameters=None, return_values=None): def _get_pdb_params(params): pdb_params = [] if params: has_settings = isinstance(params[0], (pgsetting.Setting, pgsettinggroup.SettingGroup)) if has_settings: pdb_params = pgsettinggroup.PdbParamCreator.create_params(*params) else: pdb_params = params return pdb_params gimp.install_procedure( plugin_procedure.__name__, blurb, description, author, copyright_notice, date, menu_name, image_types, gimpenums.PLUGIN, _get_pdb_params(parameters), _get_pdb_params(return_values) ) if menu_path: gimp.menu_register(plugin_procedure.__name__, menu_path)
def install_plugin( plugin_procedure, blurb="", description="", author="", copyright_notice="", date="", menu_name="", menu_path=None, image_types="*", parameters=None, return_values=None): def _get_pdb_params(params): pdb_params = [] if params: has_settings = isinstance( params[0], (pgsetting.Setting, pgsettinggroup.SettingGroup)) if has_settings: pdb_params = pgsettingpdb.PdbParamCreator.create_params(*params) else: pdb_params = params return pdb_params gimp.install_procedure( plugin_procedure.__name__, blurb, description, author, copyright_notice, date, menu_name, image_types, gimpenums.PLUGIN, _get_pdb_params(parameters), _get_pdb_params(return_values)) if menu_path: gimp.menu_register(plugin_procedure.__name__, menu_path)
def query(self): gimp.domain_register(constants.DOMAIN_NAME, constants.LOCALE_PATH) gimp.install_procedure( "plug_in_export_layers", _("Export layers as separate images"), "", "khalim19 <*****@*****.**>", "khalim19", "2013", _("E_xport Layers..."), "*", gimpenums.PLUGIN, pgsettinggroup.PdbParamCreator.create_params( self.settings['special']['run_mode'], self.settings['special']['image'], self.settings['main']), [] ) gimp.install_procedure( "plug_in_export_layers_repeat", _("Run \"{0}\" with the last values specified").format(constants.PLUGIN_TITLE), _("If the plug-in is run for the first time (i.e. no last values exist), " "default values will be used."), "khalim19 <*****@*****.**>", "khalim19", "2013", _("E_xport Layers (repeat)"), "*", gimpenums.PLUGIN, pgsettinggroup.PdbParamCreator.create_params( self.settings['special']['run_mode'], self.settings['special']['image']), [] ) gimp.menu_register("plug_in_export_layers", "<Image>/File/Export") gimp.menu_register("plug_in_export_layers_repeat", "<Image>/File/Export")
def register(self): gimp.install_procedure(self.proc_name, self.description, self.help, self.author, self.copyright, self.date, self.menu_label, self.image_types, self.proc_type, self.register_params, self.return_vals) gimp.menu_register(self.proc_name, self.menu_path)
def query(self): gimp.domain_register(constants.DOMAIN_NAME, constants.LOCALE_PATH) gimp.install_procedure( "plug_in_export_layers", _("Export layers as separate images"), "", "khalim19 <*****@*****.**>", "khalim19", "2013", _("E_xport Layers..."), "*", gimpenums.PLUGIN, pgsettinggroup.PdbParamCreator.create_params( self.settings['special']['run_mode'], self.settings['special']['image'], self.settings['main']), []) gimp.install_procedure( "plug_in_export_layers_repeat", _("Run \"{0}\" with the last values specified").format( constants.PLUGIN_TITLE), _("If the plug-in is run for the first time (i.e. no last values exist), " "default values will be used."), "khalim19 <*****@*****.**>", "khalim19", "2013", _("E_xport Layers (repeat)"), "*", gimpenums.PLUGIN, pgsettinggroup.PdbParamCreator.create_params( self.settings['special']['run_mode'], self.settings['special']['image']), []) gimp.menu_register("plug_in_export_layers", "<Image>/File/Export") gimp.menu_register("plug_in_export_layers_repeat", "<Image>/File/Export")
def query(self): gimp.install_procedure( "plug_in_export_layers", "Export layers as separate images in specified file format to specified directory.", "Layer names are used as filenames for the exported images.", "khalim19", "khalim19", "2014", "<Image>/File/Export/E_xport Layers (HTI)...", "*", gimpenums.PLUGIN, self.PLUG_IN_EXPORT_LAYERS_PARAMS, self.PLUG_IN_RETS)
def query(self): logging.debug("query") gimp.install_procedure( "btn4ws", "Buttons for website", """Creates buttons for a website. Which have the same size, layout, effects on it. It's possible to create JavaScript code, CSS and XHTML examples for MouseOver effects also.""", "Jan Dittberner", "Jan Dittberner <*****@*****.**>", "%s, %s" % (btn4ws_version, "$Date: 2009-03-15 08:56:39 +0100 (Sun, 15 Mar 2009) $"), "<Toolbox>/Xtns/Render/Buttons for website ...", "", PLUGIN, [ (PDB_INT32, "run_mode", "Run mode"), (PDB_STRING, "string_filename", "File containing the strings"), (PDB_STRING, "output_directory", "Directory for the output files"), (PDB_STRING, "font", "Font for the strings"), # "Sans 18"), (PDB_COLOR, "string_color", "Color of the strings"), #, (255, 255, 0)), (PDB_INT8, "transparent_background", "Keep the background transparent (This doesn't work in MS Internet Explorer <= 6.0)" ), #, 0), (PDB_COLOR, "background_color", "Color of the background"), #, (7, 135, 255)), (PDB_INT8, "apply_glow", "Enable glow effect"), #, 1), (PDB_COLOR, "glow_color", "Color of the Glow effect"), #, (255, 180, 0)), (PDB_INT8, "use_pattern", "Use a pattern for the button"), #, 1), (PDB_STRING, "button_pattern", "Fill pattern of the button"), #, "Rain"), (PDB_COLOR, "button_color", "Button color (if you don't use a pattern)" ), #, (0, 0, 255)), (PDB_INT32, "round_radius", "Radius of the round corners"), #, 20), (PDB_INT32, "padding", "Space around the text"), #, 3), (PDB_INT32, "glow_size", "Size of the Glow effect"), #, 10), (PDB_INT32, "bevel_width", "Width of the bevel"), #, 5), (PDB_INT8, "apply_nova", "Nova or not Nova?"), #, 1), (PDB_INT32, "nova_sparkles", "Sparkles of the Nova"), #, 5), (PDB_INT32, "nova_radius", "Radius of the Nova"), #, 2), (PDB_COLOR, "nova_color", "Color of the Nova effect"), #, (255, 238, 0)), (PDB_INT8, "write_xcf", "Write a GIMP xcf file"), #, 0), (PDB_INT8, "create_inactive", "Create Inactive Button"), #, 1), (PDB_INT8, "create_active", "Create Active Button"), #, 1), (PDB_INT8, "create_pressed", "Create Pressed Button"), #, 1), (PDB_INT8, "create_jscript", "Create JavaScript, HTML and CSS"), #, 1) ], [])
def query(self): authorname = "Philipp Lutz" copyright = "Philipp Lutz" menu_location = "<Image>/Filters/Misc/Batch Blend Test" date = "November 2011" description = "Test" help = "Test" params = [(PDB_INT32, "run_mode", "Run mode")] gimp.install_procedure("py_exposure_blending_batch", description, help, authorname, copyright, date, menu_location, "", PLUGIN, params, [])
def query(self): gimp.install_procedure("plug_in_export_layers", "Export layers as separate images in specified file format to specified directory.", "Layer names are used as filenames for the exported images.", "khalim19", "khalim19", "2014", "<Image>/File/Export/E_xport Layers (HTI)...", "*", gimpenums.PLUGIN, self.PLUG_IN_EXPORT_LAYERS_PARAMS, self.PLUG_IN_RETS )
def query(self): # called to find what functionality the plugin provides. gimp.install_procedure("xmlBuilderMain", "help", "", "Luca 'whitenoise' Foppiano <*****@*****.**>", "Copyright (c) 2007 Luca 'whitenoise' Foppiano <*****@*****.**", "18/01/2008", "<Image>/OCR/xmlBuilder...", "", PLUGIN, [(PDB_INT32, "run_mode", "Run mode"), (PDB_IMAGE, "image", "Image"), (PDB_DRAWABLE, "drawable", "Drawable")], [])
def query(self): gimp.install_procedure( "export_to_api", "GIMP to API export plugin", "Export layer or the whole image to your API.", "Illia Brylov", "Illia Brylov", "2020", "<Image>/APIexport", "RGB*, GRAY*", PLUGIN, [ # next three parameters are common for all scripts that are inherited from gimpplugin.plugin (PDB_INT32, "run_mode", "Run mode"), (PDB_IMAGE, "image", "Input image"), (PDB_DRAWABLE, "drawable", "Input drawable"), ], [])
def query(self): gimp.install_procedure( "plug_in_export_layers", "Export layers as separate images in specified file format to specified directory.", "Layer names are used as filenames for the exported images.", "khalim19", "khalim19", "2013", "<Image>/File/Export/E_xport Layers...", "*", gimpenums.PLUGIN, self.PLUG_IN_EXPORT_LAYERS_PARAMS, self.PLUG_IN_RETS) gimp.install_procedure( "plug_in_export_layers_to", "Run Export Layers with last values specified.", ("This plug-in runs plug-in-export-layers non-interactively, using last values specified in that plug-in. " "If plug-in-export-layers was not run for the first time, plug-in-export-layers will be run interactively, " "otherwise this plug-in will take effect. " "Refer to plug-in-export-layers for more information."), "khalim19", "khalim19", "2013", "<Image>/File/Export/Export Layers _to", "*", gimpenums.PLUGIN, self.PLUG_IN_EXPORT_LAYERS_TO_PARAMS, self.PLUG_IN_RETS)
def query(self): authorname = "Brian Atwell" copyrightname = "Brian Atwell" menu_location = "<Image>/Filters/Languages/Python-Fu/move selection layers preview" date = "Dec. 2020" plug_description = "Move Selection over all sub Layers" plug_help = "Move Selection over all sub Layers" plug_params = [ (PDB_INT32, "run_mode", "Run mode"), (PDB_IMAGE, "image", "Input image"), (PDB_DRAWABLE, "drawable", "Input drawable"), ####### 3 params above needed by all scripts using gimpplugin.plugin ###################### (PDB_INT32, "xdelta", "X Transform"), (PDB_INT32, "ydelta", "Y Transform") ] gimp.install_procedure("py_select_move_layers", plug_description, plug_help, authorname, copyrightname, date, menu_location, "RGB*, GRAY*", PLUGIN, plug_params, [])
def install_plugin(plugin_procedure, blurb="", description="", author="", copyright_notice="", date="", menu_name="", menu_path=None, image_types="*", parameters=None, return_values=None): gimp.install_procedure( plugin_procedure.__name__, blurb, description, author, copyright_notice, date, menu_name, image_types, gimpenums.PLUGIN, parameters if parameters is not None else [], return_values if return_values is not None else [] ) if menu_path: gimp.menu_register(plugin_procedure.__name__, menu_path)
def _query(): for plugin in _registered_plugins_.keys(): (blurb, help, author, copyright, date, menupath, imagetypes, plugin_type, params, results, function) = _registered_plugins_[plugin] fn = lambda x: (_type_mapping[x[0]], x[1], x[2]) params = map(fn, params) # add the run mode argument ... params.insert(0, (PDB_INT32, "run_mode", "Interactive, Non-Interactive")) if plugin_type == PLUGIN: params.insert(1, (PDB_IMAGE, "image", "The image to work on")) params.insert(2, (PDB_DRAWABLE, "drawable", "The drawable to work on")) results = map(fn, results) gimp.install_procedure(plugin, blurb, help, author, copyright, date, menupath, imagetypes, plugin_type, params, results)
def query(self): gimp.install_procedure( "lbp_main", "LBP", "Plugin pro LBP.", "Petra Svickova", "Petra Svickova", "2018", "<Image>/_Xtns/LBP", "GRAY", PLUGIN, [ #next three parameters are common for all scripts that are inherited from gimpplugin.plugin (PDB_INT32, "run_mode", "Run mode"), (PDB_IMAGE, "image", "Input image"), (PDB_DRAWABLE, "drawable", "Input drawable"), #plugin specific parameters (PDB_INT32, "radius", "Radius") ], [])
def query(self): gimp.install_procedure( "hue_map_plugin_main", "Maps HSV hue spectrum onto a gradient.", "Maps HSV hue spectrum onto a gradient.", "Jonatan Matejka", "Jonatan Matejka", "2016", "<Image>/_Xtns/Hue map", "RGB*", PLUGIN, [ #next three parameters are common for all scripts that are inherited from gimpplugin.plugin (PDB_INT32, "run_mode", "Run mode"), (PDB_IMAGE, "image", "Input image"), (PDB_DRAWABLE, "drawable", "Input drawable"), #plugin specific parameters (PDB_STRING, "gradient_name", "Gradient name"), (PDB_INT32, "flatten", "Flatten final image"), ], [])
def query(self): gimp.domain_register(constants.DOMAIN_NAME, constants.LOCALE_PATH) gimp.install_procedure( "plug_in_export_layers", _("Export layers as separate images in specified file format"), "", "khalim19 <*****@*****.**>", "khalim19", "2013", _("E_xport Layers..."), "*", gimpenums.PLUGIN, self._create_plugin_params(self.export_layers_settings), self._create_plugin_params(self.export_layers_return_values)) gimp.install_procedure( "plug_in_export_layers_to", _("Run \"{0}\" with the last values specified").format( constants.PLUGIN_TITLE), _("If the plug-in is run for the first time (i.e. no last values exist), " "default values will be used."), "khalim19 <*****@*****.**>", "khalim19", "2013", _("Export Layers _to"), "*", gimpenums.PLUGIN, self._create_plugin_params(self.export_layers_to_settings), self._create_plugin_params(self.export_layers_to_return_values)) gimp.menu_register("plug_in_export_layers", "<Image>/File/Export") gimp.menu_register("plug_in_export_layers_to", "<Image>/File/Export")
def query(self): logging.debug("query") gimp.install_procedure( "btn4ws", "Buttons for website", """Creates buttons for a website. Which have the same size, layout, effects on it. It's possible to create JavaScript code, CSS and XHTML examples for MouseOver effects also.""", "Jan Dittberner", "Jan Dittberner <*****@*****.**>", "%s, %s" % (btn4ws_version, "$Date: 2009-03-15 08:56:39 +0100 (Sun, 15 Mar 2009) $"), "<Toolbox>/Xtns/Render/Buttons for website ...", "", PLUGIN, [(PDB_INT32, "run_mode", "Run mode"), (PDB_STRING, "string_filename", "File containing the strings"), (PDB_STRING, "output_directory", "Directory for the output files"), (PDB_STRING, "font", "Font for the strings"), # "Sans 18"), (PDB_COLOR, "string_color", "Color of the strings"), #, (255, 255, 0)), (PDB_INT8, "transparent_background", "Keep the background transparent (This doesn't work in MS Internet Explorer <= 6.0)"), #, 0), (PDB_COLOR, "background_color", "Color of the background"), #, (7, 135, 255)), (PDB_INT8, "apply_glow", "Enable glow effect"), #, 1), (PDB_COLOR, "glow_color", "Color of the Glow effect"), #, (255, 180, 0)), (PDB_INT8, "use_pattern", "Use a pattern for the button"), #, 1), (PDB_STRING, "button_pattern", "Fill pattern of the button"), #, "Rain"), (PDB_COLOR, "button_color", "Button color (if you don't use a pattern)"), #, (0, 0, 255)), (PDB_INT32, "round_radius", "Radius of the round corners"), #, 20), (PDB_INT32, "padding", "Space around the text"), #, 3), (PDB_INT32, "glow_size", "Size of the Glow effect"), #, 10), (PDB_INT32, "bevel_width", "Width of the bevel"), #, 5), (PDB_INT8, "apply_nova", "Nova or not Nova?"), #, 1), (PDB_INT32, "nova_sparkles", "Sparkles of the Nova"), #, 5), (PDB_INT32, "nova_radius", "Radius of the Nova"), #, 2), (PDB_COLOR, "nova_color", "Color of the Nova effect"), #, (255, 238, 0)), (PDB_INT8, "write_xcf", "Write a GIMP xcf file"), #, 0), (PDB_INT8, "create_inactive", "Create Inactive Button"), #, 1), (PDB_INT8, "create_active", "Create Active Button"), #, 1), (PDB_INT8, "create_pressed", "Create Pressed Button"), #, 1), (PDB_INT8, "create_jscript", "Create JavaScript, HTML and CSS"), #, 1) ], [])
def query(self): authorname = "Brian Atwell" copyrightname = "Brian Atwell" menu_location = "<Image>/Filters/Languages/Python-Fu/Edit Atlas" date = "Jan. 2021" plug_description = "Edit Atlas files using rect selections" plug_help = "Load an Atlas file, edit Atlas and save Atlas" plug_params = [ (PDB_INT32, "run_mode", "Run mode"), (PDB_IMAGE, "image", "Input image"), (PDB_DRAWABLE, "drawable", "Input drawable")] ####### 3 params above needed by all scripts using gimpplugin.plugin ###################### gimp.install_procedure("py_edit_libgdx_atlas", plug_description, plug_help, authorname, copyrightname, date, menu_location, "RGB*, GRAY*", PLUGIN, plug_params, [])
def query(self): gimp.install_procedure(self.name, self.blurb, self.help, self.author, self.copyright, self.date, self.menupath, self.image_types, self.type, self.params, self.ret_vals)