Forum: Poser Python Scripting


Subject: Is there a way to support Undo with LoadLibraryPose

yarp opened this issue on Apr 23, 2021 ยท 28 posts


adp001 posted Sat, 24 April 2021 at 8:46 AM

As you probably know, a Poser file can do all sorts of things. Not just set a pose. So what should one do before loading such a file to make Undo possible? In your example, setting a single parameter, the matter is clear: the old value goes into the undo buffer. When loading a pose file, you would have to save the entire scene beforehand for an undo if you want to cover everything. Something you can do with Poser Python: poser.SaveDocument([filename]).

But saving the whole scene takes time. Possibly a lot of time. And that even though the loaded file may have changed very little.