def __init__(self): self.settings = settings_plugin.create_settings() self.session_source = pgsettingpersistor.SessionPersistentSettingSource( constants.SESSION_SOURCE_NAME) self.persistent_source = pgsettingpersistor.PersistentSettingSource( constants.PERSISTENT_SOURCE_NAME)
def __init__(self): self.settings = settings_plugin.create_settings() self.session_source = pgsettingpersistor.SessionPersistentSettingSource(constants.SESSION_SOURCE_NAME) self.persistent_source = pgsettingpersistor.PersistentSettingSource(constants.PERSISTENT_SOURCE_NAME) procedures_to_register = ["plug_in_export_layers", "plug_in_export_layers_repeat"] for procedure_name in procedures_to_register: self._set_gui_excepthook(procedure_name)
def main(settings=None): if not settings: settings = settings_plugin.create_settings() image = pdb.gimp_file_load(TEST_IMAGES_FILEPATH, os.path.basename(TEST_IMAGES_FILEPATH)) layer_tree = pg.itemtree.LayerTree(image, name=pg.config.SOURCE_NAME, is_filtered=True) settings["special/image"].set_value(image) gui_main.ExportLayersDialog(layer_tree, settings, run_gui_func=take_screenshots) pdb.gimp_image_delete(image)
def __init__(self): self.settings = settings_plugin.create_settings() self.session_source = pgsettingpersistor.SessionPersistentSettingSource(constants.SESSION_SOURCE_NAME) self.persistent_source = pgsettingpersistor.PersistentSettingSource(constants.PERSISTENT_SOURCE_NAME)
# Disable overlay scrollbar (notably used in Ubuntu) to be consistent with the # Export menu. os.environ["LIBOVERLAY_SCROLLBAR"] = "0" from export_layers import pygimplib as pg from future.builtins import * import gimpenums from export_layers import exportlayers from export_layers import settings_plugin from export_layers import update from export_layers.gui import main as gui_main SETTINGS = settings_plugin.create_settings() @pg.procedure(blurb=_("Export layers as separate images"), author="{} <{}>".format(pg.config.AUTHOR_NAME, pg.config.AUTHOR_CONTACT), copyright_notice=pg.config.AUTHOR_NAME, date=pg.config.COPYRIGHT_YEARS, menu_name=_("E_xport Layers..."), menu_path="<Image>/File/Export", parameters=[SETTINGS["special"], SETTINGS["main"]]) def plug_in_export_layers(run_mode, image, *args): SETTINGS["special/run_mode"].set_value(run_mode) SETTINGS["special/image"].set_value(image) layer_tree = pg.itemtree.LayerTree(image,
# Disable overlay scrollbar (notably used in Ubuntu) to be consistent with the # Export menu. os.environ["LIBOVERLAY_SCROLLBAR"] = "0" from export_layers import pygimplib as pg from future.builtins import * import gimpenums from export_layers import exportlayers from export_layers import settings_plugin from export_layers import update from export_layers.gui import main as gui_main SETTINGS = settings_plugin.create_settings() @pg.procedure( blurb=_("Export layers as separate images"), author="{} <{}>".format(pg.config.AUTHOR_NAME, pg.config.AUTHOR_CONTACT), copyright_notice=pg.config.AUTHOR_NAME, date=pg.config.COPYRIGHT_YEARS, menu_name=_("E_xport Layers..."), menu_path="<Image>/File/Export", parameters=[SETTINGS["special"], SETTINGS["main"]] ) def plug_in_export_layers(run_mode, image, *args): SETTINGS["special/run_mode"].set_value(run_mode) SETTINGS["special/image"].set_value(image)
def __init__(self): pygimplib.GimpPlugin.__init__(self) self.settings = settings_plugin.create_settings()
import export_layers.pygimplib as pygimplib import export_layers.config pygimplib.init() from export_layers.pygimplib import pgitemtree from export_layers import exportlayers from export_layers import gui_plugin from export_layers import settings_plugin #=============================================================================== settings = settings_plugin.create_settings() @pygimplib.plugin( blurb=_("Export layers as separate images"), author="khalim19 <*****@*****.**>", copyright_notice="khalim19", date="2013-2016", menu_name=_("E_xport Layers..."), menu_path="<Image>/File/Export", parameters=[settings['special'], settings['main']] ) def plug_in_export_layers(run_mode, image, *args): settings['special/run_mode'].set_value(run_mode) settings['special/image'].set_value(image)
import gimpenums import export_layers.pygimplib as pygimplib import export_layers.config pygimplib.init() from export_layers.pygimplib import pgitemtree from export_layers import exportlayers from export_layers import gui_plugin from export_layers import settings_plugin #=============================================================================== settings = settings_plugin.create_settings() @pygimplib.plugin(blurb=_("Export layers as separate images"), author="khalim19 <*****@*****.**>", copyright_notice="khalim19", date="2013-2016", menu_name=_("E_xport Layers..."), menu_path="<Image>/File/Export", parameters=[settings['special'], settings['main']]) def plug_in_export_layers(run_mode, image, *args): settings['special/run_mode'].set_value(run_mode) settings['special/image'].set_value(image) layer_tree = pgitemtree.LayerTree( image, name=pygimplib.config.SOURCE_PERSISTENT_NAME, is_filtered=True)