Skip to content

Simple Benchmark #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bseq/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .utils import show_message_box
import numpy as np
from mathutils import Matrix
import time
# this import is not useless
import additional_file_formats

Expand Down Expand Up @@ -233,6 +234,8 @@ def create_obj(fileseq, use_relative, root_path, transform_matrix=Matrix([[1, 0,
def update_obj(scene, depsgraph=None):

for obj in bpy.data.objects:
start_time = time.perf_counter()

if obj.BSEQ.init == False:
continue
if obj.BSEQ.enabled == False:
Expand Down Expand Up @@ -302,4 +305,6 @@ def update_obj(scene, depsgraph=None):
update_mesh(meshio_mesh, obj.data)

apply_transformation(meshio_mesh, obj, depsgraph)


end_time = time.perf_counter()
obj.BSEQ.last_benchmark = (end_time - start_time) * 1000
2 changes: 2 additions & 0 deletions bseq/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def draw(self, context):
col2.prop(obj.BSEQ, 'use_relative', text="")
col1.label(text='Pattern')
col2.prop(obj.BSEQ, 'pattern', text="")
col1.label(text='Last loading time (ms)')
col2.prop(obj.BSEQ, 'last_benchmark', text="")

# geometry nodes settings
layout.label(text="Geometry Nodes")
Expand Down
1 change: 1 addition & 0 deletions bseq/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class BSEQ_obj_property(bpy.types.PropertyGroup):
pattern: bpy.props.StringProperty()
frame: bpy.props.IntProperty()
start_end_frame: bpy.props.IntVectorProperty(name="Start and End Frames", size=2, default=(0, 0))
last_benchmark: bpy.props.FloatProperty(name="Last Loading Time")

# set this property for mesh, not object (maybe change later?)
class BSEQ_mesh_property(bpy.types.PropertyGroup):
Expand Down