diff options
Diffstat (limited to 'io_coat3D')
-rw-r--r-- | io_coat3D/tex.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py index 86280b0f..47ab63eb 100644 --- a/io_coat3D/tex.py +++ b/io_coat3D/tex.py @@ -394,13 +394,14 @@ def createnodes(active_mat,texcoat, create_group_node, objekti, ind, is_new, udi # READ DATA.JSON FILE platform = os.sys.platform - - if(platform == 'win32'): + + if(platform == 'darwin'): json_address = os.path.dirname(bpy.app.binary_path) + os.sep + str(bpy.app.version[0]) + '.' + str(bpy.app.version[1]) + os.sep + 'scripts' + os.sep + 'addons' + os.sep + 'io_coat3D' + os.sep + 'data.json' + json_address.replace('MacOS', 'Resources') else: json_address = os.path.dirname(bpy.app.binary_path) + os.sep + str(bpy.app.version[0]) + '.' + str(bpy.app.version[1]) + os.sep + 'scripts' + os.sep + 'addons' + os.sep + 'io_coat3D' + os.sep + 'data.json' - json_address.replace('MacOS', 'Resources') + with open(json_address, encoding='utf-8') as data_file: data = json.loads(data_file.read()) |