File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change 19
19
from . import panels
20
20
from . import export_indicators # Still needed for timer and recent list
21
21
22
+
22
23
# Registration
23
24
classes = (
24
25
* operators .classes ,
25
26
* panels .classes ,
26
27
# export_indicators registers its own classes/timer
27
28
)
28
29
30
+
29
31
def register ():
30
- # First register export indicators (including the timer)
31
- from . import export_indicators
32
- export_indicators .register ()
32
+ # First register properties
33
+ properties .register_properties ()
34
+
35
+ # Then register our classes
36
+ for cls in classes :
37
+ bpy .utils .register_class (cls )
33
38
34
- # Then register operators which may use the timer
35
- from . import operators
36
- operators .register ()
39
+ # Finally register export indicators (including the timer)
40
+ export_indicators .register ()
37
41
38
42
def unregister ():
39
- export_indicators .unregister () # Unregister timer first
43
+ # First unregister export indicators (handles its own classes)
44
+ export_indicators .unregister ()
45
+
46
+ # Then unregister our other classes
40
47
for cls in reversed (classes ):
41
- bpy .utils .unregister_class (cls )
48
+ try :
49
+ bpy .utils .unregister_class (cls )
50
+ except RuntimeError as e :
51
+ print (f"Couldn't unregister { cls } : { e } " )
52
+
53
+ # Finally unregister properties
42
54
properties .unregister_properties ()
43
55
44
56
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments