Forum: Poser Python Scripting


Subject: Useful Code Snippets

structure opened this issue on Jun 27, 2019 · 94 posts


adp001 posted Sat, 16 May 2020 at 8:50 AM

To load the data back if you are scripting outside of Poser:

try:
    import cPickle as pickle
except ImportError:
    import pickle

with open(filename, "rb") as fh:
    geom = pickle.load(fh)

(Make sure there is access to the class you saved the file with – maybe it's better to use plain dict in the Poser script part)

Now you can get from the dict what you need and ignore/discard the rest.