Python API - gimp-xcf-load
Environment/Versions
- GIMP version: 2.99.18 commit f94c4cb5
- Package: Installer from gimp.org
- Operating System: Windows 10
In using the python API, I cannot get a .xcf to load. I have tried both python code in my plugin, and the python console using a pdb call. Both throw no errors, but just do not load the file. I can see the progress bar at the bottom start with the text "Opening {correct filepath of the .xcf}" but then just goes away after maybe 30%. It goes away very quickly, and I had to repeat the command many times to actually read it. Description of the bug
In debugging it appears that the file object is correctly assigned.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Either use python code in a plugin:
import pypdb # using in my plugin for ease\
def openXCF(filePath):\
file = Gio.File.new_for_path(filePath)\
newVerImage = pdb.gimp_xcf_load(file=file)\
# pdb.gimp_displays_flush() # NEEDED ???\
no errors thrown.
- Or use the python console and try to load a file with:
->filePath = r"N:/Data/Projects/Prism Tests/01_Production/Assets/Building/Scenefiles/gimp/Paint/Building_Paint_v002.xcf"\
->file = Gio.File.new_for_path(filePath)\
->procedure = Gimp.get_pdb().lookup_procedure('gimp-xcf-load'); config = procedure.create_config(); config.set_property('run-mode', Gimp.RunMode.INTERACTIVE); config.set_property('file', file); result = procedure.run(config); success = result.index(0); image = result.index(1)\
I tried both INTERACTIVE and NONINTERACTIVE
no errors thrown
I have tried several different .xcf files at different locations/drives.
- Watch the file try to load but then stops.
…
Expected result: .xcf should load
Actual result: .xcf file does not load. No errors thrown
Additional information
If you have a backtrace for a crash or a warning, paste it here.
Edited by Andre Klapper