amacord opened this issue on Jan 04, 2007 ยท 5 posts
amacord posted Thu, 04 January 2007 at 10:53 PM
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.