diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 11:50:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 11:50:58 +0400 |
commit | 9e16c687a94d38ba3c2f59d66ef2b567f3eeb72a (patch) | |
tree | 59ad8e34ff87e44a8d9f3d95bfc6fd3a740736cc /release/scripts/modules/bpy_types.py | |
parent | 0c62d107e04a43d8cf78af41e52368497cf338f0 (diff) |
update userpref's addon code to support new register/unregister, now the modules are parsed rather then being imported since it become quite tricky to import once without registering the classes, then again in a way that registered the existing modules classes without a reload() - which had problems too.
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 02e458b48c2..9d6d307502c 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -551,18 +551,18 @@ PropertiesMap = {} # registers moduals instantly. _register_immediate = True -def _unload_module(module): +def _unload_module(module, free=True): for t in TypeMap.get(module, ()): bpy_types.unregister(t) - if module in TypeMap: + if free == True and module in TypeMap: del TypeMap[module] for t in PropertiesMap.get(module, ()): bpy_types.unregister(t) - if module in PropertiesMap: + if free == True and module in PropertiesMap: del PropertiesMap[module] def _load_module(module, force=False): |