[Durian-svn] [3866] minor update to lib error script
campbell
institute at blender.org
Wed May 26 09:23:43 CEST 2010
Revision: 3866
https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=3866
Author: campbell
Date: 2010-05-26 09:23:42 +0200 (Wed, 26 May 2010)
Log Message:
-----------
minor update to lib error script
Modified Paths:
--------------
pro/scripts/utilities/findLibError.py
Modified: pro/scripts/utilities/findLibError.py
===================================================================
--- pro/scripts/utilities/findLibError.py 2010-05-26 06:18:12 UTC (rev 3865)
+++ pro/scripts/utilities/findLibError.py 2010-05-26 07:23:42 UTC (rev 3866)
@@ -47,19 +47,22 @@
# 01_snowbandits, 02_shaman (needs help from soenke), 03.1_alley, 04.1_ziggurat, 04.2_tornaway (just D to do), 04.3_citywall, 05.1_questbegins, 05.2_bamboo, 05.3_mountains, 05.4_foggyrocks, 05.5_desert
# 05.6_mantisfight, 05.7_cliffside, 05.8_ambushfight, 07.1_volcano, 07.2_intothecave, 08.1_dragonslair, 08.2_thebigfight, 08.4_realization, 09.1_sinkingin
+search = '/media/data/durian/pro/env_city/'
-search = '/media/data/durian/pro/env_city/alley_wip.blend'
-
# blender_bin = '/render/blender_$(whoami)/blender/blender'
-blender_cmd = 'LD_LIBRARY_PATH=/shared/software/exr/lib /media/data/blender_guest/blender/blender'
+blender_cmd = '/media/data/blender_%s/blender/blender' % os.environ["USER"]
VERBOSE = True
DEBUG = True
+def blend_path_list(path):
+ for dirpath, dirnames, filenames in os.walk(path):
+ for filename in filenames:
+ if filename.endswith(".blend"):
+ yield os.path.join(dirpath, filename)
+
def main():
- os.system('find %s -name "*.blend" > %s' % (search, blends))
-
- file_blends = open(blends, 'r').readlines()
+ file_blends = list(blend_path_list(search))
file_blends.sort()
errors = {}
@@ -79,7 +82,7 @@
# RUN Blender to find Library errors AND run a script that looks broken paths!
## os.system('LD_LIBRARY_PATH=/shared/software/exr/lib /render/blender_$(whoami)/blender/blender -b %s 1> %s 2>&1' % (line, tempf))
- pyscript = os.path.join(os.getcwd(), os.path.dirname(__file__) + "findPathError.py")
+ pyscript = os.path.join(os.getcwd(), os.path.join(os.path.dirname(__file__), "findPathError.py"))
# Also run a py script
cmd = '%s -b %s -P %s 1> %s 2>&1' % (blender_cmd, line, pyscript, tempf)
More information about the Durian-svn
mailing list