Skip to content

Commit

Permalink
Merge pull request WolvenKit#121 from philipl/normalize-paths
Browse files Browse the repository at this point in the history
openJSON: normalize paths to support loading materials on other OSes
  • Loading branch information
Simarilius-uk authored Mar 8, 2024
2 parents fba897a + 3bb49fd commit 7c66641
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion i_scene_cp77_gltf/main/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ def json_ver_validate( json_data):
return True

def openJSON(path, mode='r', ProjPath='', DepotPath=''):
path = path.replace('\\', os.sep)
ProjPath = ProjPath.replace('\\', os.sep)
DepotPath = DepotPath.replace('\\', os.sep)

inproj=os.path.join(ProjPath,path)
if os.path.exists(inproj):
file = open(inproj,mode)
Expand Down Expand Up @@ -666,4 +670,4 @@ def createHash12Group():
CurMat.links.new(separate2.outputs[2],mul.inputs[1])
CurMat.links.new(mul.outputs[0],frac2.inputs[0])
CurMat.links.new(frac2.outputs[0],GroupOutput.inputs[0])
return CurMat
return CurMat

0 comments on commit 7c66641

Please sign in to comment.