gimp-vtf
gimp-vtf copied to clipboard
Issues calling VTF save from Python script
Hello!
I'm not sure if this is a bug as much as it is just me misunderstanding how this plugin api works.
Basically I have some repetitive stuff I'm automating with a Python script. I need to be able to export layer groups as VTF's with the layers as animation frames.
This is the code im testing with:
image = gimp.image_list()[0]
drawable = pdb.gimp_image_get_layer_by_name(image, "test")
file_path = r'C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\custom\test\materials\hud'
file_name = os.path.join(file_path, "test.vtf")
pdb.file_vtf_save(image, drawable, file_name, file_name, 0, 0, 1, 8, 0, 1, 1, 0, 0, 0, drawable)
This can be run via the Python console.
The file_vtf_save function is saying there is no data to export. Passing -1 for the last layer argument rejects it as an invalid type.
It would be a huge time saver if I could get this to work. Do you have any thoughts about troubleshooting this? Thanks