When using repeated iterations, do not store first iteration
Also set minimum iterations to 2master
parent
ec45ebd2e2
commit
cf7ffa8d60
|
@ -4,7 +4,7 @@ from . import modifier_profiling
|
|||
bl_info = {
|
||||
"name": "Profiling Buddy",
|
||||
"author": "Simon Thommes, Samuel Bernou",
|
||||
"version": (0, 2),
|
||||
"version": (0, 3),
|
||||
"blender": (3, 5, 0),
|
||||
"location": "Properties > Modifier > Profiling Buddy",
|
||||
"description": "Adds panels to profile execution times.",
|
||||
|
|
|
@ -182,12 +182,16 @@ class PB_OT_evalulate(Operator):
|
|||
|
||||
## gather a list of all evaluated sessions
|
||||
for mod_eval in ob_eval.modifiers:
|
||||
if i == 0:
|
||||
tmp_dic[mod_eval.name] = []
|
||||
|
||||
t = mod_eval.execution_time
|
||||
# print(i, mod_eval.name, t)
|
||||
# wm['mod_timer'][mod_eval.name] = t # keep last evaluated time
|
||||
|
||||
if i == 0:
|
||||
# Initialize modifier dict time list
|
||||
tmp_dic[mod_eval.name] = []
|
||||
|
||||
## Do not store first iteration, often less precise timing
|
||||
continue
|
||||
|
||||
tmp_dic[mod_eval.name] += [t]
|
||||
|
||||
wm.progress_update(i)
|
||||
|
@ -213,7 +217,7 @@ class PB_OT_evalulate(Operator):
|
|||
|
||||
class PB_PG_modifiers_profiler(PropertyGroup):
|
||||
evaluation_live : bpy.props.BoolProperty(name='Live Mode', default=True)
|
||||
evaluations_count : bpy.props.IntProperty(name='Evaluations', default=5)
|
||||
evaluations_count : bpy.props.IntProperty(name='Evaluations', default=5, min=2)
|
||||
progress : bpy.props.IntProperty(name='Progress', default=-1)
|
||||
# subprogress : bpy.props.IntProperty(name='ModifierProgress', default=-1)
|
||||
# use_frame_set : bpy.props.BoolProperty(name='Set Frame At Each Iteration', default=True)
|
||||
|
|
Loading…
Reference in New Issue