Forum: Poser Python Scripting


Subject: Apply material across all parts of an object

maur_2005 opened this issue on Sep 25, 2021 ยท 10 posts


FVerbaas posted Sun, 21 November 2021 at 3:02 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.