Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
Quote - You can either use ShaderTree.Nodes() which returns a list of all Nodes, or use ShaderTree.NumNodes() and ShaderTree.Node(i)
That was helpful, thank you so much for that, nRuddock. I read through the PoserPython Methods Manual prior to posting here, but was unable to ascertain what the parent of 'node' was (and there was no indication in the manual, either... or I missed it): so this really helped. It just indicated "Shader Node" but not what the parent was. Is there a hierarchy diagramme somwhere for this?
Also, perhaps something more simplified than PhilC's Python tutorial which, whilst an excellent tutorial for developing GUIs for Poser, leaves some massive holes in how to write basic stuff... I think it went a bit too quickly into GUI development.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
Page 348, example script ShaderMethods_01.py illustrates the method that nruddock is referring to.
The whole Shader Tree section is 13 pages long and in addition includes five more Shader Tree example scripts.
The output of the first script looks like the image below.
I'm sorry to hear that you felt that this constituted a massive hole.
Oops. My bad... and my apologies, Phil. I have looked over my copy - I did buy "Python for Poser 7" from your site! - but can't seem to find that page...
hmmmmmmmmmmmmmmmm what am I missing, here???
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
That is absolutely correct: I did get bogged down in the GUI section and failed to look any farther. I am having another look and read of your fine manual/tutorial. Please accept my unkind words as ignorant and uncalled for.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
Back to square 1:
I'm beginning to think the issue here is that I am not working in the native Poser Python environment. I am working in BagginsBill's Matmatic, which I think might need an 'import poser' statement or something to get some of the methods to work or something.
Regardless of what they might tell you, ignorance is not bliss...
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
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.
ShaderTree?
I'm wanting to put together a list of all the nodes without the preface PM: or PMC: and then position them (bit of a hack on BagginsBill's hackpos)... and I can't figure out how to do:
for node in ...
what? ShaderTree? What is node a member of? Or how would I reference whatever group the nodes were part of?
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]
Metaphor of Chooks