diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-09-04 05:33:22 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-09-04 05:33:22 +0400 |
commit | 640e39206b25bcd433223d85298961a860fc5cd7 (patch) | |
tree | d832733653c81c7f815e92b2f4e485412be14bf8 /release | |
parent | 993037d3cb52aa438096215e9d120e6f3d95205b (diff) |
add blendcache files to dependancies. next step, per frames deps.
Diffstat (limited to 'release')
-rw-r--r-- | release/io/netrender/utils.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/release/io/netrender/utils.py b/release/io/netrender/utils.py index 30d96b2f92f..62571011bc1 100644 --- a/release/io/netrender/utils.py +++ b/release/io/netrender/utils.py @@ -1,5 +1,6 @@ import bpy import sys, os +import re import http, http.client, http.server, urllib import subprocess, shutil, time, hashlib @@ -66,7 +67,22 @@ def clientSendJob(conn, scene, anim = False, chunks = 5): job.files.append(lib_path) - print(job.files) + root, ext = os.path.splitext(name) + cache_path = path + os.sep + "blendcache_" + root + os.sep # need an API call for that + + print("cache:", cache_path) + + if os.path.exists(cache_path): + pattern = re.compile("[a-zA-Z0-9]+_([0-9]+)_[0-9]+\.bphys") + for cache_name in sorted(os.listdir(cache_path)): + match = pattern.match(cache_name) + + if match: + print("Frame:", int(match.groups()[0]), cache_name) + + job.files.append(cache_path + cache_name) + + #print(job.files) job.name = job_name |