I'm creating some simple scripts to automatize my workflow. Things like:
import bpy
# import find_and_close_open_edges
def select_by_pattern(name="SovereignMace",part=None,number=None,partsep="_",numsep="."):
# Sql NVL
xstr = lambda s: s or "*"
# name = "Name_<part>[.partnumber]"
if name is None:
pattern = ""
elif part is None:
pattern = name
elif number is None:
pattern = name + partsep + part
else:
pattern = name + partsep + part + numsep + number
pattern = pattern + "*"
# pattern = xstr(name) + xstr(partsep) + \
# xstr(part) + xstr(numsep) + \
# xstr(number)
print("Pattern:",pattern)
# deselect all
bpy.ops.object.select_all(action='DESELECT')
# select all objects by pattern
bpy.ops.object.select_pattern(pattern=pattern)
return {'FINISHED'}
They grow in number, and they become to be dependent on each other. I use an external editor, so I seldom need to reload one or more script at once and the run them in Blender text editor by ALT-P. Is there a way to reload all scripts used in Blender text editor at once? (Mind I'm not asking how to do F8 reload... that's unrelated) Thank you
F8
to reload. Related: blender.stackexchange.com/questions/31126/… BTW: There is no reason to returnFINISHED
(if it's not an operator), have a look into the templates. $\endgroup$