Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-08-03 14:36:22 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-08-03 14:36:22 +0300
commit606fbde1c3968d2db1b7beb954a778a4997905c9 (patch)
treefc7904f5bba1195cd27d66f46f22e72573537332 /archimesh/__init__.py
parent1b9a94b5f9380a12123f1def08db5a4110b54c9c (diff)
Avoid modification of python system paths
This isn't a proper way to solve the import problem, use relative import instead.
Diffstat (limited to 'archimesh/__init__.py')
-rw-r--r--archimesh/__init__.py40
1 files changed, 14 insertions, 26 deletions
diff --git a/archimesh/__init__.py b/archimesh/__init__.py
index 6fab5c1b..75784c43 100644
--- a/archimesh/__init__.py
+++ b/archimesh/__init__.py
@@ -40,18 +40,6 @@ import sys
import os
# ----------------------------------------------
-# Add to Phyton path (once only)
-# ----------------------------------------------
-path = sys.path
-flag = False
-for item in path:
- if "archimesh" in item:
- flag = True
-if flag is False:
- sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'archimesh'))
- print("archimesh: added to phytonpath")
-
-# ----------------------------------------------
# Import modules
# ----------------------------------------------
if "bpy" in locals():
@@ -72,20 +60,20 @@ if "bpy" in locals():
imp.reload(achm_window_panel)
print("archimesh: Reloaded multifiles")
else:
- import achm_books_maker
- import achm_column_maker
- import achm_curtain_maker
- import achm_venetian_maker
- import achm_door_maker
- import achm_kitchen_maker
- import achm_lamp_maker
- import achm_main_panel
- import achm_roof_maker
- import achm_room_maker
- import achm_shelves_maker
- import achm_stairs_maker
- import achm_window_maker
- import achm_window_panel
+ from . import achm_books_maker
+ from . import achm_column_maker
+ from . import achm_curtain_maker
+ from . import achm_venetian_maker
+ from . import achm_door_maker
+ from . import achm_kitchen_maker
+ from . import achm_lamp_maker
+ from . import achm_main_panel
+ from . import achm_roof_maker
+ from . import achm_room_maker
+ from . import achm_shelves_maker
+ from . import achm_stairs_maker
+ from . import achm_window_maker
+ from . import achm_window_panel
print("archimesh: Imported multifiles")