User friendly, cross-platform, Python addons for Poser?



  • I'm looking for some feedback and suggestions on ways to create installer scripts for Poser Python modules/addons to guarantee common functionality between Poser Python scripts on Windows and macOS.

    It's so long since I installed any Python based Poser addon that didn't require me to have detailed knowledge of where to put files on different platforms, that I can't remember if I ever came across anything which can do what I want.

    Specifically, I want an installer (whether it be a Windows .exe, macOS .app or python script) appropriate for the selected platform, which can install either Python addons or site-packages and make them available for import by a python script which the user can run within Poser. The addons or site-packages, which I will determine prior to distribution or installation, will provide equivalent or missing functionality present on either the Windows or macOS Poser Python distribution, but not on the other. E.g. Windows Poser has working Tkinter, while macOS Poser does not; macOS Poser Python supports TrueType and OpenType fonts out of the box, while Windows Poser Python is missing the _imagingft C module; ShaderWorks' Postwork Manager can save JPEG images on Windows, but not on macOS without replacing PIL with Pillow.

    I want to avoid having to cripple a script which is fully functional on one platform, just so it can run, unaltered, in the reduced feature-set environment of the other platform.

    The first requirement is that it doesn't require the user to know where their Poser application is installed, or where the Poser Python libraries live.


  • Poser Ambassadors

    You didn't mention pip. Is that because it doesn't do what you want, or because it's not included with Poser, or because you weren't aware of it?



  • @anomalaus But every Poser user SHOULD know where the Poser app is installed and where the Python libraries live. Ease of use is one thing, but that's no excuse for voluntarily staying stupid.



  • @bagginsbill I'd like to avoid the user having to use command line tools, to essentially avoid them having to type or copy and paste a command into an interpreter. I'm looking for a process as simple as:

    Download repository/archive
    Extract contents of archive
    Read ReadMe.txt, which tells you to execute an included installer which puts all the components in the proper places.
    Execute the installer

    Maybe I'm underestimating the average Poser user. I read that Windows Poser folk are quite comfortable with unzipping newly downloaded content directly into their Runtime folders. I've never been so trusting as to let an archive tool possibly overwrite something.

    I have used pip on several occasions to install packages on Python outside Poser, but have not, so far, looked for a way to use pip on Poser's python installation. The last time I seriously poked into Poser's Python packages was to install SciPy to do spline interpolation prior to the UnaffectedValue() method being released, and a replacement NumPy module which was compatible with the only SciPy I could download at the time. All of which had to be installed by hand and specific .pth files created so they could be found and imported by Poser Python scripts. All of which had to be done within the Poser Pro 2012.app/Contents/Resources/site-packages.

    I haven't done more with Poser Python on Windows than check that my scripts don't get the same results there as under macOS. I don't yet understand why Poser Python on Windows can't use TrueType or OpenType fonts with PIL, other than that the _imagingft/freetype module isn't present.