Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
why? my answer to this question will make you laugh: i think this scaling thing could be an additional option to deal with shadow min bias. actually i am busy testing this idea with differing results. sometimes it seems to be easier to set the value right with a bigger universe, but i can't say for sure at the moment. might well be that i am wasting my time. accordingly, if you'd help me, you might well waste your time too:) success or failure, a script for that would be most welcome... ;)A.
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.
first of all, all this py-business is terra incognita for me... what i want to do - or rather, what i want to get done - is basically to scale EVERYTHING in a poser scene together, including lights and cameras. one more thing that might be important: most of my pz3's are multi-frame scenes, not exactly animations, it's variations of more or less the same content, just like a comic-book. (i have p6, but i do most things in p5) nruddock kindly gave me a script, which is doing a couple of strange things. with his kind permission i post it here to ask for your help: __________________________________________________________________ import poser, traceback # The main bit: scene = poser.Scene() figures = scene.Figures() actors = scene.Actors() try: scaleAmt = 10 if scaleAmt > 0.0: ng = poser.NewGeometry() dummy = scene.CreatePropFromGeom(ng, "Dummy") param = dummy.ParameterByCode(poser.kParmCodeASCALE) # All the Figures for eachFigure in figures: eachFigure.ParentActor().SetParent(dummy) # All the Non-Figure Actors (lights, camera, etc.) for eachActor in actors: doScale = (eachActor.IsProp() and not(eachActor.IsBase() or eachActor.IsDeformer() or eachActor.IsZone())) doScale = doScale or eachActor.IsLight() if (doScale): doParent = eachActor.Parent() != None doParent = doParent and (eachActor.Parent().Name() == "UNIVERSE") if (doParent): eachActor.SetParent(dummy) if param != None: param.SetValue(scaleAmt) scene.DrawAll() dummy.Delete() except: traceback.print_exc() __________________________________________________________________ the problems i've found are: - the script does not affect infinite lights. propably normal;) - spot lights are not scaled, only moved accordingly. strange, but no problem... - props parented to other props are completely ignored. - cameras are completely ignored. the weirdest thing is a bit hard to explain... - in a multi-frame scene, when a prop is not 'keyed' in all frames, it scales right in all keyframes, but freaks out in the other frames. figures don't seem to have this problem..... TIA A.