Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp Python script file load question
#11
(03-20-2021, 12:47 AM)Ofnuts Wrote:
Code:
OAFE.open_add_flatten_export("/Users/TimB/Desktop/xcftemplate.xcf" "/Users/TimB/Desktop/jpg_to_add.jpg" "2060" "410" "/Users/TimB/desktop")

This is indeed a single argument. If you want several arguments, you have to use commas (remember that everything between the single quotes is actually python source code, not shell code. Also if you put quotes around your number, they will be string args. Without quotes, they are likely to be the integers you need.

Code:
OAFE.open_add_flatten_export("/Users/TimB/Desktop/xcftemplate.xcf", "/Users/TimB/Desktop/jpg_to_add.jpg", 2060, 410, "/Users/TimB/desktop")

Great advice again. No quotes around the integers. This ended up working:

gimp -idf --batch-interpreter python-fu-eval -b "import sys;sys.path=['.']+sys.path;import OAFE_PARAM;OAFE_PARAM.open_add_flatten_export('/Users/TimB/Desktop/xcftemplate.xcf', '/Users/TimB/Desktop/jpg_to_add.jpg', 2060, 410, '/Users/TimB/Desktop/')" -b "pdb.gimp_quit(1)"

Thank you!
Reply


Forum Jump: