Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 11 12:18 am)
Hmm. I haven't bothered to get SR3. Maybe I should DL it to check this. SR3 supposedly changed some parts of Python for the first time in P5. Just to be sure we're talking about the same thing, are you using the version of the script with file date 11/02/02?
My python page
My ShareCG freebies
file date: 1/14/2003 i opened it up in a text editor and here is what it says: #----------------------------------------------------------------------------- # Delete all lights. #----------------------------------------------------------------------------- import poser #----------------------------------------------------------------------------- scene = poser.Scene() scene.SetFrame(0) #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # Run a loop across frames. # At each frame, delete any lights. #----------------------------------------------------------------------------- for OneLight in scene.Lights(): scene.SelectActor(OneLight) scene.DeleteCurrentProp() # Wipe it. # That's all, folks! #-----------------------------------------------------------------------------
I sent this in as a bug when SR3 first was released..requested by CL after I posted a comment earlier..you should go to their site and send this in as well so they know its happening to more than just one person.
Humankind has not
woven the web of life. We are but one thread within it.
Whatever we do to the web, we do to ourselves. All things are bound
together.
All things connect......Chief Seattle,
1854
Okay, the script itself is unchanged. I just DL'd the new SR3 and tried it; the script takes -significantly- longer than usual (like 2 seconds per light) but I didn't have a disaster. The delay could indicate that something strange is going on, because this script acts instantly in P4. I'll keep watching this. Right now I'm in the middle of a scramble toward deadline on current paid project, so I'm not in Rosity as often as usual.
My python page
My ShareCG freebies
Attached Link: http://ockhamsbungalow.com/Python/DeleteLightsP5.zip
Found the problem. Essentially, P5 replaced the DeleteProp command with a Delete command that acts differently. But until this SR, the older version would still work. It appears that SR3 stopped maintaining the compatibility. I rewrote the script to use the P5 style, and this seems to behave more normally; acts instantly. Give it a try and see if it works properly for you. Note that this version is ONLY for P5, any SR, and will not work in P4.My python page
My ShareCG freebies
Consider this to be a temporary fix. If it works for you, I'll rig up a way to use the same script for both versions; internally check the Poser version and use the proper action for each.
My python page
My ShareCG freebies
It works perfectly :-) Wow...thanks for the quick response, and fix! Honestly, i don't know what i would do without your script! I have a tendancy to play with a lot of lights, scrap it and start over, so this has come in handy more often than any other freebie i have ever downloaded! thanks! Brooke
Thanks to both of you for nice acknowledgements. Since it looks like SR3 is breaking compatibility, I'll have to sift through my available scripts to see how many are affected by this. Likely some others besides this one.
My python page
My ShareCG freebies
If you're having similar problems in P4, it's a different matter. There has always been something slightly flaky about the Delete action when taken through Python. Deleting "solid" things sometimes leads to crashes. (Seems to be one of those memory-leak issues that varies strongly with the computer system and the orbit of Pluto.) I hadn't seen the flakiness with lights, though; this script -seemed- to be problem-free until this compatibility change.
My python page
My ShareCG freebies
Ockham - why do you iterate over all frames and all actors? A delete lights script doesn't need to be more than just import poser scene = poser.Scene() if (poser.Version() != "4.2"): ~for light in scene.Lights(): ~~light.Delete() else: ~for light in scene.Lights(): ~~scene.SelectActor(light) ~~scene.DeleteCurrentProp()
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.
Every time i run this python script, it sets all my dial settings, pose, everything back to 0. Its pretty frustrating...what am i doing wrong? --I'm using P5-- I add the script to a button, that's easy enough, then i click, it deletes all the lights...then the screen flashes white and when it comes back...POOF...all my work is gone. I have all the updates - figures, Sr3, vicki updates, etc. This happened most recently with V3, morphed and posed against a wall. I wanted to delete all the lights and aim 3 lights at her to create a cool shadow effect...