Wed, Sep 18, 12:51 PM CDT

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

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: A script to archive "projects"?


PabloS ( ) posted Tue, 23 September 2003 at 7:29 PM · edited Mon, 29 July 2024 at 7:03 AM

Has anyone seen or developed a script that will: 1) identify all the files (and paths) associated with a pz3 (i.e., texture, geometry, etc.) AND 2) copy them all to a clean runtime (using a project's name for example) AND 3) rewrite the pz3 using the new project's path? Since I try to keep my harddrive relatively clean, I load and unload what I need. This utility would make it possible for me to quickly recover a project and all it's associated files if I ever want/need to rework it at a later time. Paul


ockham ( ) posted Wed, 24 September 2003 at 11:05 AM

Interesting idea. I've been using the same form of organization manually, because I keep my serious work by PZ3s. I'll see if the "extractor" script can be extended to do this. It would help you and me both! Would you want all the files in the same folder with the PZ3, or do you want a hierarchy like this...... XYZFolder --XYZ.PZ3 --XYZReflections ----[reflection maps] --XYZTextures ----[texture maps] --XYZBumps ----[bumpmaps] --XYZObjects ----[obj files]

My python page
My ShareCG freebies


PabloS ( ) posted Wed, 24 September 2003 at 12:44 PM

Thanks ockham! Good question. Either way would work as long as the rewritten pz3 points to the correct path. For simplicity, all files in the same folder would work but in the back of my mind I keep wondering if something that replicates the runtime scheme would be useful ... but can't for the life of me think when I might need that.


ockham ( ) posted Wed, 24 September 2003 at 1:00 PM

I'd rather have all files in one folder, too. So that's how I'll build it.

My python page
My ShareCG freebies


PabloS ( ) posted Wed, 24 September 2003 at 1:47 PM

That will rock!


Khai-J-Bach ( ) posted Thu, 25 September 2003 at 12:17 AM

oh! I was wondering about this a little while ago since I use Poser for exporting figures to trueSpace I need a similar function, so I can put the exported OBJ with textures used in one folder. could this be combined into the script as well? Kai



ockham ( ) posted Fri, 26 September 2003 at 12:53 PM

Do you mean just the OBJ itself plus all textures it uses? Do you need this to be pulled out of a CR2 or PZ3, or just start with the name of the OBJ?

My python page
My ShareCG freebies


ockham ( ) posted Fri, 26 September 2003 at 5:17 PM

Starting to think about this. It will be simpler if the source PZ3's are required to be somewhere inside the Runtime of the presently active Poser. Is that a reasonable restriction, or does it need to be looser?

My python page
My ShareCG freebies


PabloS ( ) posted Fri, 26 September 2003 at 5:23 PM

I could live with that.


Khai-J-Bach ( ) posted Fri, 26 September 2003 at 5:49 PM

for me, having all the textures with the OBJ would be ideal.. or even just being able to place all the textures in 1 folder then I just save the OBJ there would work lol the TSX (Luuv) relies on having the textures in the folder with the OBJ to seamlessly import the figure.. else it's the old hunt and repaint.. and the way that textures are listed / named / placed with poser.. it's a nightmare at times.



PabloS ( ) posted Fri, 26 September 2003 at 5:58 PM

Kai, Just wondering since I haven't used trueSpace. Are you exporting/importing a single obj from a pz3 or the entire contents of a scene? ockham, Will you be able to do this with P5's linked runtimes? I'm thinking that may have been part of the reason for your previous question. Paul


ockham ( ) posted Sat, 27 September 2003 at 1:15 AM

On the runtimes: After a bit of testing, I take back that restriction. I was thinking about portability and absolute filenames, but that's not a problem for PZ3. (I think it is a problem with texture references in CR2 and PP2, which is what was confusing me.) In a PZ3, texture files that reside in the same directory with the PZ3 can just be written as plain filenames, no folder or path needed. So a project folder that contains all necessary parts will be completely portable.

My python page
My ShareCG freebies


Khai-J-Bach ( ) posted Sat, 27 September 2003 at 11:30 AM

Pablos, it can be both depending on the project...



PabloS ( ) posted Mon, 29 September 2003 at 7:36 PM

How's it coming along ockham? Just thought I'd poke my head in here so you wouldn't think I didn't care any more. :-)


ockham ( ) posted Mon, 29 September 2003 at 10:50 PM

Don't worry; I want this one as well, so I'll definitely get it done! But it does help to know that you're still thinking about it.

My python page
My ShareCG freebies


PabloS ( ) posted Tue, 30 September 2003 at 7:18 PM

Thanks ockham! Having not done programming in a l-o-n-g while (visions of punch cards ... FORTRAN!) and haven't really studied Python, I don't have a good handle on just how difficult this might be ... but I can be patient.


ockham ( ) posted Wed, 01 October 2003 at 10:39 AM

Yes, I remember Fortran too! Handing in a batch of cards, waiting 3 days to find out that it doesn't work, debugging, waiting another 3 days, hoping my account will be able to pay for the CPU time.... That was no fun, and I gave up on programming until the PC came along. Lord, how things have changed. I'm in the middle of working on this, and bumped into a decision point related to OBJ files. An OBJ that was contained in the original prop or figure will be incorporated inline in the PZ3, so it will get carried over just by copying the PZ3. But with standard props and figures (Posette, Vicky, Mike) the OBJs are simply listed as external references. When the PZ3 is copied into its own folder, should it also make a copy of these monster files, or should we assume that the location written in the PZ3 is a reliable standard location? The former would guarantee that everything, standard or otherwise, will be found by the PZ3. The latter would save disk space. It would seem that there is a middle option, copying only non-standard OBJ files and assuming the standard ones can be found in their proper place. But that's not practical because there's no mechanical way to distinguish between the names of standard and custom files. DAZ and CL do use certain patterns in their names, but a custom OBJ could just as easily begin with "P4" or "blMil".

My python page
My ShareCG freebies


PabloS ( ) posted Wed, 01 October 2003 at 4:39 PM

ockham, I see your point. I originally envisioned copying all external reference objs to the "project" folder. In that way, I would never have to worry about it (and they compress well anyway). However, other users might not want to do that. How hard would it be to query the user as to whether they wanted to copy external objs (standard and/or non-standard) or leave 'em where they are?


ockham ( ) posted Wed, 01 October 2003 at 6:00 PM

Good idea. I'll make that a choice. For my own purposes I like everything neatly bundled up, same as your preference.

My python page
My ShareCG freebies


PabloS ( ) posted Wed, 01 October 2003 at 6:17 PM

"...I like everything neatly bundled up, same as your preference." Maybe it's an Oklahoma thing. :-)


PabloS ( ) posted Sun, 05 October 2003 at 10:51 PM

Hey ockham. How's this thing going? Was wondering if the query option gave this thing any trouble.


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.