[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30998] branches/soc-2010-leifandersen: 1.

Leif Andersen leif.a.andersen at gmail.com
Tue Aug 3 05:59:47 CEST 2010


Revision: 30998
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30998
Author:   leifandersen
Date:     2010-08-03 05:59:46 +0200 (Tue, 03 Aug 2010)

Log Message:
-----------
1.  After realizing that the hash on the face object changes each time a blend file is loaded, the hash operator now hashes each individual component of the face.

2.  Meaning all hash tests now work as expected.

3.  Updated the hashes to match the new operator.

Modified Paths:
--------------
    branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
    branches/soc-2010-leifandersen/tests/export_import_testing/hashfile.txt

Modified: branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py	2010-08-03 03:53:36 UTC (rev 30997)
+++ branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py	2010-08-03 03:59:46 UTC (rev 30998)
@@ -42,9 +42,19 @@
                 if ob.type == 'MESH':
                     for vert in ob.data.verts:
                         for co in vert.co:
-                            hashcode += hash(co)
+                            hashcode += hash(co)        
                     for face in ob.data.faces:
-                        hashcode += hash(face)
+                        hashcode += hash(face.smooth)
+                        hashcode += hash(face.select)
+                        hashcode += hash(face.hide)
+                        hashcode += hash(len(face.verts))
+                        for point in face.center:
+                            hashcode += hash(point)
+                        for pair in face.edge_keys:
+                            for num in pair:
+                                hashcode += hash(num)
+                        for point in face.normal:
+                            hashcode += hash(point)                        
                     for num in ob.data.edge_face_count:
                         hashcode += hash(num)
                     for ps in ob.particle_systems:

Modified: branches/soc-2010-leifandersen/tests/export_import_testing/hashfile.txt
===================================================================
--- branches/soc-2010-leifandersen/tests/export_import_testing/hashfile.txt	2010-08-03 03:53:36 UTC (rev 30997)
+++ branches/soc-2010-leifandersen/tests/export_import_testing/hashfile.txt	2010-08-03 03:59:46 UTC (rev 30998)
@@ -1,7 +1,7 @@
-all_quads.blend = -18581593070168372584
-all_tris.blend = -23193331729858782021
+all_quads.blend = 4476784385202570807
+all_tris.blend = 4476784386880585889
 edges.blend = 4476784382546500577
-fgons.blend = -23193331727958294221
-mexed_quads_and_tris.blend = -13969959693018266161
+fgons.blend = 4476784395924799360
+mixed_quads_and_tris.blend = 4476784389230442082
 NURBS.blend = 4476784380650705631
-verticies.blend = 4476784380650705631
+vertices.blend = 4476784380650705631
\ No newline at end of file





More information about the Bf-blender-cvs mailing list