minor changes to Martni's commit 30961
- removed the immediate option from C/api and now store in python only, when python loads modules it sets it to False. - unloading a module would clear the entire TypeMap for all modules, only remove the module types that is being unloaded. - added some checks for bad class registering, report errors rather then crashing.
This commit is contained in:
@@ -102,6 +102,9 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
|
||||
import traceback
|
||||
import time
|
||||
|
||||
# must be set back to True on exits
|
||||
_bpy_types._register_immediate = False
|
||||
|
||||
t_main = time.time()
|
||||
|
||||
loaded_modules = set()
|
||||
@@ -217,6 +220,8 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
|
||||
|
||||
if _bpy.app.debug:
|
||||
print("Python Script Load Time %.4f" % (time.time() - t_main))
|
||||
|
||||
_bpy_types._register_immediate = True
|
||||
|
||||
|
||||
def expandpath(path):
|
||||
|
||||
Reference in New Issue
Block a user