HartyBart opened this issue on Jul 19, 2020 · 6 posts
HartyBart posted Sun, 19 July 2020 at 7:38 PM
In PoserPython, is there any universal 'stop this script here, progress no further' command?
For instance:
actor = scene.CurrentActor()
# If no light is currently selected in the scene, then display this message and stop the script.
if not actor.IsLight():
poser.DialogSimple.MessageBox("To run this script, please first select a light.")
>>> STOP HERE! <<
else:
if actor.IsLight():
# OK, we have a light selected, so continue running the script.
lights = scene.Lights()
for light in lights:
What needs to go on the line >>> STOP HERE! << to cause the script to exit gracefully? I see "Return" used in other scripts, but that fails to prevent the script from continuing to run.
Learn the Secrets of Poser 11 and Line-art Filters.