Fri, Jan 3, 12:16 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

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: Can someone write me a script... Java, python... something?


Conniekat8 ( ) posted Fri, 13 March 2009 at 3:10 PM · edited Thu, 02 January 2025 at 4:50 PM

I need a script of some sort that I can run in Windows, or DOS, independent of any other apps.
It needs to import UV Mapping and grouping from a base OBJ file into a morphed OBJ file. It needs to be able to do it for a whole list (directory) of files.
For example, 100 morphs, one base file.
Doesn't need a fancy interface. I gather this is pretty simple thing for someone whom knows how to program.

50 Bucks paid via paypal or a gift cert On Rendo or DAZ - your choice, plus, three of my products, current or save for future releases.

Hi, my namez: "NO, Bad Kitteh, NO!"  Whaz yurs?
BadKittehCo Store  BadKittehCo Freebies and product support


nruddock ( ) posted Fri, 13 March 2009 at 5:25 PM

Just so things are clear, what you want is a script to do the equivalent of UVMapper's import UVs function i.e. restore the grouping so that you can make morphs (as per -> http://www.renderosity.com/mod/forumpro/showthread.php?thread_id=2759444) ?
The easiest two languages to do this would be PERL or Python, but you'd need to install the standalone interpreters to use them from the command line (however a Python script could use Poser's built-in interpreter, but would need a simple GUI to collect arguments).

The other important thing is what location and naming convention do you want for the output files ?
Choices are :-

  1. Add some suffix to the name, e.g. "-morph" in the same directory as the original
  2. Put output files in a new subdirectory either in the original directory, or a new one at the same level but named appropriately, and with or without a suffix on the output files.


svdl ( ) posted Fri, 13 March 2009 at 6:05 PM

Hmm.

I'm a bit rusty when it comes to PoserPython, but it is probably the easiest way.
Procedure:

  • specify the base OBJ using a dialog box;;
  • specify the morphed OBJ folder using a dialog box;
  • for each OBJ file in the directory containing the morphed OBJs
           - import the base object into Poser using code; no scaling.
           - load the OBJ as morph onto the base object;
           - set the dial value to 1.000
           - export the morphed OBJ from Poser, including grouping
           - delete the morphed OBJ from the scene
  • notify completion.
          

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


nruddock ( ) posted Fri, 13 March 2009 at 6:31 PM

That looks right, although I think there are advantages to taking a text processing approach to the problem.


markschum ( ) posted Fri, 13 March 2009 at 10:43 PM

The morphed object is identical to a master object except for vertex positions ? 

so you could just replace the master obj vertex entries with the morphed object vertex entries ?

Poser python can certainly handle that , and the dialogs in poser 7 would make it fairly easy to get the original folder name .


markschum ( ) posted Wed, 18 March 2009 at 11:24 AM

Has anyone done this request ? 


nruddock ( ) posted Wed, 18 March 2009 at 3:19 PM

Quote - Has anyone done this request ?

Not yet.


PhilC ( ) posted Wed, 18 March 2009 at 3:44 PM · edited Wed, 18 March 2009 at 3:45 PM

I do not often read the forum front page but just saw this post bumped to the top.

Conniekat8 emailed me directly, probably at the same time as making the post.
I emailed a script back later the same evening.

Yes it is just basic text manipulation, swapping out the vertices lines from the morphed OBJ back to the original.


markschum ( ) posted Wed, 18 March 2009 at 4:20 PM

ok, thanks , I just wanted to check before I started on it .


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.