Forum: Poser Python Scripting


Subject: Scripted CR2 Saving Causes Poser to Exit

Iuvenis_Scriptor opened this issue on Apr 25, 2022 ยท 3 posts


Iuvenis_Scriptor posted Mon, 25 April 2022 at 12:36 PM

I've encountered quite a mystery in Poser 12.0.757.  I'm working on a script that starts out like this:


import os
import poser
loc = os.path.dirname(os.path.abspath(__file__))
lib = loc.split("Materials")[0]
fig = os.path.join(lib,"Character\Genesis 8 Male\Characters\Iuvenis_Scriptor\Calisto")
scene = poser.Scene()
figure = scene.CurrentFigure()
scene.SaveLibraryFigure(os.path.join(fig,"Calisto.cr2"))


The odd thing is that, when it reaches the last line reprinted above, Poser thinks for a bit and then just closes.  No error message or anything.  It just exits, as if I'd clicked the X in the top right corner of the window.  And yet, when I do the exact same thing manually (via the '+' button in the Library palette), it works just fine.  The same code (with paths and filenames appropriately adjusted) also works just fine on La Femme, but not on a converted G8M.  I'm at a loss, so I'd be thankful for any tips!