cardassembler module

Main script which handles Gimp addone interface.

This code uses gimpfu. Written for Gimp 2.10.18 which uses Python 2.7.18.

Note

Probably: Gimp runs this script through eval() function inside its installation folder and direct import from different folder raises access denied error. See _run_code() function in Gimp installation folder/lib/python2.7/runpy.py.

cardassembler.card_creator(data_folder, xml_file, card_IDs, save)[source]

Create board-game cards.

Registered function by gimpfu.register(). Main plugin functionality. Add “keepCmdOpen” among cardIDs to keep the cmd window open.

Parameters
  • data_folder (str) – Blueprints (XML) and data images (XCF) folder

  • xml_file (str) – Blueprint to be used (with extension)

  • card_IDs (str) – Newline-separated paths to starting nodes.

  • save (bool) – Save the images after generation

Raises

ValueError – If cardIDs are empty.

cardassembler.palette_creator(data_folder, xml_file, palette_ID, name)[source]

Create palette.

Registered function by gimpfu.register(). Supplemental plugin functionality.

Parameters
  • data_folder (str) – Blueprints (XML) folder

  • xml_file (str) – Blueprint to be used (with extension)

  • palette_ID (str) – Path to the starting node.

  • name (str) – Name of the created palette

Raises

ValueError – If the paletteID is empty.