Sat, Oct 5, 12:47 PM CDT

Renderosity Forums / The MarketPlace Wishing Well



Welcome to the The MarketPlace Wishing Well Forum

Forum Moderators: Staff

The MarketPlace Wishing Well F.A.Q (Last Updated: 2024 Sep 21 3:40 pm)

Have an idea for a MarketPlace product? Would you like to let the MarketPlace Merchants know?
This is the place!

Make sure you check The Product Showcase Forum and The Product Showcase Art Gallery.

 

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



Subject: Python Script to uncompress single files in Poser


Acadia ( ) posted Fri, 03 June 2005 at 7:48 AM · edited Sat, 05 October 2024 at 12:41 PM

Hi, the other day I found out I could compress my runtime folders (I use multiple ones) using Poser 5, in order to save hard drive space. A problem I've encountered that I don't like is that you have to target an entire runtime to compress or uncompress, even when you only want to uncompress ONE single .cr2 file. I wanted to run Dial Cleaner on my V3 .cr2 file, but because it was now a .crz file, Dial Cleaner can't read it. I was been told that Winzip could be used to unzip the files as needed, but I have Winzip and when I right click the file to unzip, there is NO unzip option... just various ones to zip it. I did a tedious work around by creating a separate runtime and placed the single file I wanted to uncompress in it and ran the Poser 5 uncompress file script, and then placed the uncompressed .cr2 file back in the original location. It would be extremely handy to be able to do all this compress and uncompress within Poser instead of having to rely on outside utilities for everything. Would it be possible for someone to write a script that addresses this issue and allows for single file compression/uncompression from within Poser itself?

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



nruddock ( ) posted Fri, 03 June 2005 at 12:51 PM

file_249430.jpg

Save attachment and rename to "uncompFile.py"

Run from the File menu or the Script palette.
If the file you pick doesn't have a recognised extension ".unc" will be added.

If you no longer want the original file, you'll need to delete it by hand.


nruddock ( ) posted Fri, 03 June 2005 at 12:52 PM

Save attachment and rename to "compFile.py"

Run from the File menu or the Script palette.
If the file you pick doesn't have a recognised extension ".gz" will be added.

If you no longer want the original file, you'll need to delete it by hand.


nruddock ( ) posted Fri, 03 June 2005 at 12:59 PM

Add extra entries to the suffixTable variable as required.

The uncompress script will probably only work sensibly on compressed files with one file in them (as produced by the compress script or created by Poser) and no directories (not tested but highly likely).


nruddock ( ) posted Fri, 03 June 2005 at 1:35 PM

file_249431.jpg

Seems like the file didn't attach to the Compress post so here it is.

Note to Mods : Didn't notice this was in the WishList forum, can it be moved to the Python Scripting forum ?


Acadia ( ) posted Fri, 03 June 2005 at 5:49 PM

I posted here because it's my "wish" to have a script to uncompress one single file instead of having to do the whole runtime. I'll check out those other links. Thank you.

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



markschum ( ) posted Sat, 04 June 2005 at 10:03 AM

I just load the figure to poser and save uncompressed. I have not found a way in python to implement a 'file picker' dialog so I waste more time getting the name correct. The other way is to move the file into c:temp and run the existing script.


PoseWorks ( ) posted Thu, 16 June 2005 at 2:39 PM · edited Thu, 16 June 2005 at 2:41 PM

Attached Link: http://www.pythonware.com/library/tkinter/introduction/x1164-data-entry.htm

Tkinter's file picker isn't a part of the normal Tkinter module. You'll have to import tkFileDialog in addition to Tkinter. Usage: import tkFileDialog texturePath = tkFileDialog.askopenfilename(initialdir="Runtime/Textures/", filetypes=[("PhotoShop","*.psd"),("Targa","*.tga"),("TIFF","*.tif"),("All Files","*.*")])

Message edited on: 06/16/2005 14:41


dorkati ( ) posted Tue, 21 June 2005 at 5:20 PM

Check Renderosity free stuff. If I remember well, there is a little program for this. It released some days ago. Especially for single files.


Acadia ( ) posted Tue, 21 June 2005 at 6:07 PM

Someone in Poser forum finally explained the use of Winzip in a manner that I understood. Currently the Winzip extension is .zip, but if you change that extension to .gz Winzip will unzip it. I'm really dense when it comes to learning new computer related stuff, and I still don't get how you access the above script to uncompress a single file within Poser. Changing a file extension and using Winzip is do-able for me and within my comfort zone too. I'm not at all comfortable with "scripts", frankly they scare me. Especially ones that are named after giant snakes :P

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



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.