diff options
author | Martin Poirier <theeth@yahoo.com> | 2011-12-23 04:35:24 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2011-12-23 04:35:24 +0400 |
commit | 294fe2adf96772d2c67fd098e11c358e055aeb0a (patch) | |
tree | 7bfad7370f9a2e638e243ebf2083cbf3da22bb1e /netrender/model.py | |
parent | b99dae247e8443668285a375171a48cf9078cb6c (diff) |
netrender
- fix handling of pointcache dependencies on slave (correct repathing) and on client (bad frame dependency range)
- add Force Upload option on master to force dependencies upload and download (don't reuse local copies outside of slave cache)
- add links back to main page on job web page
- client limit dependencies to rendered frame range (it used to add all point cache frames)
Thanks to Philippe Van Hecke for raising the issue by email.
Diffstat (limited to 'netrender/model.py')
-rw-r--r-- | netrender/model.py | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/netrender/model.py b/netrender/model.py index 5fbf46ce..c2331315 100644 --- a/netrender/model.py +++ b/netrender/model.py @@ -154,13 +154,14 @@ class VersioningInfo: class RenderFile: - def __init__(self, filepath = "", index = 0, start = -1, end = -1, signature=0): + def __init__(self, filepath = "", index = 0, start = -1, end = -1, signature = 0): self.filepath = filepath self.original_path = filepath self.signature = signature self.index = index self.start = start self.end = end + self.force = False def serialize(self): return { @@ -169,7 +170,8 @@ class RenderFile: "index": self.index, "start": self.start, "end": self.end, - "signature": self.signature + "signature": self.signature, + "force": self.force } @staticmethod @@ -179,6 +181,7 @@ class RenderFile: rfile = RenderFile(data["filepath"], data["index"], data["start"], data["end"], data["signature"]) rfile.original_path = data["original_path"] + rfile.force = data["force"] return rfile @@ -221,11 +224,23 @@ class RenderJob: return self.type in (JOB_BLENDER, JOB_VCS) def addFile(self, file_path, start=-1, end=-1, signed=True): - if signed: - signature = hashFile(file_path) - else: - signature = None - self.files.append(RenderFile(file_path, len(self.files), start, end, signature)) + def isFileInFrames(): + if start == end == -1: + return True + + for rframe in self.frames: + if start <= rframe.number<= end: + return True + + return False + + + if isFileInFrames(): + if signed: + signature = hashFile(file_path) + else: + signature = None + self.files.append(RenderFile(file_path, len(self.files), start, end, signature)) def addFrame(self, frame_number, command = ""): frame = RenderFrame(frame_number, command) |