Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 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.
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.
import osimport poserscene = 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 fileos.unlink( os.path.join( poser.TempLocation(), "tempmat.mt5") )
Locked Out
Keith posted at 2:18 PM Sat, 20 November 2021 - #4430724
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.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.
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.
FVerbaas posted at 3:02 PM Sun, 21 November 2021 - #4430737
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.Keith posted at 2:18 PM Sat, 20 November 2021 - #4430724
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.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.
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.
Locked Out
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.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.
๐ซ๐ฝ๐๐
(ใฃโโกโ)ใฃ
๐ฟย 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, Sonoma 14.6.1, 16GB, 500GB SSD
๐ฟย Nas 10TB
๐ฟย Poser 13 and soon 14ย โค๏ธ
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.
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.