25 threads found!
Thread | Author | Replies | Views | Last Reply |
---|---|---|---|---|
tromnek | 0 | 52 |
(none)
|
|
tromnek | 1 | 18 | ||
tromnek | 10 | 31 | ||
tromnek | 43 | 438 | ||
tromnek | 2 | 8 | ||
tromnek | 0 | 4 |
(none)
|
|
tromnek | 16 | 63 | ||
tromnek | 37 | 513 | ||
tromnek | 23 | 217 | ||
tromnek | 10 | 124 | ||
tromnek | 1 | 59 | ||
tromnek | 11 | 120 | ||
tromnek | 4 | 65 | ||
tromnek | 11 | 206 | ||
tromnek | 0 | 29 |
(none)
|
164 comments found!
Here is a beta. It should do what JohnRichardJR requested (and a little more). I think I will probably add to it someday so that you can extract and clone materials from an already existing .cr2 file or .pz2 file, but I have other projects I want to wrap up first.
Make sure you have a figure selected before you run it.
I really need to add a bunch of sanity checks to the code.
Thread: Copying materials | Forum: Poser Python Scripting
I have a poser file parsing class that would take care of most of the hard work in the above suggestion.
The problem is when you create the temporary cr2 file it might be pretty big and take a while to write to disk.
Then I need to parse that big file which could take at least 30 seconds on a reasonable computer.
I could jump to the last Megabyte of the file and begin parsing there. Are the materials alwasy at the end of a cr2 file? Do you think using just the last Megabyte be safe?
Let me know what you all think, and I can probably code something this weekend.
Thread: more on: Running multiple Tkinter scripts. | Forum: Poser Python Scripting
I had to hijack Tkinter.Misc.quit() also. I added some tracking of newtered (hijacked) scripts so that confirmation of closing can warn a user that other scripts will also close.
I'm releasing the code under the GNU 'Lesser' public license so that this class can be used in commercial scripts.
If I don't hear any complaints or problems within the next week or two, I'll release a non-beta version 1.15 back to this thread.
Duckmango, thanks for the help.
Now I can get back to my 'poser remote procedure call daemon' which is what started all of this stuff.
Thread: more on: Running multiple Tkinter scripts. | Forum: Poser Python Scripting
NewtTk().mainloop()
or your app can create a separate 'Sir Bedevere' along with itself by;
root = NewtTk().Tk()<br></br>(snip...)<br></br>root.mainloop()
or your app can keep 'Sir Bedevere' all to itself by;
root = NewtTk().Tk(newtoplevel=0)<br></br>(snip...)<br></br>root.mainloop()
Let me know if there are any problems with this approach (or any suggestions).
duckmango, I renamed a bunch of symbols from earlier versions you saw, hope it isn't too confusing.
Thread: Collection of Poser Python Scripts | Forum: Poser Python Scripting
Can you include a 'more info' url section for each upload. This way we can point a person to a web page with more information (for instance point someone to a thread in this forum).
Thread: Collection of Poser Python Scripts | Forum: Poser Python Scripting
Yes. A section for classes and functions that people are willing to share would also be nice.
Thread: more on: Running multiple Tkinter scripts. | Forum: Poser Python Scripting
Thread: more on: Running multiple Tkinter scripts. | Forum: Poser Python Scripting
Looks like I'm going to have to newter Tkinter.Tk() also. Maybe add to
def ChangeToNewt():
<br></br> Tkinter.IGotBetterTk = Tkinter.Tk<br></br> def ChangeToNewtTk():<br></br> return Tkinter.Toplevel()<br></br><br></br> Tkinter.Tk = ChangeToNewtTk<br></br>
and add to def IGotBetter():
<br></br> Tkinter.Tk = IGotBetterTk<br></br>
But now the script that does this must run before any other scripts. Like a 'Protecter of the Realm' script.
KingArthur = NewtMainLoop( Tkinter.Tk() )
It will also need to schedule time for poser.ProcessSomeEvents(),
KingArthur.Update()
It seems to work, but I spoke too soon before. I'll test some more when I get a chance thursday.
Thread: more on: Running multiple Tkinter scripts. | Forum: Poser Python Scripting
Oops, self.master.wait_window(self) doesn't help. I guess the newterd scripts will have to be able to handle an immediate return from their mainloop(). Sorry, I thought it was working because all the GUI stuff seemed to be working. Also, I noticed an oddity with Tkinter stuff that relies on 'variable changes', like Radiobutton's 'variable=foo, value=bar'. I had to change my stuff and add a 'command=' to those things.
Thread: more on: Running multiple Tkinter scripts. | Forum: Poser Python Scripting
fixed the premature newted mainloop(). in 'def ChangeToNewtMiscMainLoop(self, n=0)' after the print statement add self.master.wait_window( self ) that should keep us in the newterd mainloop until the foreign script destroy()s itself. Just like expected. I also got rid of the self.master.lift(),(duh!), in my Update method. I also cancel the self.master.after(...) when my apps cleanup code. With this done. You can quit your app before other running 'newtered' scripts and everybody stays happy (I think).
Thread: Using sockets or pipes to talk with external apps | Forum: Poser Python Scripting
Attached Link: http://www.renderosity.com/messages.ez?ForumID=12390&Form.ShowMessage=2088638
I've moved forward on this idea. Just posted a new thread here, looking for more feedback. You folks are great. Thanks for the help.Thread: Dynamically Lengthen Hair? | Forum: Poser Python Scripting
A quick look at the script and your reported error tells me that you need to put a blank line following: print "Something wrong..." that should solve the SyntaxError.
Thread: more on: Running multiple Tkinter scripts. | Forum: Poser Python Scripting
The main thing to watch out for are foreign scripts where the main function performs some kind of cleanup after it's regular 'mainloop()'. This is because the hijacked mainloop() returns immediately. So scripts should do all their cleanup in their class, not in main.
There are also the standard issues of global() pollution.
This can have some disasterous effects when scripts are running at the same time.
Thread: more on: Running multiple Tkinter scripts. | Forum: Poser Python Scripting
It works best if this code loads first. Then run as many scripts as you want. Close and reopen them in any order. You can even close this code before others and things will work fine closeing what ever you like in any order, but don't run any new ones. There are some combinations that will make it 'crash', I need to enumerate them in the doc text.
Thread: Getting "PointAt" angles via python.... | Forum: Poser Python Scripting
Thanks, I'll call you when I can get back to that project.
Another thing I'd like to do is 'auto' adjust foot angles so that poses made for one shoe type will adjust to the the current shoe type. I think I'm going to need to understand the stuff in this thread better in order to calculate a set of solutions.
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.
Thread: Copying materials | Forum: Poser Python Scripting