diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-03 14:36:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-03 14:36:22 +0300 |
commit | 606fbde1c3968d2db1b7beb954a778a4997905c9 (patch) | |
tree | fc7904f5bba1195cd27d66f46f22e72573537332 /archimesh | |
parent | 1b9a94b5f9380a12123f1def08db5a4110b54c9c (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')
-rw-r--r-- | archimesh/__init__.py | 40 | ||||
-rw-r--r-- | archimesh/achm_books_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_column_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_curtain_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_door_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_gltools.py | 2 | ||||
-rw-r--r-- | archimesh/achm_kitchen_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_lamp_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_main_panel.py | 4 | ||||
-rw-r--r-- | archimesh/achm_roof_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_room_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_shelves_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_stairs_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_venetian_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_window_maker.py | 2 | ||||
-rw-r--r-- | archimesh/achm_window_panel.py | 2 |
16 files changed, 30 insertions, 42 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") diff --git a/archimesh/achm_books_maker.py b/archimesh/achm_books_maker.py index 1d0f47e2..0d9c34eb 100644 --- a/archimesh/achm_books_maker.py +++ b/archimesh/achm_books_maker.py @@ -29,7 +29,7 @@ import math import random import copy import colorsys -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_column_maker.py b/archimesh/achm_column_maker.py index d13f544c..aff15b7e 100644 --- a/archimesh/achm_column_maker.py +++ b/archimesh/achm_column_maker.py @@ -26,7 +26,7 @@ # noinspection PyUnresolvedReferences import bpy import math -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_curtain_maker.py b/archimesh/achm_curtain_maker.py index 30e4f456..1e94d6b1 100644 --- a/archimesh/achm_curtain_maker.py +++ b/archimesh/achm_curtain_maker.py @@ -28,7 +28,7 @@ import bpy import colorsys import copy import math -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_door_maker.py b/archimesh/achm_door_maker.py index cbc16684..36eba64e 100644 --- a/archimesh/achm_door_maker.py +++ b/archimesh/achm_door_maker.py @@ -27,7 +27,7 @@ import bpy import math # noinspection PyUnresolvedReferences from bpy.props import * -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_gltools.py b/archimesh/achm_gltools.py index 57eab974..1cadedb1 100644 --- a/archimesh/achm_gltools.py +++ b/archimesh/achm_gltools.py @@ -34,7 +34,7 @@ import math import mathutils # noinspection PyUnresolvedReferences from bpy_extras import view3d_utils -from achm_room_maker import get_wall_points +from .achm_room_maker import get_wall_points # ------------------------------------------------------------- diff --git a/archimesh/achm_kitchen_maker.py b/archimesh/achm_kitchen_maker.py index bad0de5c..21a3e565 100644 --- a/archimesh/achm_kitchen_maker.py +++ b/archimesh/achm_kitchen_maker.py @@ -29,7 +29,7 @@ import copy import sys import datetime import time -from achm_tools import * +from .achm_tools import * from bpy_extras.io_utils import ExportHelper # ---------------------------------------------------------- diff --git a/archimesh/achm_lamp_maker.py b/archimesh/achm_lamp_maker.py index 2b2b8855..fe21beab 100644 --- a/archimesh/achm_lamp_maker.py +++ b/archimesh/achm_lamp_maker.py @@ -26,7 +26,7 @@ import bpy import math import copy -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------ diff --git a/archimesh/achm_main_panel.py b/archimesh/achm_main_panel.py index b2ebbc38..f665057a 100644 --- a/archimesh/achm_main_panel.py +++ b/archimesh/achm_main_panel.py @@ -27,8 +27,8 @@ import bpy # noinspection PyUnresolvedReferences import bgl -from achm_tools import * -from achm_gltools import * +from .achm_tools import * +from .achm_gltools import * # ----------------------------------------------------- diff --git a/archimesh/achm_roof_maker.py b/archimesh/achm_roof_maker.py index d7840b81..c4330dfd 100644 --- a/archimesh/achm_roof_maker.py +++ b/archimesh/achm_roof_maker.py @@ -26,7 +26,7 @@ # noinspection PyUnresolvedReferences import bpy import math -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_room_maker.py b/archimesh/achm_room_maker.py index f7b03131..fec4d23d 100644 --- a/archimesh/achm_room_maker.py +++ b/archimesh/achm_room_maker.py @@ -30,7 +30,7 @@ import math import mathutils import datetime import time -from achm_tools import * +from .achm_tools import * # noinspection PyUnresolvedReferences from bpy_extras.io_utils import ExportHelper, ImportHelper diff --git a/archimesh/achm_shelves_maker.py b/archimesh/achm_shelves_maker.py index 178b1898..704ae485 100644 --- a/archimesh/achm_shelves_maker.py +++ b/archimesh/achm_shelves_maker.py @@ -25,7 +25,7 @@ # ---------------------------------------------------------- import bpy import copy -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_stairs_maker.py b/archimesh/achm_stairs_maker.py index 92558dc5..78ab57f1 100644 --- a/archimesh/achm_stairs_maker.py +++ b/archimesh/achm_stairs_maker.py @@ -26,7 +26,7 @@ # noinspection PyUnresolvedReferences import bpy import math -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_venetian_maker.py b/archimesh/achm_venetian_maker.py index 905e49eb..4e8ae336 100644 --- a/archimesh/achm_venetian_maker.py +++ b/archimesh/achm_venetian_maker.py @@ -27,7 +27,7 @@ import bpy import math # noinspection PyUnresolvedReferences from bpy.props import * -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_window_maker.py b/archimesh/achm_window_maker.py index a12a1e74..069c31db 100644 --- a/archimesh/achm_window_maker.py +++ b/archimesh/achm_window_maker.py @@ -27,7 +27,7 @@ import bpy import math # noinspection PyUnresolvedReferences from bpy.props import * -from achm_tools import * +from .achm_tools import * # ------------------------------------------------------------------ diff --git a/archimesh/achm_window_panel.py b/archimesh/achm_window_panel.py index c3c6862b..4c5e5dd0 100644 --- a/archimesh/achm_window_panel.py +++ b/archimesh/achm_window_panel.py @@ -31,7 +31,7 @@ import bpy import math # noinspection PyUnresolvedReferences import mathutils -from achm_tools import * +from .achm_tools import * def fitil(vr, fc, px, pz, x, y, z, zz, xx): |