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(): 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.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.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(): 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): 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(): gimp.domain_register(config.DOMAIN_NAME, config.LOCALE_DIRPATH) for procedure, args_and_kwargs in _plugins.items(): install_plugin(procedure, *args_and_kwargs[0], **args_and_kwargs[1])
def query(self): gimpplugin.plugin.query(self) gimp.domain_register(config.DOMAIN_NAME, config.LOCALE_PATH) self.register()
def _query(): gimp.domain_register(config.DOMAIN_NAME, config.LOCALE_DIRPATH) for procedure, kwargs in _procedures.items(): _install_procedure(procedure, **kwargs)
def _query(): gimp.domain_register(config.DOMAIN_NAME, config.LOCALE_PATH) for plugin_procedure, plugin_args_and_kwargs in _plugins.items(): install_plugin(plugin_procedure, *plugin_args_and_kwargs[0], **plugin_args_and_kwargs[1])