Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Alas, not so. Poser 5 Python does not support the material room. You can have Python align the nodes by reading the mt5 text file, altering the node locations and writing them back to file. That's the best that P5 Python can do.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
how do i do that? (or is that just edit the values by hand?)
lost in the wilderness
Poser 13, Poser11, Win7Pro 64, now with 24GB ram
ooh! i guess i can add my new render(only) machine! Win11, I7, RTX 3060 12GB
The workaround is complicated. First, your Python script must open a .mt5 file for reading. Not too difficult, it's a plain text file. Second, your script must read in the file, line by line, examine the line for a node location, store the line in a data structure, and if it's a line designating a node location, mark it. When all the lines have been processed, you can calculate the new node positions, alter the lines in your data structure, and then write out the data structure to a (new) .mt5 file. And I'm not even sure whether P5 Python can load a material from the library... In short - quite a lot of work.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
thank you---not that i understand that either! i think i'll just try editing the nodes pos locations by hand.....arrgghhh
lost in the wilderness
Poser 13, Poser11, Win7Pro 64, now with 24GB ram
ooh! i guess i can add my new render(only) machine! Win11, I7, RTX 3060 12GB
Attached Link: http://www.stewreo.de/poser/
> Quote - Where did you DL the original script from?It was probably the script by stewer called "align_Nodes.py".
Link is to his Poser page, where you can download the script.
*"is there a P5 python script to align nodes?"
*The "fix materials node coordinates" Python script on the scripts page in my sigline tries to be a standalone which will do pretty much what svdl outlines. Not brilliant code, but perhaps it can help....
===========================sigline======================================================
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.
Cage had some freebies, compatible with Poser 11 and below. His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.
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.
is there a P5 python script to align nodes? i downloaded a P6 version but don't know how to modify it into P5 (if it can even be modified)
here's the P6 version i have:
import poser
def align(mat):
scene = poser.Scene()
tree = mat.ShaderTree()
root = tree.Node(0)
for node in tree.Nodes():
if (node == root):
continue
(x,y) = node.Location()
node.SetLocation((x-x%220)+11, y)
tree.UpdatePreview()
mats = poser.Scene().WacroMaterials()
if (mats == None):
poser.DialogSimple.MessageBox(
"Please select a material first.")
else:
for mat in mats:
align(mat)
Message edited on: 02/21/2006 09:34
lost in the wilderness
Poser 13, Poser11, Win7Pro 64, now with 24GB ram
ooh! i guess i can add my new render(only) machine! Win11, I7, RTX 3060 12GB
My Freebies