Tue, Nov 12, 6:26 AM 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: Wacro: Reconnect bump map to "Gradient_Bump"


nruddock ( ) posted Fri, 21 October 2005 at 5:07 PM ยท edited Tue, 12 November 2024 at 6:20 AM

file_298404.txt

A Wacro to reconnect a bump map to the "Gradient Bump" input.

Looks for an Image_Map node named "Bump" (as created by Poser when reading legacy MAT poses) and connects it to the "Gradient_Bump" input.
Will only connect the node so named if the "Gradient_Bump" and "Bump" inputs on the "Poser_Surface" are both unconnected.

Assign to a Wacro button to get multi-material action with Shift-Click.
Run from the File menu or Script Palette to alter all materials for currently selected figure.

Use my earlier Wacros to move the connection to the "Bump" or "Displacement" inputs if required.


nruddock ( ) posted Fri, 21 October 2005 at 5:22 PM

I had hoped to be able to make a choice between which of the two inputs to connect to based on the texture's extension, but there was a problem getting the filename when the extension is ".bum" (hard abort in script, untrappable, may be fixed in SR1, I won't know until I check on another machine).


kirisute ( ) posted Mon, 24 October 2005 at 3:02 AM

wow! you worked fast on this! from what you have written...does it only look for .BUM files to transfer across? or will it just check for a relevant unplugged texture? that should be in the gradient node? thanks for your hard work


kirisute ( ) posted Mon, 24 October 2005 at 11:10 AM

ok done a bit of testing....on Poser 6 sr1 the script appears to be working ok...however it will only connect the material that you have selected.....ie skintorso.... it doesnt seem to connect all the bump maps for the figure...ive tried running it with "shift click" as a wacro..and also as a standard python button....any ideas? or have i been really stupid and not done something?


nruddock ( ) posted Mon, 24 October 2005 at 1:11 PM

The script will print the name of each material as it visits the nodes.

Shift-clicking will only work if assigned to a Wacro button.

Otherwise when run from the File menu or the Script Palette, it should go through all the materials on the selected figure.

I'll have to check using P6SR1 to see if I can reproduce the problem.
Can you attach an MC6 for the figure that your having trouble with ?


kirisute ( ) posted Mon, 24 October 2005 at 1:44 PM

im sure i could if i knew what one was! LOL! maybe im not being patient enough?? how quickly will it go through the model material zones? mega fast or maybe 30 seconds each one?


nruddock ( ) posted Mon, 24 October 2005 at 2:29 PM

It doesn't take long, though the number of nodes it has to look at will affect the time taken, there'd have to be a lot for it to take more than a few seconds.
What do you see in the Python console window when running from the File menu ?

To make an MC6, goto the Material room and click on the "+" button at the bottom of the Library palette. You'll be asked to select either a "Single Material" or a "Material Collection", choose a collection.
To attach an MC6 to a post you'll have to change the extension to ".txt" (alternatively tell me what figure and texture set your using, as I may have them).


kirisute ( ) posted Mon, 24 October 2005 at 4:04 PM

Attached Link: http://www.forgefires.co.uk/d3test1.txt

ok i see the text window appear..but it only lists the name of the material section i have selected before applying the wacro...ie: skintorso.... even if i wait maybe 5 mins that nev er changes..and the screen does not dissapear until i close it.... it attaches the map correctly...but only for the chosen material zone... ive tried all 3 methods of running the script...wacro, python window and run a python script and each time i get the same result.... using your previous wacro...bump transfer. i can happily shift click and it work superly...so i dont think its a problem with my poser install or python scripting etc.... anyway...ive uploaded the mc6 file as requested...its just a test with David and Daz's hi res textures for him...tried with both the p4 and the p5 MAT files.... thanks for this


nruddock ( ) posted Mon, 24 October 2005 at 5:15 PM

file_298405.txt

Try this one, it uses a different method to work out what materials to work on (the same as the other two Wacros).


kirisute ( ) posted Mon, 31 October 2005 at 3:22 AM

works to perfection! you are a god amongst us mere mortals! LOL thank you so much! if i can help you out anytime in the future let me know cheers again


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.