Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python-Fu console crash
#6
This is because you call main() in the Python console. In fact the whole idea of copy-pasting your complete plugin code in the console isn't correct. You can try functions, but the structure of the plugin code clashes with the environment of the python console which is also a python plugin. What you can do is try a function up to the body  of your plugin (the function you define in the register() call), in which case you have to figure out a way to pass the parameters (find an image reference, and a layer in our case probably using gimp.image_list[()[0] for the image and image.active_layer for the layer.

Otherwise, if you put you code in the right directory, it works:

   
Reply


Messages In This Thread
Python-Fu console crash - by robgos - 08-05-2024, 02:31 PM
RE: Python-Fu console crash - by Ofnuts - 08-05-2024, 05:05 PM
RE: Python-Fu console crash - by robgos - 08-06-2024, 07:22 AM
RE: Python-Fu console crash - by Ofnuts - 08-06-2024, 07:49 AM
RE: Python-Fu console crash - by robgos - 08-06-2024, 10:07 AM
RE: Python-Fu console crash - by Ofnuts - 08-06-2024, 11:28 AM
RE: Python-Fu console crash - by robgos - 08-06-2024, 11:55 AM
RE: Python-Fu console crash - by Ofnuts - 08-06-2024, 07:37 PM

Forum Jump: