Thu, Sep 19, 6:35 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: Apply material across all parts of an object


maur_2005 ( ) posted Sat, 25 September 2021 at 10:19 PM ยท edited Tue, 10 September 2024 at 7:45 PM

Hi Folks, I need help with a script that when I load a material from the library the material is applied to each part (material zones) of the current figure. Does anyone have any ideas?
Thanks in advance.


adp001 ( ) posted Sun, 26 September 2021 at 1:57 AM
HartyBart ( ) posted Tue, 28 September 2021 at 8:44 PM

There are a number of scripts:

XS eXtended Shader Manager.

MATWriter Panel.

Transfer Material.

And I think SnarlyGribbly's EZMat can also do that, but I might be wrong? It can do most things like that.



Learn the Secrets of Poser 11 and Line-art Filters.


HartyBart ( ) posted Tue, 28 September 2021 at 8:46 PM

There was also LLAnime and LLToon, for giving your figures toon materials in a few clicks. They no longer work, but may do if you're still running an old copy of Poser.



Learn the Secrets of Poser 11 and Line-art Filters.


maur_2005 ( ) posted Wed, 13 October 2021 at 10:33 PM

Thank you both for your help, I was wondering if there is a way to apply a material in the same way you can apply a pose, but it seems that it is not possible.


structure ( ) posted Thu, 14 October 2021 at 1:20 AM ยท edited Mon, 25 October 2021 at 1:35 PM
Forum Coordinator
import os
import poser

scene = poser.Scene()
actor = scene.CurrentActor()
figure = scene.CurrentFigure()
# get the mat you want to copy
# you can use other methods to find the material you want.
material = scene.CurrentMaterial()

actor.SaveMaterialSet( os.path.join( poser.TempLocation(), "tempmat.mt5") )
if not actor.IsBodyPart():
    for material in actor.Materials():
        actor.LoadMaterialSet( os.path.join( poser.TempLocation(), "tempmat.mt5") )
else:
    for material in figure.Materials():
        actor.LoadMaterialSet( os.path.join( poser.TempLocation(), "tempmat.mt5") )
scene.DrawAll()
# cleanup
# delete temporary material file
os.unlink( os.path.join( poser.TempLocation(), "tempmat.mt5") )

Locked Out


Keith ( ) posted Sat, 20 November 2021 at 2:18 PM

Given that you can do this already in the material room by right clicking and choosing "Select All" and then right clicking again and hitting "Apply to all", I don't really see why you'd need a script.



FVerbaas ( ) posted Sun, 21 November 2021 at 3:02 PM ยท edited Sun, 21 November 2021 at 3:03 PM
Forum Coordinator

Keith posted at 2:18 PM Sat, 20 November 2021 - #4430724

Given that you can do this already in the material room by right clicking and choosing "Select All" and then right clicking again and hitting "Apply to all", I don't really see why you'd need a script.

That is general with any script. A script automates a series of GUI actions. A script like the above by itself indeed has little need, unless this is something you have to do 100 times.  The thing is you may need this code as a part of a more encompassing process in a bigger script. It is very annoying to have to stop, tell the user to do something, check if he did it correctly,  and so on. 

We generally share code snippets here 'wrapped' in a script so others can easily see what the snippet does and test it before merging it into the bigger process.  


structure ( ) posted Tue, 23 November 2021 at 7:15 AM
Forum Coordinator

FVerbaas posted at 3:02 PM Sun, 21 November 2021 - #4430737

Keith posted at 2:18 PM Sat, 20 November 2021 - #4430724

Given that you can do this already in the material room by right clicking and choosing "Select All" and then right clicking again and hitting "Apply to all", I don't really see why you'd need a script.

That is general with any script. A script automates a series of GUI actions. A script like the above by itself indeed has little need, unless this is something you have to do 100 times.  The thing is you may need this code as a part of a more encompassing process in a bigger script. It is very annoying to have to stop, tell the user to do something, check if he did it correctly,  and so on. 

We generally share code snippets here 'wrapped' in a script so others can easily see what the snippet does and test it before merging it into the bigger process.  

Also, It is not necessarily the script that someone needs but the understanding of how particular functions can be applied for use within the poser environment. BUT as FVerbaas states you might want to apply a black texture across a number of background figures to create silhouettes, want to do it your (the built -in poser) way? no problem, enjoy. For people with less time and / or patience however; this script will automate the process, thereby speeding it up exponentially and you can modify it to work only on the figures/props that you want to address. 

Locked Out


Y-Phil ( ) posted Wed, 29 December 2021 at 12:39 PM
Keith posted at 2:18 PM Sat, 20 November 2021 - #4430724

Given that you can do this already in the material room by right clicking and choosing "Select All" and then right clicking again and hitting "Apply to all", I don't really see why you'd need a script.

One day, I've stumbled upon a weird effect of the "Apply to all" menu entry: there was a prohibited link between two nodes in the pure firefly part. Using that menu entry led to overwrite the "Preview" material. As I was using the Superfly, I didn't even remarked, till the moment when Poser crashed.
And I had quite a hard time to find the source of the problem, as I never touch the Preview material... ๐Ÿ˜…
I'm going to add an adapted version of that script to my toolbox dialog ๐Ÿ˜

๐’ซ๐’ฝ๐“Ž๐“


(ใฃโ—”โ—กโ—”)ใฃ

๐Ÿ‘ฟย Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
๐Ÿ‘ฟย Mac Mini M2, 16GB, 500GB SSD
๐Ÿ‘ฟย Nas 10TB
๐Ÿ‘ฟย Poser 13 and soon 14ย โค๏ธ


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.