[Bf-blender-cvs] [b5b72a3f297] master: PyAPI: don't re-register add-ons on 'New File'

Campbell Barton noreply at git.blender.org
Mon May 15 07:40:35 CEST 2017


Commit: b5b72a3f2971094860558969e255b3ee7d7ed989
Author: Campbell Barton
Date:   Mon May 15 15:33:01 2017 +1000
Branches: master
https://developer.blender.org/rBb5b72a3f2971094860558969e255b3ee7d7ed989

PyAPI: don't re-register add-ons on 'New File'

Some add-ons have bugs with re-registration,
they should be fixed, but no need to exacerbate the problem.

===================================================================

M	release/scripts/modules/bl_app_template_utils.py

===================================================================

diff --git a/release/scripts/modules/bl_app_template_utils.py b/release/scripts/modules/bl_app_template_utils.py
index b3a4824aa7b..b81971b98b6 100644
--- a/release/scripts/modules/bl_app_template_utils.py
+++ b/release/scripts/modules/bl_app_template_utils.py
@@ -165,12 +165,10 @@ def import_from_id(template_id, ignore_not_found=False):
 def activate(template_id=None):
     template_id_prev = _app_template["id"]
 
-    # not needed but may as well avoid activating same template
-    # ... in fact keep this, it will show errors early on!
-    """
+    # not needed but may as well avoids redundant
+    # disable/enable for all add-ons on 'File -> New'
     if template_id_prev == template_id:
         return
-    """
 
     if template_id_prev:
         _disable(template_id_prev)




More information about the Bf-blender-cvs mailing list