Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
It's easier to have Python save out the material as a temporary Poser .mt5 file, and then have it apply that mt5 to the second material. You can have Python delete the temporary mt5 file after you're done.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
Another way would be looking at the "Add Reflection" wacro source. It copies the Background shader tree, so it should give you an idea how to copy another shader tree.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
Attached Link: http://artcomp1.tripod.com
i'm no python scriptor though i wish i were but u can go to the top of the first block in the material editor and press select all then copy then go to a different object click on the top of the firdst bar in the first block and paste and all your nodes and everything will be copied there just identical to the first.Computer Art by Charles McChesney
Yep, but for characters like Victoria 3 and the likes, where there are tons of materials with the same settings (body, arms, hip, legs, etc, all with the same material) it can be a pain to modify one tree and then have to copy that to 7 different materials, only to modify it later and have to do it again.
Python can be very useful for this, I just made a script to copy one victoria 3 material tree to all the other correct materials with a single click, be it head, body.
I can share it with you if you want.
Yes, VSS does this. It uses the figure's current image maps but replaces the shader tree with your own design. You make any shader tree changes in one place, inside the VSS Utility Prop, then press a button to apply those changes to all relevant zones on your figure.
I think you would need to check that the material zone copy rules (in the VSS Utility Prop) were correct for V3's zone names, and then just replace bb's Template_Skin shader with yours, if you don't want to use the one he developed.
VSS uses the "save as an mc6/mcz file, then read it back in" method.
"If I were a shadow, I know I wouldn't like to be half of
what I should be."
Mr Otsuka, the old black tomcat in Kafka on the Shore (Haruki
Murakami)
dimension3d has got a "copy materials" script which will copy all channels and all nodes, and will also do some permutations on the above (OS X and XP/Vista), if desired. technically the copy/paste command in the materials room should be useful, but it ain't IMVHO. "copy materials" and "reset materials" scripts particularly useful for human skin and for doing the fall-off shaders for toon inking.
Attached Link: http://artcomp1.tripod.com
i see how these could be helpful.Computer Art by Charles McChesney
Yes Miss Nancy, thanks. Most of the time however I refuse to buy ANY python script or program related to poser because I love programing and its one of the things I enjoy the most.
I have a script to "Isolate" a figure or prop in the scene that I've been working on to be released as a freebie but I never have the time to give it a proper GUI. Someday...
I'll make a post about it and ask for some feedback when I have some free time. If there's isn't anything like that out there already that is.
Attached Link: http://artcomp1.tripod.com
i'm not nancy but i think poser scripting is cool and i'd love to do some.Computer Art by Charles McChesney
Attached Link: http://artcomp1.tripod.com
there's a lot i want to do and i don't have time for it all. i've been there and done some of that. some other things that i've done that are along these same lines that u would probably think are fun are writing povray code. writing gimp script-fu. there are even ways u can create script-fu plugins for gimp with python. i think about getting that philc pyhon deal where he shows u how he made his python scripts. if moray gets back going u might want to write luna scripts for it. cooler yet learn build wings 3d plugins with erlang. maybe one day but now i'm trying to focus on animtion. creating bvh files with poser and raw data from the melan institute. becoming more proficient at building animations in povray (poser has some great tools), becoming more proficient with anime studio, virtual dub, radvideo, movie maker, gimp gap, audacity, speech synthesis, character formation, and morphing, using philc s bvh poser python scripts, using renderstudio python scripts for lighting, building animations in daz, bryce, daz and bryce togetherto make animations, etc. somewhere down the road there i'm going t get to poser python scripting or die first. i'm betting on the die first.Computer Art by Charles McChesney
Heh, that kind of sounds like me you know, I know python quite well, animation however is an unknown world of me. Trying to learn so many things at once makes you leave some stuff aside, for me its video/audio editing, now getting into hobbiest comics and mostly programing, game programing, scripting, php, mysql, c/c++, etc etc.
Too much stuff, so little time, 24 hours a day is not enough =P
Attached Link: http://artcomp1.tripod.com
i hear u and i must admit i'm kind of jealous. believe me i've got a big pull in that direction myself. when i get a big bad urge to write code i'll do something with povray. u might try doing that yourself just as a curiosity. try saving a poser file. converting it to povray with poseray and then try to fix the povray code so that you get something decent by rewriting the povray code so that your picture will at first render anything and the render a decent picture . and then as an even more fun exercixe rewrite the code that you've made so that it animates. ah there i am back to animation. something more practical and perhaps even profitable might be writing a python script that writes a tif or png to a transparent plane that can then be moved around easily in your scene with more python scripting that would keep it upright and parrallel to the x axis or maybe just parrallel to the main camera. at your discretion it would or wouldn't leave shadows. this would be particularly useful in creating text with other programs (could even be 3d text with shading.) lots of free programs do this. i do this in post editing with gimp and make it look fancy and even looks like i did it within poser. it's hard though and takes lot of fancy 2d layer work, but it's probaly easier than importing 3d text made with another 3d program into poser then posing it and then texturing it and all that. would be a chore, but by just laying some transparent lettering already textured on to a transparent screen that was limited so that it had to keep facing the main camera. instant layering. and it would probably be easy to script and it could be very useful.Computer Art by Charles McChesney
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, I'm trying to copy an entire shader tree of a material to paste it on another material, do I have to manually set every node and inputs?
Here's part of the code I'm trying:
for mat in currentFigure.Materials():
if mat.Name() in matsToCopy:
print mat.Name()
# Delete current nodes
for node in mat.ShaderTree().Nodes():
if node.Name() <> poser.kNodeTypeCodePOSERSURFACE:
mat.ShaderTree().DeleteNode(node)
# Copy nodes from selected mats
for node in cShaderTree.Nodes():
if node.Name() <> poser.kNodeTypeCodePOSERSURFACE:
new_node = mat.ShaderTree().CreateNode( node.Type() )
new_node = node
But of course that only copies the name, things like texture maps, inputs and such wont get copied, any idea?