Thu, Nov 21, 8:00 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: Saving a Material Set


Snarlygribbly ( ) posted Fri, 10 August 2012 at 5:45 AM · edited Fri, 08 November 2024 at 11:58 AM

I'd like to save the current material as a Material Set ('.mt5') to a location of my choice, with an associated png thumbnail.

I see poser.Scene().CurrentMaterial().SaveMaterialSet('name') will save an .mt5 file, but without a png thumbnail and without allowing me to choose where ...

Any help would be most appreciated.
Thank you.

Free stuff @ https://poser.cobrablade.net/


PhilC ( ) posted Fri, 10 August 2012 at 6:11 AM

'name' should be the full path to where you want the material saved to.

I think you'll find that it will save a PNG file along with it. At least it did for me.

import poser
import os
poserDir = os.path.split(poser.AppLocation())[0]
matFilePath = os.path.join(poserDir,"test.mt5")
poser.Scene().CurrentMaterial().SaveMaterialSet(matFilePath)


Snarlygribbly ( ) posted Fri, 10 August 2012 at 6:20 AM

Ha ha! That simple!

Thanks so much Phil - I was wildly overthinking it :-D

It all works for me too now: you're a star.

Free stuff @ https://poser.cobrablade.net/


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.