PyAPI: minor path init simplification
authorCampbell Barton <ideasman42@gmail.com>
Wed, 29 Mar 2017 04:07:41 +0000 (15:07 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 29 Mar 2017 04:07:41 +0000 (15:07 +1100)
release/scripts/modules/bpy/__init__.py

index 26fdbc8cc5646537fcbd9ae77f1cb1666994cbf0..545b891505fdcd7f9e9118a1bf8e300213760dee 100644 (file)
@@ -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