[Bf-blender-cvs] [4c7f4e4662b] master: PyAPI: minor path init simplification

Campbell Barton noreply at git.blender.org
Wed Mar 29 06:06:36 CEST 2017


Commit: 4c7f4e4662ba9ecddd469d5f12e1b0de17ed553e
Author: Campbell Barton
Date:   Wed Mar 29 15:07:41 2017 +1100
Branches: master
https://developer.blender.org/rB4c7f4e4662ba9ecddd469d5f12e1b0de17ed553e

PyAPI: minor path init simplification

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

M	release/scripts/modules/bpy/__init__.py

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

diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index 26fdbc8cc56..545b891505f 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -48,11 +48,11 @@ def main():
     import sys
 
     # Possibly temp. addons path
-    from os.path import join, dirname, normpath
-    sys.path.append(normpath(join(dirname(__file__),
-                                  "..", "..", "addons", "modules")))
-    sys.path.append(join(utils.user_resource('SCRIPTS'),
-                         "addons", "modules"))
+    from os.path import join, dirname
+    sys.path.extend([
+        join(dirname(dirname(dirname(__file__))), "addons", "modules"),
+        join(utils.user_resource('SCRIPTS'), "addons", "modules"),
+    ])
 
     # fake module to allow:
     #   from bpy.types import Panel




More information about the Bf-blender-cvs mailing list