diff options
-rw-r--r-- | archipack/archipack_thumbs.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/archipack/archipack_thumbs.py b/archipack/archipack_thumbs.py index 5b14e91b..57f1804a 100644 --- a/archipack/archipack_thumbs.py +++ b/archipack/archipack_thumbs.py @@ -171,13 +171,14 @@ def generateThumb(context, cls, preset): log("### COMPLETED ############################") -preset = "" +if __name__ == "__main__": + preset = "" -for arg in sys.argv: - if arg.startswith("cls:"): - cls = arg[4:] - if arg.startswith("preset:"): - preset = arg[7:] + for arg in sys.argv: + if arg.startswith("cls:"): + cls = arg[4:] + if arg.startswith("preset:"): + preset = arg[7:] -generateThumb(bpy.context, cls, preset) + generateThumb(bpy.context, cls, preset) |