[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30198] branches/soc-2010-leifandersen/ tests/render/run.py: 1.

Leif Andersen leif.a.andersen at gmail.com
Sun Jul 11 05:33:32 CEST 2010


Revision: 30198
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30198
Author:   leifandersen
Date:     2010-07-11 05:33:14 +0200 (Sun, 11 Jul 2010)

Log Message:
-----------
1.  I fixed the non-sorted bug, simply by sorting the array pathes by name.  A bit of a hack, but it should work.

Modified Paths:
--------------
    branches/soc-2010-leifandersen/tests/render/run.py

Modified: branches/soc-2010-leifandersen/tests/render/run.py
===================================================================
--- branches/soc-2010-leifandersen/tests/render/run.py	2010-07-11 03:09:08 UTC (rev 30197)
+++ branches/soc-2010-leifandersen/tests/render/run.py	2010-07-11 03:33:14 UTC (rev 30198)
@@ -226,15 +226,18 @@
     def setup_image(self, blend_path, good_path, test_path):
         ''''''
         self.name = os.path.split(blend_path)[1]
-        i=1
         for imagename in os.listdir(good_path):
             if imagename.find('.png') != -1:
                 self.good_path_arr.append(os.path.join(good_path, imagename))
-                im = Image.open(self.good_path_arr[i-1])
-                self.good_animation.append(im)
-                self.test_path_arr.append(os.path.join(test_path, string.replace(self.name, '.blend', '_' + self.format_frame(i) + '.png')))
-                # self.good_hash_arr.append(self.generate_hash_image(im)) TODO removed due to time contstraint
-                i+=1
+        self.good_path_arr.sort()
+        
+        i=1
+        for imagename in self.good_path_arr:
+            im = Image.open(self.good_path_arr[i-1])
+            self.good_animation.append(im)
+            self.test_path_arr.append(os.path.join(test_path, string.replace(self.name, '.blend', '_' + self.format_frame(i) + '.png')))
+            # self.good_hash_arr.append(self.generate_hash_image(im)) TODO removed due to time contstraint
+            i+=1
 
         self.blend_path = blend_path
         self.good_path = self.good_path_arr[0]





More information about the Bf-blender-cvs mailing list