Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
No Party Hardy! Actually, it comes from this dialog which I leave as an exercise for the reader to identify: Wait, I just remembered something important. Don't cross the streams. It would be bad. I'm fuzzy on this whole good / bad thing. Imagine all life as you know it stopping and every molecule in your body exploding outward at the speed of light. Okay, that's bad. Important safety tip. Thanks Egon.
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.
Found out last night that the actor.Geometry() call might throw an error if you try to use it on an actor that has no geometry associated with it. Was trying to loop over the actors in a figure and got an error message in the python window when it tried to get the geometry from the body. Need to wrap that call inside a try-except statement as so: try: tab geometry=actor.Geometry() except: tab # something to do if no geometry present You can see an example of this in the randomize and bulge figure scripts under the Geometry Mods button. For those of you not familiar with exception handlers you put the code that you want to execute, but which might throw an error, in the "try" block and in the "except" block put some code to handle the error condition. If the code inside the "try" block throws an error execution jumps to the "except" block.