Sat, Nov 30, 1:15 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 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: Deleting Morphs in Python


Dimension3D ( ) posted Mon, 19 May 2008 at 9:18 AM · edited Sat, 30 November 2024 at 12:04 PM

Is there any way to delete morph targets using a Poser Python script? Morphs can be deleted from the dial menu within Poser, but I can't find a method in Python for this.

I tried to zero the morphs (set all deltas to 0,0,0 using SetMorphTargetDelta), but this resulted in a mess, with many deltas still being non-zero and Poser crashing sometimes. It seems the only way would be writing a temporary remove pose that sets no deltas and applying that pose.


Dimension 3D - Poser Tools, Poser Props and Morphs, Cinema 4D Plugins, and more

Renderosity Store / D3D Web Site


Miss Nancy ( ) posted Mon, 19 May 2008 at 1:35 PM

There's a morph-zeroing script reference in this forum, but I don't recall whether anybody did
a morph-deletion script.  such an item would be valuable for OS X users (no Morph Manager
for OS X, although MartinC did write one for OS 9).

p.s. as you may know, few or no python scripts will work in any version of poser (OS X)
prior to 7.0, in case anybody wishes to test python scripts in poser 6 (OS X).



nruddock ( ) posted Mon, 19 May 2008 at 1:39 PM

Quote - It seems the only way would be writing a temporary remove pose that sets no deltas and applying that pose.

That's the only way I know of.


PhilC ( ) posted Mon, 19 May 2008 at 1:42 PM

The Poser Tool Box has morph deletion tools and will work on both PC and Mac, Poser 5 and later. You are correct in that there is no built in Python morph deletion method. I based my script on manipulating the CR2 file,


Dimension3D ( ) posted Mon, 19 May 2008 at 2:24 PM

I have written a script to create a FBM from existing morphs and want to include an option to delete the other morphs, mainly to reduce file size when saving the new morph. I think I will use the no deltas pose.

To manipulate the CR2, I use my external tools. I prefer C++ to Python, and Windows UI to Poser UI.


Dimension 3D - Poser Tools, Poser Props and Morphs, Cinema 4D Plugins, and more

Renderosity Store / D3D Web Site


dennisharoldsen ( ) posted Fri, 23 May 2008 at 8:12 AM

Dimension3D:

i think you can do what you want with svdl's RemoveMorphs.py. it removes all the extra delta information so that the scene file is much smaller. i believe it does it by creating a pose but i can't remember exactly. once the information is removed it cannot be reinserted according to svdl.

i would be interested in whatever you come up with because i would like to reduce the file size on scene files in my render library in a batch process and i couldn't arrive at that with svdl's code. i think there is a way but i have other priorities right now.


Dimension3D ( ) posted Fri, 23 May 2008 at 11:06 AM

I don't know the RemoveMorphs.py script, but I think it removes the morphs the same way I mentioned. Just found svdl's Spawn Character script, it does it that way. My own script will be similar, working on a single character, not a complete scene.

It should be possible to generalize the approach to a full scene and to batch process several files, simply by looping over figures in a scene, and by looping over a list of scene files.


Dimension 3D - Poser Tools, Poser Props and Morphs, Cinema 4D Plugins, and more

Renderosity Store / D3D Web Site


dennisharoldsen ( ) posted Fri, 23 May 2008 at 1:43 PM

Dimension3D:

i thought you might be talking about doing a similar thing to what svdl does with poses... i made a modification to his code to loop through the character and the clothes and remove everything in the scene at once. it did not work and i think i understand why. it saves the morph to a file and then reloads it, so i think the next iteration loads while the first is in progress.

i thought i might use a callback but i couldn't find anything that seemed appropriate. i am not concerned about speed since i have multiple computers that are not always busy. if all else fails, i can just put in a delay between iterations. that doesn't however satisfy the way i like to write programs.

i have a script that generates pz3's from a base character for up to 25 poses. it is very efficient but some of the figures are so huge that it burns up a lot of disk space and also when i batch render them, there is a noticeable price in load time.

i have been a windows programmer for many years in various languages (last job= C#) .  nothing i do requires all the horsepower of C++. i am doing lots of batch processing in python for poser processing but i am not fond of it or the lack of good documentation.
 


Dimension3D ( ) posted Fri, 23 May 2008 at 8:50 PM

Attached Link: Free Poser Python Scripts

Just uploaded the script to my web site, see link above.

My script does not export the new morph, just creates it in the figure. However, it uses a temporary pose to reset the other morphs, and I also had the problem that I could not delete it directly after calling LoadLibraryPose. I simply made some other steps in between.

BTW, I converted all my Poser Runtimes and scenes to use binary morphs, so I don't have to care about how many morphs are in a scene, they are not saved with the scene anyway.


Dimension 3D - Poser Tools, Poser Props and Morphs, Cinema 4D Plugins, and more

Renderosity Store / D3D Web Site


dennisharoldsen ( ) posted Sun, 25 May 2008 at 4:53 PM · edited Sun, 25 May 2008 at 4:54 PM

thanks for the information on using binary morphs. i guess you are talking about your program 'Binary Morph Converter'. if so, i then i will get it after the weekend. i really don't care about removing the empty morphs because my tests show that they don't slow down my process. i just don't like the large files.

i purchased 'Runtime Repair' some time ago and i was revisiting it. i have learned a lot since then and it does more than i was thinking. i didn't realize it converts/removes rsr's as i wasn't concerned about it then. i have been using P3DO.

my purpose is to create png clipart of individual characters and props. i am gearing up to have a major clipart factory. i currently am on my 2nd prototype library and have 8gb of png files with a variety of subject matter from 5000 base pz3's rendered in 14 rotations times 4 variations. obviously i have automated much of the process, coming directly from content.

i just built 2 new computers strictly for rendering and am trying to figure out how to combine them together to operate from a central library and building a queueing system. my renders are small and don't use the 2nd cores (amd64 3.2) much, so i am considering 2 virtual computers on each machine and 2 instances of poser. i have an unlimited copy of win2kpro and purchased 8 copies of poser6 when content paradise was selling them for $2. i have a lot of details still to work out....
 


Dimension3D ( ) posted Sun, 25 May 2008 at 5:13 PM

Yes, the tool to convert everything to binary morphs is Binary Morph Converter. First, convert your libraries, then you can convert the scenes to use the pmd files from the libraries. Also, makes content and scenes load much faster.


Dimension 3D - Poser Tools, Poser Props and Morphs, Cinema 4D Plugins, and more

Renderosity Store / D3D Web Site


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.