25 threads found!
Thread | Author | Replies | Views | Last Reply |
---|---|---|---|---|
tromnek | 0 | 52 |
(none)
|
|
tromnek | 1 | 19 | ||
tromnek | 10 | 32 | ||
tromnek | 43 | 448 | ||
tromnek | 2 | 10 | ||
tromnek | 0 | 5 |
(none)
|
|
tromnek | 16 | 68 | ||
tromnek | 37 | 530 | ||
tromnek | 23 | 217 | ||
tromnek | 10 | 124 | ||
tromnek | 1 | 59 | ||
tromnek | 11 | 123 | ||
tromnek | 4 | 67 | ||
tromnek | 11 | 212 | ||
tromnek | 0 | 30 |
(none)
|
164 comments found!
Yes, use the new server (prpcd132b.py) with P3dO, that's what I do. The snd2sock03b.exe is mainly for use without P3dO.
Thread: Socket communication with external apps | Forum: Poser Python Scripting
There are two main components of both this package and the P3do plugin (i'll assume you are using the 'extended' plugin that allows remote python script execution).
A server listens for filenames to be loaded into the poser scene.
An external program sends filenames to the server.
You can use the new server (prpcd132b.py) with P3dO instead of the 'PoserPythonReceiver.py' that was in the plugin package. This new server now provides support for running additional python scripts that have a GUI interface(loaded remotely or with the Poser menu) while the server is running. It also allows client modules to be loaded (I included a demo client module, client132b.py).
The security concerns between the new server and the 'extended' one in the P3dO plugin are identical.
The 'socket03b.exe' program is an alternative to the P3dO plugin;
'PoserPythonSender.exe' + 'PoserPythonSender.py'
This program is quicker (maybe .5 seconds), and makes it easier to implement a 'Send To' context menu.
You can continue to use the orginal P3dO plugin sending ability and it will communicate with the new server (prpcd132.py) just fine.
Your firewall issue. (What one are you using?)
My guess is that your personal firewall see's an outbound tcp/ip connection initiated from an .exe file as a possible threat (and rightfully so).
However, it should have also questioned that same connection when it was initiated by the the P3dO plugin. It probably didn't see it as a threat because in the plugin the connection is initiated by a dll (python22.dll) not an .exe and your firewall was (falsely) assuming the connection was safe.
The best solution is to define an exception in your firewall for socket03b.exe to all outbound connections from ip 127.0.0.1 to ip 127.0.0.1 port 49160
This is safer than disabling your firewall.
Did you try the client module? It's really neat.
Thread: Problem with Poser 5 Compress Files Script | Forum: Poser Python Scripting
Thread: Problem with Poser 5 Compress Files Script | Forum: Poser Python Scripting
I compressed a couple gig and it seems to work fine in windows.
Mac users should test it first (could someone check my logic for the Mac OS).
Thread: Problem with Poser 5 Compress Files Script | Forum: Poser Python Scripting
Hope my post is not too late. Yesterday I wanted to compress my entire 'libraries' folder and I wasn't happy with problem with WinZip.
It appears to me that WinZip chokes while making a temp file for extraction. It uses the entire filepath (with driveletter and colon) stored in the gzip header and appends it to your temp directory, thus an invalid filename. Here's a simple fix. Put the following code block above the
os.path.walk(dirToCompress, visit, arg)
line at the bottom of the script.
if ((winver==1) and (dirToCompress[1]==":")):<br></br> os.chdir( dirToCompress[:3] ) # change to drive and root of dirToCompress<br></br> dirToCompress = dirToCompress[3:] # strip the 'driveletter:' from the left<br></br>
There are a few other problems with the script.
When it searches for a file extension ('string.find()'), it should do a case insensitive search. It currently will miss a file named 'MyChar.CR2'. I should also probably do a 'string.rfind()' so that it checks the end string.
GzipFile is storing the 'compressed filename' in the header. I would rather have the 'source filename' stored so that I don't have a filename conflict while extracting to the same location.
Also, my preference is to have the gzip header filepath start at my runtime directory, not from the root of the drive.
I have a version with all the above modifications. I just wrote it last night so I haven't tested it extensively. Let me know if you want me to post it.
Thread: Copying materials | Forum: Poser Python Scripting
This version now creates a visible instance variable for the application.
#MatCloneApp(Tkinter.Tk(), '').master.mainloop()<br></br>matcloneapp = MatCloneApp(Tkinter.Tk(), '')<br></br><br></br>matcloneapp.addpreset( 'v3 body skin', ('SkinTorso','SkinNeck','SkinArm','SkinHand') )<br></br>matcloneapp.addpreset( 'v3 skin head', ('SkinHead','SkinScalp') )<br></br><br></br>matcloneapp.master.mainloop()
Notice the new class method addpreset().
This has the added effect that you can run another python script (while this one is running) that looks like this.
# Posette Bits preset<br></br>try:<br></br> matcloneapp.addpreset( 'posette bits', ('nostril','lips') )<br></br>except:<br></br> pass<br></br># comment line, so we don't end the script on an indented line.
and this preset will be added to the preset listbox.
This seems pretty flexible.
Thread: Copying materials | Forum: Poser Python Scripting
oops, the presets has some extra open braces, here's the correct syntax.
presets = { 'All On' : (),<br></br> 'All Off' : (),<br></br> 'All Toggle' : (),<br></br> 'v3 body skin' : ('SkinTorso','SkinNeck','SkinHip','SkinFeet','SkinLeg','SkinArm','SkinHand'),<br></br> 'v3 skin head' : ('SkinHead','SkinScalp'),<br></br> 'posette bits' : ('nipple','lips')<br></br> }
Message edited on: 02/18/2005 10:42
Thread: Copying materials | Forum: Poser Python Scripting
We could easily make the number of lists and the number of elements in each list totally arbitrary. This would make it easy to let the user define and add a new preset based on what they have currently selected in the 'Destination' frame. I'll look into it when I get a chance. Here is a rough idea using a dictionary whose values are lists.
presets = { 'All On' : () ,<br></br> { 'All Off' : () ,<br></br> { 'All Toggle' : () ,<br></br> 'v3 body skin' : ('SkinTorso','SkinNeck','SkinHip','SkinFeet','SkinLeg','SkinArm','SkinHand') ,<br></br> 'v3 skin head' : ('SkinHead','SkinScalp'),<br></br> 'posette bits' : ('nipple','lips')<br></br> }
then to populate the list box widget,
for ps in presets.keys():<br></br> self.psetMAT.insert(Tkinter.END, ps)
then to process it, something like this
def handleset(self):
for thisPS in self.psetMAT.curselection():
if self.psetMAT.get(thisPS) == 'All On':
self.DstMAT.select_set(0, Tkinter.END)
elif self.psetMAT.get(thisPS) == 'All Off':
self.DstMAT.select_clear()
elif self.psetMAT.get(thisPS) == 'All Toggle':
for thisMATndx in range( self.DstMAT.size() ):
# Some toggle code for each thing
else:
for thisMATndx in range( self.DstMAT.size() ):
if self.DstMAT.get(thisMATndx) in presets[self.psetMAT.get(thisPS)]:
self.DstMAT.select_set(thisMATndx)
I'll check this idea when I get a chance later.
What do you think?
Thread: Copying materials | Forum: Poser Python Scripting
Works great.
(but I think you have a couple of typos in your 'prelist' list)
There is another bug in my code. We need to add
self.Update()
around line 347, right after del MatExtract
btw,
Is 11 slots for materials enough for the common/typical figures?
Thread: Copying materials | Forum: Poser Python Scripting
Save a copy of it with a '.txt' extension. Then post a message to this thread and use Attach File: -> Browse to select the '.txt' file. Then it will appear as a link in the new message.
Thread: Copying materials | Forum: Poser Python Scripting
Thread: Copying materials | Forum: Poser Python Scripting
I have no problems with you modifying/fixing the code (and please do). In fact the license at the top of the script gives you that right (just make a brief note in the comments with the date about your changes). I'll try to get you a fixed version before the weekend. There are a number of things I need to fix (the file name thing, retry with larger data chunk and probably some others). Also, I need to move my support classes inside the body of my App class and eliminate some other global pollution.
Thread: Copying materials | Forum: Poser Python Scripting
Bug: I bet that you were only processing the last 1MB of data (the default) and it didn't find the 'material'. I need to check whether the material was found and if not, prompt for a 'retry' letting the user pick a larger amount of data. Can you test again but select either 'Entire File' or a large number of megabytes? Also, check your 'temp' directory for any large .cr2 files that may have been left there when the script bombed. Suggestion/request: I figured that someone would ask for this. I'll think about a good solution. In the meantime, I'll try to make a special case for you. I work my day job on mon, tue and wend. I'll try to get to this on thursday (when the baby sleeps).
Thread: Copying materials | Forum: Poser Python Scripting
In truth is was more than just a couple hours. Most of the work for parsing the files was already done in a previous class I created. I'm not so good with Tk/Tcl so it takes me a while to do the user interface. Which by the way has a flaw in the file save. I force the extension to be .pz2 (after the file save as dialog), so be careful. It would be best if you specify the .pz2 in the dialog. I'll fix this (add a warning) after I get some feed back.
Thread: Copying materials | Forum: Poser Python Scripting
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: Socket communication with external apps | Forum: Poser Python Scripting