Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
A script for Poser 5 that checks a scene for bumpmap textures connected to the Gradient_Bump node, if they are .bum files leaves them there, if they are .jpg's connects them to the Bump node. Also an option to divide the original value by a value to be specified. This is necessary because the effect is much stronger in the Bump node (about 4 to 10 times depending on the bumpmap). Getting sick and tired of doing that manually after applying MAT poses. Would that be possible?
a script for Vic3 that automatically uninjects all unused morphs. example: you load v3, inject all head morphs and all body morphs. then get to work on a character. when you are finished, you may have only used a handful of the morph dials. you could then run a script that uninjects (or hides) all morph dials that have a value of 0 (ie are unused). then you could save the character with just the used morphs. don't know if its possible, but it would be handy.. and if you could write it before i buy vic3 at the end of the month that would be even better.... kidding... ;)
How about a python script (if one that I can't find doesn't already exist) to save all props in a nominated folder? Or to go one better - to "spawn props" from an object (usually an imported .OBJ in my case) and then delete it, and save all the props in a nominated folder? Using object name as the file name, obviously, and experting as .OBJ files...
My M2 Morphs Collection.cr2 is 90MBs. As I get into a .pz3 I get closer or farther from certain sets of MTs. A Python to delete the MTs I'm not using, all those at 0, would be useful. It it could provide the option to do any part individually an entire figure, or scene! I think it would make for a great timesaver. The process this would replace would be to Combine All Morphs, in Morph Manger, and then delete all others. I've asked the author of MM4, Mr. X, to add this to the application, a couple of times, but havn't heard back from him. We may still see it from the application, he's taken my ideas up before, allthough we may need to remind him some. Hey how come Ockham still is'nt in this thread? Admin. should entice him in here for sure. He is another community member that has donated much of his time to my theories. Thanks for all of the support, hopefully we can all make our character scenes transfer a bit faster this now.
If such is yet unavailable, or scarcely available, or barely obtainable, I may make an attempt at implementing solutions to the following reoccuring problems:
customized automatic figure(character/geom) recreation from "static", "character-specific" morphs, w/ retention of "dynamic", "actionable" morphs;
quick configurable smart-poly (lod) reduction;
reasonable partially-complete solution to unacceptable directory structure mishandling;
Any advice, suggestions, criticisms, sources, or other submissions may be welcome.
note: dehitch, freeware in java, which smart scans a given prop, character, hand, hair, etc., file, and returns an editable external reference list, is partially complete...(user options for portion which recursively searches and/or modifies external reference paths for dependant files, in selected directories are somewhat undef)
-sb
I just added 'Delete' to my big light panel script, which includes a selector list. It's in freestuff/utilities under "P5 and P4 Light Changer" or some such.
My python page
My ShareCG freebies
Maybe somebody should start a Wish List part 2 that would be easier to spot new entries.......
My python page
My ShareCG freebies
not only a wish > a dream The title: MIDI2poser I have sean some works between Python and MIDI protocol and one to send MIDI to blender. It' ll be a wpndrefull thing to convert MIDI information to poser parameter or data. Imagine move a potentioeter to move a part of a figure or also synchronise racvtion to a musical part.. I know well MID, a little poser and nothing in python developpemnt. may be anybody could wrtite this project... paupert@yahoo.com
While struggling with modelling body morphs for a piece of M3 clothing, I started thinking about how much easier it is to fit a garment on a character that is spawned with magnets since you apply the magnets to the garments and voila. I then started wondering if the process couldn't be reversed engineered so to speak. Could morphs which I believe are just vertice offset information be translated back into magnets which could then be saved and applied to the garments eliminating the need to model all these morphs into the garments?
Dominique Digital Cats Media
I am hoping to export Poses from within any particular Poses folder (make folder name optional/choosable from a menu of existing Pose folders, or a path name)) from in the Pose library, & export the Pose sequence as a bvh file. Perhaps with a couple frames in between each pose to avoid confusing Poser with too fast of changes.. Also using linear interpolation. The idea is to make the 10,000 or so cool poses available to other 3d animation programs, via the bvh format. regards, pack
Not sure if this is useful or in the right forum, but I have been experimenting and dicovered the following. If you apply the walk designer, and you get a spastic leg jerk in some frames, the way to fix this is as following: Turn on IK, set shin side to side to 0, then select thigh side to side and turn the dial, it doesn't matter how far you turn it, becuase the IK prevents it changing, and then turn off IK again. The spastic leg jerk is then gone. The problem is you have to do this fooevery frame in which the leg jerk or twitch happens. Is there an easier way to fix this, or has someone written a script to fix this.
My python page
My ShareCG freebies
I've done a little bit of C++ and Java programming, but I don't know much about Poser or Python yet. So I have a question... I've been thinking about a pseudo-crowd-generator script for Poser. I think I can imagine the logic, but I'm not sure that Poser would allow me to do such a thing. My basic idea is to place one character in a scene with a specific walk path. Then the script would copy the figure a preset number of times, randomly altering the scale of each within a certain range, and alter their xTran and zTran randomly to spread them around. It would also copy the walk paths with the same off-sets as the figures. What I'd like to do is have a collection of similar figures, like men in battle armor, running across the screen.
What do you think? Sound absolutely crazy!!??
If anyone has any thoughts I'd value your opinions before I begin trying to tackle something like this.
Thanks!
My python page
My ShareCG freebies
Attached Link: http://ockhamsbungalow.com/Python/ShadPercent.zip
I suspect this has been done before, but here's a quickie.My python page
My ShareCG freebies
I'd like a script that did all my work for me so I could just lay in the bed, drink beer, and watch reruns of reruns of Gillians Island on tv. But I would settle for a script that saved the settings of any/all magnets (include base and zone settings) in use on a figure as a Pose file (with all channel info, like scale settings, etc., stored.) So I did not have to keep hacking the pp2 files. :O]
How about a script that lays in your bed and drinks your beer while you do all the work? The magnet settings would run into an obstacle. Python can read the parameter dials (channels) of magnets, bases, and zones, but the settings like falloff graphs and "affected parts" are not available.
My python page
My ShareCG freebies
That script you mentioned, it already exists. It is called "The Wife" I can get away with saying that, being single. Now you know why I am single. Bummer on the mag script, but thanks for letting me know it is not doable. I can, alas, abandon hope and return to the merry art of hacking the files in a text editor. :O)
I had a wife like that at one time. Now you know why I'm single! Magnets and joints are two important areas where Poser just won't let Python do very much.
My python page
My ShareCG freebies
My python page
My ShareCG freebies
Basically an extension of the delete lights scripts we all know and love. I can get it to load a specific lightset by path/name, but I want to be asked for the name so I can choose without having to edit the script every time. (1) Delete all lights (2) prompt user for light file to load (3) load chosen light file The reason I load lights this way is because I have a ton of light files that Poser has munged up so that shadowcams are absent for some/all lights. Conversely, a Py script to process a directory of light files to repair the missing shadowcams would also be nice.
First idea is easy. Coming up in a few minutes. The repair of missing lights is impossible, unless you can identify exactly how the shadowcams are messed. If you can spot, say, three lines in the LT2 file that are always missing, then a mechanical edit might be possible, but I can't imagine how Python could do the detective work to find different kinds of errors!
My python page
My ShareCG freebies
Okay, for what it's worth, here it is. Take the attached text file and rename it to ReplaceLights.py, then see if it helps!
My python page
My ShareCG freebies
I'm not surprised that it doesn't work! It was worth a try, though.
My python page
My ShareCG freebies
Thank you Ockham, you're a real gem :) I wonder if perhaps taking advantage of the script-within-a-preset trick might work here? Save a blank light set that calls a light-creating Python script to do the actual placing of lights in the scene. No way for Poser to screw that up (fingers crossed). Connatic: Unfortunately, I need soft shadows. I agree with you about the shadowcams being unwieldy, but since I use them only when I need soft shadows, they don't really consume a lot of resources. I am actually glad that Poser's raytrace lights don't support soft shadows, because that would require a humongous amount of resources.
Is this possible? Maybe several scripts revolving about the same idea - to switch off/on the "Smooth Polygons" selector for the objects, not the single one in the render options. so, "Off/On" Global for every figure/prop in the scene, and maybe "Off/On" Individual for every part of the selected Figure/Prop. I generally use the RenderOption to smooth, but then I only want my Human Figures to be smoothed, so I must manually uncheck the box for each part of each figure and prop. This can lead to scores of repetitious scrolling/clicking. A total pain in the butt, as Poser by default checks this box.
Attached Link: http://ockhamsbungalow.com/Python/SmoothOnOff.zip
(We discussed this by email. I'm posting the result here for others.)My python page
My ShareCG freebies
@Ockham, just curious, having played around with your very cool group2morph script, I am wondering... Is it possible to have a python script that (1) either could match up the body groups in a figure with an ungrouped mesh - say a catsuit by getting the grouping tool to select polygons in the same general region on the mesh to a specific group. I.E. rCollar group on V2 to corresponding polygons on cat suit to make a rCollar group on Catsuit where known existed. Or (2) if that is not possible - which it probably is not - is it possible to have a script that would mirror my set up, say on the right side of a figure, i.e rCollar to lCollar, rThigh to lThigh, etc., so that if I used the grouping tool to make body groups on one side, it would duplicate these to the polygons on the other side? Yeah my techno jargon sucks, but hopefully you understand what I am asking.
The first is certainly possible but the results will be uneven. It would depend on how closely the source and target meshes match. If the catsuit is "sparse", the mechanical selection of nearest vertices will leave a lot to be desired. If the target is already somewhat similar to the source, it should work well. (I don't mean that the meshes are the same, just that they should have similar density.) The second is something I was already wishing for (sort of subliminally) every time I use the G2M tool. Thank you for putting it into words so I can make it work! But again it will depend on the quality of the mesh. If the mesh is not pretty nearly symmetrical, the mirror will be cracked!
My python page
My ShareCG freebies
Tweaking: Okay, that makes sense. Correcting a few is still easier than trying to find a thousand, in the red-black world of the grouping tool!
My python page
My ShareCG freebies
A script for P5 that automatically disconnects the bump maps from the gradient node and plugs then into the bump node - maybe with an entry field for changing the bump value or something that already changes the values to the approbiate bump value (ie 1 at gradient channel to 0.05 for the bump channel). It is a pain to do all of this manually in the material room.
Every
organisation rests upon a mountain of secrets ~ Julian
Assange
@Puntomaus You can do that using MatPoseEdit. ( http://koti.mbnet.fi/~ilaripih/MPEHome/ ) There is an option to convert P4 Mat Poses to P5 Mat Poses, even in batch mode. As far as I remember you can change the settings for the bump channel as well. Just remeber to back up your pz2 files ;-)
Yesterday's the past, tomorrow's the future, but today is a gift. That's why it's called the present.
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.
I second that :( it's still missing important parts even after sr2.1