diff --git a/release/scripts/io/netrender/master_html.py b/release/scripts/io/netrender/master_html.py
index c3695cd4f0f..74155f6bd66 100644
--- a/release/scripts/io/netrender/master_html.py
+++ b/release/scripts/io/netrender/master_html.py
@@ -27,9 +27,10 @@ def get(handler):
def output(text):
handler.wfile.write(bytes(text, encoding='utf8'))
- def head(title):
+ def head(title, refresh = False):
output("
")
- output("")
+ if refresh:
+ output("")
output("")
# output("")
output("")
@@ -104,7 +105,7 @@ def get(handler):
f.close()
elif handler.path == "/html" or handler.path == "/":
handler.send_head(content = "text/html")
- head("NetRender")
+ head("NetRender", refresh = True)
output("Jobs
")
diff --git a/release/scripts/io/netrender/repath.py b/release/scripts/io/netrender/repath.py
index 34af8e137ec..d9a13ade987 100755
--- a/release/scripts/io/netrender/repath.py
+++ b/release/scripts/io/netrender/repath.py
@@ -83,14 +83,17 @@ def process(paths):
elif paths[i].endswith(".bobj.gz"):
path_map[os.path.split(paths[i])[0]] = os.path.split(paths[i+1])[0]
else:
- path_map[paths[i]] = paths[i+1]
+ path_map[os.path.split(paths[i])[1]] = paths[i+1]
+
+ # TODO original paths aren't really the orignal path (they are the normalized path
+ # so we repath using the filenames only.
###########################
# LIBRARIES
###########################
for lib in bpy.data.libraries:
file_path = bpy.utils.expandpath(lib.filepath)
- new_path = path_map.get(file_path, None)
+ new_path = path_map.get(os.path.split(file_path)[1], None)
if new_path:
lib.filepath = new_path
@@ -100,7 +103,7 @@ def process(paths):
for image in bpy.data.images:
if image.source == "FILE" and not image.packed_file:
file_path = bpy.utils.expandpath(image.filepath)
- new_path = path_map.get(file_path, None)
+ new_path = path_map.get(os.path.split(file_path)[1], None)
if new_path:
image.filepath = new_path
diff --git a/release/scripts/io/netrender/slave.py b/release/scripts/io/netrender/slave.py
index 9fd00152dc1..fbaf2254504 100644
--- a/release/scripts/io/netrender/slave.py
+++ b/release/scripts/io/netrender/slave.py
@@ -79,6 +79,8 @@ def testFile(conn, job_id, slave_id, rfile, JOB_PREFIX, main_path = None):
job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force = True)
if not found:
+ # Force prefix path if not found
+ job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force = True)
temp_path = JOB_PREFIX + "slave.temp"
conn.request("GET", fileURL(job_id, rfile.index), headers={"slave-id":slave_id})
response = conn.getresponse()
diff --git a/release/scripts/io/netrender/utils.py b/release/scripts/io/netrender/utils.py
index 6288b9747c0..fa2eb6fb5f5 100644
--- a/release/scripts/io/netrender/utils.py
+++ b/release/scripts/io/netrender/utils.py
@@ -171,7 +171,7 @@ def prefixPath(prefix_directory, file_path, prefix_path, force = False):
# if an absolute path, make sure path exists, if it doesn't, use relative local path
full_path = file_path
if force or not os.path.exists(full_path):
- p, n = os.path.split(full_path)
+ p, n = os.path.split(os.path.normpath(full_path))
if prefix_path and p.startswith(prefix_path):
if len(prefix_path) < len(p):