Forum: Poser Python Scripting


Subject: Some questions (grouping, pictures and PC vs MAC)

semidieu opened this issue on Nov 04, 2006 · 5 posts


semidieu posted Sat, 04 November 2006 at 9:50 AM

Hi all...

Some little questions:

1° Using Python, is it possible to apply the grouping tool: "Create UV from perspective" ?

2° Is it possible to deal with picture with the actual Python version ? What I want is get an "average" color from an imageMap. I know I should use PIL, but I don't have a compiled version for MAC. So, if I want to create a MAC/PC python scripts that deals with pictures, how do I do that ?

3° Do you know of an application that create the "dialogs" in xml (visually) ? I know PoseWorks has the pzrXML dialog class, but is ît compatible with Mac ?


nruddock posted Sat, 04 November 2006 at 4:16 PM

Quote - Some little questions: 1° Using Python, is it possible to apply the grouping tool: "Create UV from perspective" ?
2° Is it possible to deal with picture with the actual Python version ? What I want is get an "average" color from an imageMap. I know I should use PIL, but I don't have a compiled version for MAC. So, if I want to create a MAC/PC python scripts that deals with pictures, how do I do that ?
3° Do you know of an application that create the "dialogs" in xml (visually) ? I know PoseWorks has the pzrXML dialog class, but is ît compatible with Mac ?

  1. Can't find anything in the docs, but creating UVs for the equivalent of Front, Side, or Top views should be easy to code (calculate 2d bounding box and scale coordinates for the two relevant axes).
  2. PIL is definitely the easiest way.
    ImageMagick might be a possibility (there is a Python wrapper for it).
    You could wrap another image handling library, or write your own python code to handle a few common types (possibly by wrapping libjpeg, libpng, and libtiff).
  3. Any XML dialogs generated by Poseworks' library should work on a Mac.
    I know of no GUI designer that produce the required XMl directly, but it might be possible to one that generates XML for another toolkit (e.g. wxGlade for wxWindows) and develop an XSLT transform from that to Poser's XML.

semidieu posted Sat, 04 November 2006 at 4:50 PM

Quote - 2) PIL is definitely the easiest way.

I searched a bit but... how do the user from MAC get a compiled version of PIL ? I'm on PC and, for Windows, the compiled version exist. For what I know, there is no compiled verison for Mac to download.


nruddock posted Sat, 04 November 2006 at 5:39 PM

Quote - I searched a bit but... how do the user from MAC get a compiled version of PIL ? I'm on PC and, for Windows, the compiled version exist. For what I know, there is no compiled verison for Mac to download.

It's all done from the source package, plus dependancy installs AFAICT -> http://tomster.org/blog/archive/2005/10/13/pil-on-mac-os-x
I don't know enough about the different Mac binary formats and OS versions to comment on whether or not providing a precompiled library is possible, sensible, or even desirable.


semidieu posted Mon, 06 November 2006 at 9:11 AM

Thanks for looking.