Fri, Nov 14, 6:48 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Lobo3433, Staff Forum Coordinators: Anim8dtoon

Poser Python Scripting F.A.Q (Last Updated: 2025 Sep 29 4:10 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Script request: simple non-modal dialog


Spanki ( ) posted Sat, 29 March 2008 at 6:57 PM · edited Wed, 12 November 2025 at 5:50 PM

Hey guys...

Does anyone have a very simple example of putting up a "stop" non-modal dialog, where the script puts that up, then stays alive (while Poser interface is available for user operation) until the stop button is clicked on?

I want to test out some things with a call-back function, but/so I need some way to:

  1. set up the call-back
  2. put up the "stop" dialog
  3. let Poser ProcessSomeEvents() (or whatever) until...
  4. user clicks on stop, so remove the call-back and exit the script.

...I just haven't done any interface/gui stuff at all yet, so I'm not sure of the simplest way to do this.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


markschum ( ) posted Sat, 29 March 2008 at 7:07 PM

I dunno if this will work but its easy to try

    msg = " Wrong Figure Selected - select xxxxxxxxxx "
    mymsg = poser.DialogSimple.MessageBox(msg)

for poser 7 , puts up a message with an ok button only


Spanki ( ) posted Sat, 29 March 2008 at 7:23 PM

I think that would be a modal dialog though.. right? (user can't do anything in Poser while it's up)

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


svdl ( ) posted Sat, 29 March 2008 at 7:42 PM

Non-modal dialogs can be made with Tkinter - after a fashion. I've never gotten Tkinter to behave predictably or reliably in Poser.
I think your best option would be to use the Poser Scripts palette (not the menu).

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


Spanki ( ) posted Sat, 29 March 2008 at 7:46 PM

Yeah, I was just doing some searching and didn't find any 'non-modal' Poser dialog info, so they might all be modal.  Hrmf.  So, you're suggesting maybe two separate scripts?  One to install the callback and one to remove it?  I guess that could be done.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


adp001 ( ) posted Sun, 30 March 2008 at 10:01 AM

Maybe this will help to find a solution for your app:

import Tkinter as Tk

def stopPressed():
    # reset Poser events here
    app.cancel=True
    app.destroy()
    

app=Tk.Tk()
app.cancel=False
btn=Tk.Button(app,text="press to stop",command=stopPressed)
btn.pack()
app.update()

# Insert your standard app here.
# call app.update() from time to time and check
# app.cancel.

import math

for i in range(1000000) :
    # heavy work to do - the following makes no sense :)
    x=i*math.sin(i/100000.0)+math.acos(i/100000.0)
    app.update()
    if app.cancel : break
    
    for j in range(1000000) :
        y=x*math.cos(j/100000.0)




Spanki ( ) posted Sun, 30 March 2008 at 12:56 PM

Thanks ADP - that should come in handy.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.


Cage ( ) posted Sun, 30 March 2008 at 3:05 PM

I think Ockham may be doing something like what you want in his Hansel script....

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.


Privacy Notice

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.