11"""This is the MakeHuman Plugin For Blender (MPFB). For more information, see
22the README.md file in the zip."""
33
4- bl_info = { # pylint: disable=C0103
4+ bl_info = { # pylint: disable=C0103
55 "name" : "mpfb" ,
66 "author" : "Joel Palmius" ,
7- "version" : (2 , 0 , 4 ),
7+ "version" : (2 , 0 , 5 ),
88 "blender" : (4 , 1 , 0 ),
9- "warning" : "Plugin is in Alpha stage" ,
109 "location" : "View3D > Properties > MPFB" ,
1110 "description" : "MakeHuman Plugin For Blender" ,
1211 "doc_url" : "http://static.makehumancommunity.org/mpfb.html" ,
3736
3837_OLD_EXCEPTHOOK = None
3938
39+
4040def log_crash (type , value , tb ):
4141 global _OLD_EXCEPTHOOK
4242 stacktrace = "\n "
@@ -46,6 +46,7 @@ def log_crash(type, value, tb):
4646 if _OLD_EXCEPTHOOK :
4747 _OLD_EXCEPTHOOK (type , value , tb )
4848
49+
4950def get_preference (name ):
5051 _LOG .enter ()
5152 if "mpfb" in bpy .context .preferences .addons :
@@ -66,8 +67,10 @@ def get_preference(name):
6667 _LOG .crash ("The 'mpfb' addon does not exist!?" )
6768 raise ValueError ("I don't seem to exist" )
6869
70+
6971ClassManager = None
7072
73+
7174def register ():
7275 """At this point blender is ready enough for it to make sense to
7376 start initializing python singletons"""
@@ -79,8 +82,8 @@ def register():
7982 except :
8083 print ("WARNING: Could not register preferences class. Maybe it was registered by an earlier version of MPFB?" )
8184
82- global _LOG # pylint: disable=W0603
83- global _OLD_EXCEPTHOOK # pylint: disable=W0603
85+ global _LOG # pylint: disable=W0603
86+ global _OLD_EXCEPTHOOK # pylint: disable=W0603
8487
8588 from mpfb .services .logservice import LogService
8689 _LOG = LogService .get_logger ("mpfb.init" )
@@ -103,7 +106,7 @@ def register():
103106 ClassManager = _ClassManager
104107
105108 if not ClassManager .isinitialized ():
106- classmanager = ClassManager () # pylint: disable=W0612
109+ classmanager = ClassManager () # pylint: disable=W0612
107110
108111 _LOG .debug ("About to import mpfb.services" )
109112 import mpfb .services .locationservice
@@ -147,7 +150,7 @@ def register():
147150def unregister ():
148151 """Deconstruct all loaded blenderish classes"""
149152
150- global _LOG # pylint: disable=W0603
153+ global _LOG # pylint: disable=W0603
151154
152155 _LOG .debug ("About to unregister classes" )
153156 global ClassManager
0 commit comments