forked from DB3D/Plugin-Profiler
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproperty.py
96 lines (75 loc) · 2.95 KB
/
property.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import bpy
import os
class PLUGINPROFILER_PR_exectracker_modules_ignore(bpy.types.PropertyGroup):
name : bpy.props.StringProperty()
class PLUGINPROFILER_PR_exectracker_modules_only(bpy.types.PropertyGroup):
name : bpy.props.StringProperty()
class PLUGINPROFILER_PR_exectracker_functions_ignore(bpy.types.PropertyGroup):
name : bpy.props.StringProperty()
class PLUGINPROFILER_PR_exectracker_functions_only(bpy.types.PropertyGroup):
name : bpy.props.StringProperty()
class PLUGINPROFILER_AddonPref(bpy.types.AddonPreferences):
"""prefs = bpy.context.preferences.addons["Plugin-Profiler"].preferences"""
bl_idname = "Plugin-Profiler"
exectracker_module_path : bpy.props.StringProperty(
subtype="DIR_PATH",
default=os.path.join(bpy.utils.resource_path("USER"),"scripts","addons"),
)
exectracker_modules_ignore : bpy.props.CollectionProperty(
type=PLUGINPROFILER_PR_exectracker_modules_ignore,
)
exectracker_modules_ignore_idx : bpy.props.IntProperty(
default=0,
)
exectracker_modules_only : bpy.props.CollectionProperty(
type=PLUGINPROFILER_PR_exectracker_modules_only,
)
exectracker_modules_only_idx : bpy.props.IntProperty(
default=0,
)
exectracker_functions_ignore : bpy.props.CollectionProperty(
type=PLUGINPROFILER_PR_exectracker_functions_ignore,
)
exectracker_functions_ignore_idx : bpy.props.IntProperty(
default=0,
)
exectracker_functions_ignore_proxy : bpy.props.BoolProperty(
default=False,
)
exectracker_functions_only : bpy.props.CollectionProperty(
type=PLUGINPROFILER_PR_exectracker_functions_only,
)
exectracker_functions_only_idx : bpy.props.IntProperty(
default=0,
)
exectracker_functions_only_proxy : bpy.props.BoolProperty(
default=False,
)
exectracker_print_funcname : bpy.props.BoolProperty(
default=True,
)
exectracker_print_funcdepth : bpy.props.IntProperty(
default=2,
min=0,
soft_max=7,
)
exectracker_print_sourcepath : bpy.props.BoolProperty(
default=False,
)
exectracker_print_datetime : bpy.props.BoolProperty(
default=False,
)
exectracker_print_functime : bpy.props.BoolProperty(
default=True,
)
exectracker_ignore_listcomp : bpy.props.BoolProperty(
default=True,
)
trackerpreset_name : bpy.props.StringProperty()
def draw(self,context):
from . interface import draw_interface
draw_interface(self.layout)
class PLUGINPROFILER_PR_Window(bpy.types.PropertyGroup):
"""bpy.context.window_manager.plugin_profiler"""
ui_bool_exectracker : bpy.props.BoolProperty(default=True)
ui_bool_benchmarker : bpy.props.BoolProperty(default=True)