Skip to content

Commit

Permalink
Release - 1.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
simon50keda committed Oct 13, 2017
1 parent 70bbc40 commit ad65994
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addon/io_scs_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"name": "SCS Tools",
"description": "Setup models, Import-Export SCS data format",
"author": "Simon Lusenc (50keda), Milos Zajic (4museman)",
"version": (1, 10, "001193f"),
"version": (1, 10, "6cefe1f"),
"blender": (2, 78, 0),
"location": "File > Import-Export",
"wiki_url": "http://modding.scssoft.com/wiki/Documentation/Tools/SCS_Blender_Tools",
Expand Down
10 changes: 6 additions & 4 deletions addon/io_scs_tools/utils/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,16 @@ def get_scs_texture_str(texture_string):

extensions, texture_string = get_texture_extens_and_strip_path(texture_string)

# if texture string starts with scs project path we can directly strip of project path,
# otherwise check if texture string came from base project while scs project path is in dlc/mod folder
# if texture string starts with scs project path we can directly strip of project path
if startswith(texture_string, scs_project_path):
texture_string = texture_string[len(scs_project_path):]
elif len(scs_project_path) > 0 and len(texture_string) > 0:
else: # check if texture string came from base project while scs project path is in dlc/mod folder

# first find longest matching path
common_path_len = len(os.path.commonpath([scs_project_path, texture_string]))
try:
common_path_len = len(os.path.commonpath([scs_project_path, texture_string]))
except ValueError: # if ValueError is raised then paths do not match for sure, thus set it to 0
common_path_len = 0

# now check if provided texture string is the same as:
# current scs project path + one or two directories up + non matched path of the part
Expand Down

0 comments on commit ad65994

Please sign in to comment.