[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22977] branches/blender2.5/blender/ release/io/netrender/utils.py: add blendcache files to dependancies.
Martin Poirier
theeth at yahoo.com
Fri Sep 4 03:33:24 CEST 2009
Revision: 22977
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22977
Author: theeth
Date: 2009-09-04 03:33:22 +0200 (Fri, 04 Sep 2009)
Log Message:
-----------
add blendcache files to dependancies. next step, per frames deps.
Modified Paths:
--------------
branches/blender2.5/blender/release/io/netrender/utils.py
Modified: branches/blender2.5/blender/release/io/netrender/utils.py
===================================================================
--- branches/blender2.5/blender/release/io/netrender/utils.py 2009-09-04 01:28:06 UTC (rev 22976)
+++ branches/blender2.5/blender/release/io/netrender/utils.py 2009-09-04 01:33:22 UTC (rev 22977)
@@ -1,5 +1,6 @@
import bpy
import sys, os
+import re
import http, http.client, http.server, urllib
import subprocess, shutil, time, hashlib
@@ -66,8 +67,23 @@
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
for slave in scene.network_render.slaves_blacklist:
More information about the Bf-blender-cvs
mailing list