|
13 | 13 | from os import path
|
14 | 14 | import bpy
|
15 | 15 |
|
16 |
| -def version_missmatch(): |
17 |
| - return bpy.app.version[:2] != bl_info['blender'][:2] |
18 |
| -def version_missmatch_message(): |
19 |
| - if version_missmatch(): |
20 |
| - v = bl_info['blender'] |
21 |
| - return f"Malt loading aborted. The installed Malt version only works with Blender {v[0]}.{v[1]}" |
22 |
| - |
23 | 16 | #Add Malt and dependencies to the import path
|
24 | 17 | __CURRENT_DIR = path.dirname(path.realpath(__file__))
|
25 | 18 | __MALT_PATH = path.join(__CURRENT_DIR, '.MaltPath')
|
@@ -63,10 +56,6 @@ def update_debug_mode(self, context):
|
63 | 56 | def draw(self, context):
|
64 | 57 | layout = self.layout
|
65 | 58 |
|
66 |
| - if version_missmatch(): |
67 |
| - layout.label(text=version_missmatch_message(), icon='ERROR') |
68 |
| - return |
69 |
| - |
70 | 59 | if context.scene.render.engine == 'MALT':
|
71 | 60 | layout.operator('wm.path_open', text="Open Session Log").filepath=sys.stdout.log_path
|
72 | 61 | else:
|
@@ -130,9 +119,12 @@ def do_windows_fixes():
|
130 | 119 | if platform.system() == 'Windows':
|
131 | 120 | sys.executable = sys._base_executable
|
132 | 121 | # Use python-gpu on windows (patched python with NvOptimusEnablement and AmdPowerXpressRequestHighPerformance)
|
| 122 | + python_gpu_path = path.join(__MALT_DEPENDENCIES_PATH, 'python-gpu-{}.exe'.format(_PY_VERSION)) |
| 123 | + if os.path.exists(python_gpu_path) == False: |
| 124 | + print(f"MALT WARNING: python-gpu-{_PY_VERSION}.exe not found. Performance might be affected.") |
| 125 | + return |
133 | 126 | python_executable = path.join(sys.exec_prefix, 'bin', 'python-gpu-{}.exe'.format(_PY_VERSION))
|
134 | 127 | if os.path.exists(python_executable) == False:
|
135 |
| - python_gpu_path = path.join(__MALT_DEPENDENCIES_PATH, 'python-gpu-{}.exe'.format(_PY_VERSION)) |
136 | 128 | try:
|
137 | 129 | copy(python_gpu_path, python_executable)
|
138 | 130 | except PermissionError as e:
|
@@ -201,10 +193,6 @@ def get_modules():
|
201 | 193 |
|
202 | 194 | def register():
|
203 | 195 | for _class in classes: bpy.utils.register_class(_class)
|
204 |
| - |
205 |
| - if version_missmatch(): |
206 |
| - print(version_missmatch_message()) |
207 |
| - return |
208 | 196 |
|
209 | 197 | import importlib
|
210 | 198 | for module in get_modules():
|
|
0 commit comments