bushi opened this issue on Feb 07, 2001 ยท 12 posts
bushi posted Wed, 07 February 2001 at 4:55 PM
Attached Link: http://bushi3d.com/PythonScripts/FaceRandomizer2.py
I took the face randomizer script and wrapped some TkInter code around. You can now randomize the figure's face multiple times without having to restart the script. Not the best example of structured programming since there is a lot of code re-use but a reasonable example of using TkInter with PoserPython. The buttons: Go! - Randomize the figure's face MTs Increment - Add 0.05 to all the face MT values. Try clicking this one several times. Decrement - Sub 0.05 from all the face MT values. Reset - Sets all the face MTs back to 0.0 Quit - kills the pop-up window. I've also added a feature that copys the Left Blink value to the Right Blink. This gives a better result on the face overall.JeffH posted Thu, 08 February 2001 at 11:05 AM
Thanks.
Mason posted Thu, 08 February 2001 at 11:21 AM
Cool idea.
poserpro posted Thu, 08 February 2001 at 1:50 PM
This py is cool, better than mine:)
Colm_Jackson posted Thu, 08 February 2001 at 7:39 PM
This is totally excellent. With a bit of time and tweaking you can get some very 'real' faces... Faces you have seen before. One thing though... I have to quite the script before I can adjust anything or it crashes. Well done Bushi... Colm...
bushi posted Thu, 08 February 2001 at 11:22 PM
Thanks! I'm still tinkering with it so I expect it to improve with age. grins pro - The next feature will be that 'undo' you asked about earlier. Colm - I'm not certain yet if that's a limitation in the script or just something to live with in PoserPython. I'd also like to figure out how to get the dials to update automatically.
poserpro posted Fri, 09 February 2001 at 9:26 AM
Thanks for the promising "undo". One more thing, can we expand the PythonScript's panel so that more ( like 20 )buttons can be accessible in the panel, no need to clear all the buttons entirely and retrive the ones we need again.
bushi posted Sun, 11 February 2001 at 12:47 AM
pro - Can you explain this a bit more? I'm not certain about what you're asking?
poserpro posted Sun, 11 February 2001 at 3:46 AM
Thanks Bushi despite PPP's PythonScript panel is small, one can use only 10 *py in the panel, I know now we can use Alt+click to change the button and Ctrl+click to edit. And I understand now we don't have to clear all to retrieve the ones we need, just Alt+click for the one we don't need to replace with new one. I just thought if we can make it contain more ( like 20 ) buttons in the little panel, so as to expand it.
gryffnn posted Sun, 11 February 2001 at 10:18 AM
Looks to me, at least on the Mac, like to you can add a sub-folder, which then shows up as a button that opens up a sub-menu of scripts, so you could organize a stucture that keeps more at hand.
bushi posted Mon, 12 February 2001 at 11:00 PM
pro - You should be able to just add another line in the script with a new button number. All this stuff is dynamic so it should work fine. If you have any problems let me know and I'll check it out.
poserpro posted Tue, 13 February 2001 at 10:09 AM
Right, Bushi I see we can add more line in numeric order in mainScript.py, I tried to add up to 14 buttons as this is valentine day. but it told me "buttonIndex must be 1 to 10" ?