add debug timing
This commit is contained in:
parent
85ed21ef22
commit
8a63014d58
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@ import mathutils
|
||||||
import queue
|
import queue
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
|
# import time # for debugging performance
|
||||||
|
|
||||||
# then import dependencies for our addon
|
# then import dependencies for our addon
|
||||||
if "Font" in locals():
|
if "Font" in locals():
|
||||||
|
@ -490,6 +491,7 @@ def ShowMessageBox(title = "Message Box", icon = 'INFO', message=""):
|
||||||
bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)
|
bpy.context.window_manager.popup_menu(draw, title = title, icon = icon)
|
||||||
|
|
||||||
def set_text_on_curve(text_properties):
|
def set_text_on_curve(text_properties):
|
||||||
|
# starttime = time.perf_counter_ns()
|
||||||
mom = text_properties.text_object
|
mom = text_properties.text_object
|
||||||
if mom.type != "CURVE":
|
if mom.type != "CURVE":
|
||||||
return False
|
return False
|
||||||
|
@ -622,4 +624,7 @@ def set_text_on_curve(text_properties):
|
||||||
bpy.context.view_layer.objects.active = mom
|
bpy.context.view_layer.objects.active = mom
|
||||||
bpy.ops.object.parent_set(type='OBJECT')
|
bpy.ops.object.parent_set(type='OBJECT')
|
||||||
|
|
||||||
|
# endtime = time.perf_counter_ns()
|
||||||
|
# elapsedtime = endtime - starttime
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue