Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)
Writing the file is easy; determining the field of view is the hard part. Here's a formula that seems to work, based on some Googled info + some experimentation. FOV (deg) = (180/pi) * 2 * atan (1000 / (focal*2)) where 1000 mm is a guesstimate of Poser's "film size" based on some experiments. I'm writing the PY now, based on this formula; if you know a better one, I can change it easily.
My python page
My ShareCG freebies
My python page
My ShareCG freebies
My python page
My ShareCG freebies
My python page
My ShareCG freebies
My python page
My ShareCG freebies
My python page
My ShareCG freebies
Ok, try changing the line with MyPath from: MyPath=os.path.normpath(os.path.joinBasePath,'runtime/test.OBM')) to: MyPath=':Runtime:Test.OBM' We'll get there one way or another!
My python page
My ShareCG freebies
I'm glad you popped in. I really wish somebody would put together a list of Mac peculiarities as they relate to Poser and Python. I'm frustrated with constant 'blind' debugging.
My python page
My ShareCG freebies
My python page
My ShareCG freebies
now i see this message .. Exception in Tkinter callback Traceback (innermost last): File "HD:program:Poser4:Runtime:Python:Lib:lib-tk:Tkinter.py", line 764, in call return apply(self.func, args) File "", line 126, in HandleName File "", line 54, in WriteOBM TypeError: not all arguments converted P.S. 2:00 am here, i need sleep now, SYT. Thx again for your aid, ockham ;-)
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
OK. I think I know what that means... Can you add an extra blank line to the end of the file in a text editor and try running it again. If you have no success, I'll probably have to add some debugging statements to try and track this down. I'm guessing that the file save from your browser may have truncated the carriage return from the last line of the file. I have also seen cases where that kind of error arises from multiple people editing a file. E.g. ockham's scripts usually have only spaces for indentation, but I like to use tabs. I saw the same error on an earlier version of the script before I found the errant tab and replaced it with spaces. However, I have just downloaded the script I uploaded and tried it myself without a problem. Save As dialog comes up and everything works. Hmmm. andygraph, can you let me know what OS and poser versions you are running? I'm on OS X 10.3.8 and P5.0.4.335 I did at one point install MacPython and played with adding some of its definition files to the Poser Python folders trying to get tkInter to work, but without success. I do hope I haven't added something that makes this run on my system alone. :-(
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
Damn. I've just looked back at some of your earlier posts andygraph and it looks like your running P4 Pro Pack, if I'm reading the Runtime path correctly. I don't have Pro Pack, but IIRC there are substantial differences between it and P5 Python. I wouldn't be at all surprised if the SimpleDialogs in my script were only included with Poser 5 and therefore won't work at all for you, I'm afraid.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
@andygraph, sorry for the delay. Since you have that compressPoserFiles.py file, can you run it successfully? I don't mean to compress any files, just to see if it pops up a Mac OS style dialog, rather than one of the XML type dialogs.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
It's possible create a python script for import/export a obm file ? (The obm file is a camera motiona data format of Electric Image.) thx for feedback ;-) this is a example of the structure: --------------------------------------------------------------------------------------------------- MOTION SECTION Object: "Camera 1" Frames: 4 Frame Time: 0.040000 Channels: 7 XTRAN YTRAN ZTRAN XROT YROT ZROT FOV INCHES INCHES INCHES DEGREES DEGREES DEGREES DEGREES 5.767436 4.020914 -18.196330 7.893003 -2.009235 -0.167604 62.241633 5.765903 4.019576 -18.132818 7.888657 -1.999127 -0.179130 62.241620 5.765213 4.021562 -18.067537 7.888798 -1.999150 -0.176237 62.241614 5.763929 4.020183 -18.005863 7.876129 -1.995005 -0.176884 62.241606 ---------------------------------------------------------------------------------------------------