Revision: 31790
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31790
Author:   leifandersen
Date:     2010-09-06 19:16:29 +0200 (Mon, 06 Sep 2010)

Log Message:
-----------
Updated the hash operator for the new(er) api, although I haven't updated the 
list of hashes (yet) because I have a feeling the merge with trunk I'm about to 
do will break it again.

Modified Paths:
--------------
    branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
    branches/soc-2010-leifandersen/tests/python/Armature_example2.py
    branches/soc-2010-leifandersen/tests/python/Types_example.py
    branches/soc-2010-leifandersen/tests/python/hash_compare.py

Modified: branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py     
2010-09-06 15:54:08 UTC (rev 31789)
+++ branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py     
2010-09-06 17:16:29 UTC (rev 31790)
@@ -59,38 +59,30 @@
                 hashcode.update(str(w.bl_rna.name).encode())
                 hashcode.update(str(w.name).encode())
                 hashcode.update(str(w.exposure).encode())
-                li = w.lighting
+                li = w.light_settings
                 hashcode.update(str(li.environment_color).encode())
                 hashcode.update(str(li.bias).encode())
                 hashcode.update(str(li.correction).encode())
                 hashcode.update(str(li.distance).encode())
+                hashcode.update(str(li.error_threshold).encode())
                 hashcode.update(str(li.environment_energy).encode())
-                hashcode.update(str(li.error_tolerance).encode())
-                hashcode.update(str(li.falloff).encode())
                 hashcode.update(str(li.falloff_strength).encode())
                 hashcode.update(str(li.gather_method).encode())
                 hashcode.update(str(li.indirect_bounces).encode())
                 hashcode.update(str(li.indirect_factor).encode())
                 hashcode.update(str(li.passes).encode())
-                hashcode.update(str(li.pixel_cache).encode())
                 hashcode.update(str(li.samples).encode())
                 hashcode.update(str(li.sample_method).encode())
                 hashcode.update(str(li.threshold).encode())
                 hashcode.update(str(li.use_ambient_occlusion).encode())
-                hashcode.update(str(li.use_environment_lighting).encode())
-                hashcode.update(str(li.use_indirect_lighting).encode())
-                mi = w.mist
+                hashcode.update(str(li.use_falloff).encode())
+                mi = w.mist_settings
                 hashcode.update(str(mi.depth).encode())
                 hashcode.update(str(mi.falloff).encode())
-                hashcode.update(str(mi.height).encode())
-                hashcode.update(str(mi.intensity).encode())
-                hashcode.update(str(mi.start).encode())
                 hashcode.update(str(mi.use_mist).encode())
-                hashcode.update(str(w.paper_sky).encode())
-                hashcode.update(str(w.range).encode())
-                hashcode.update(str(w.real_sky).encode())
-                st = w.stars
-                hashcode.update(str(st.color_randomization).encode())
+                hashcode.update(str(mi.start).encode())
+                st = w.star_settings
+                hashcode.update(str(st.color_random).encode())
                 hashcode.update(str(st.size).encode())
                 for texslot in w.texture_slots:
                     if texslot != None:
@@ -187,14 +179,14 @@
                         hashcode.update(str(ef.vortex).encode())
                         hashcode.update(str(ef.wind).encode())
                 if ob.type == 'MESH':
-                    for vert in ob.data.verts:
+                    for vert in ob.data.vertices:
                         for co in vert.co:
                             hashcode.update(str(round(co, 4)).encode())
                     for face in ob.data.faces:
-                        hashcode.update(str(face.smooth).encode())
+                        hashcode.update(str(face.use_smooth).encode())
                         hashcode.update(str(face.select).encode())
                         hashcode.update(str(face.hide).encode())
-                        for vert in face.verts:
+                        for vert in face.vertices:
                             hashcode.update(str(vert).encode())
                         for point in face.center:
                             hashcode.update(str(round(point, 4)).encode())
@@ -295,7 +287,6 @@
                     hashcode.update(str(ob.data.name).encode())
                     hashcode.update(str(ob.data.tag).encode())
                     hashcode.update(str(ob.data.type).encode())
-                    hashcode.update(str(ob.data.diffuse).encode())
                     if ob.data.rna_type.name == 'PointLamp' or 
ob.data.rna_type.name == 'Area Lamp':
                         hashcode.update(str(ob.data.shadow_soft_size).encode())
                         hashcode.update(str(ob.data.shadow_layer).encode())
@@ -333,7 +324,7 @@
                     hashcode.update(str(ob.data.shift_y).encode())
                     hashcode.update(str(ob.data.dof_distance).encode())
                     hashcode.update(str(ob.data.ortho_scale).encode())
-                    hashcode.update(str(ob.data.panorama).encode())
+                    hashcode.update(str(ob.data.use_panorama).encode())
                     hashcode.update(str(ob.data.passepartout_alpha).encode())
                     hashcode.update(str(ob.data.draw_size).encode())
                     hashcode.update(str(ob.data.angle).encode())
@@ -349,7 +340,6 @@
                         hashcode.update(str(letter.italic).encode())
                         hashcode.update(str(letter.underline).encode())
                     hashcode.update(str(tx.dimensions).encode())
-                    hashcode.update(str(tx.draw_handles).encode())
                     hashcode.update(str(tx.draw_normals).encode())
                     hashcode.update(str(tx.eval_time).encode())
                     hashcode.update(str(tx.extrude).encode())
@@ -421,7 +411,6 @@
                     hashcode.update(str(am.deform_quaternion).encode())
                     hashcode.update(str(am.deform_vertexgroups).encode())
                     hashcode.update(str(am.delay_deform).encode())
-                    hashcode.update(str(am.draw_axes).encode())
                     hashcode.update(str(am.draw_custom_bone_shapes).encode())
                     hashcode.update(str(am.draw_group_colors).encode())
                     hashcode.update(str(am.draw_names).encode())

Modified: branches/soc-2010-leifandersen/tests/python/Armature_example2.py
===================================================================
--- branches/soc-2010-leifandersen/tests/python/Armature_example2.py    
2010-09-06 15:54:08 UTC (rev 31789)
+++ branches/soc-2010-leifandersen/tests/python/Armature_example2.py    
2010-09-06 17:16:29 UTC (rev 31790)
@@ -43,8 +43,8 @@
     eb.parent = arm.edit_bones['Bone.003']
     eb.head = Vector((1,1,1))
     eb.tail = Vector((0,0,1))
-    eb.hinge = True
-    eb.connected = True
+    eb.use_hinge = True
+    eb.use_connect = True
 
     #add the bone is done automatically
     #delete an old bone
@@ -56,4 +56,4 @@
     for bone in arm.bones.values():
         print(bone.parent, bone.name)
         print(bone.children, bone.name)
-        print(bone.hinge, bone.connected, bone.name)
+        print(bone.use_hinge, bone.use_connect, bone.name)

Modified: branches/soc-2010-leifandersen/tests/python/Types_example.py
===================================================================
--- branches/soc-2010-leifandersen/tests/python/Types_example.py        
2010-09-06 15:54:08 UTC (rev 31789)
+++ branches/soc-2010-leifandersen/tests/python/Types_example.py        
2010-09-06 17:16:29 UTC (rev 31790)
@@ -37,8 +37,8 @@
         data = o.data
         print(data.bl_rna.name)
         if o.type == 'MESH':
-            if len(data.verts):
-                print("its vertices are obviously of type:", 
data.verts[0].bl_rna.name)
+            if len(data.vertices):
+                print("its vertices are obviously of type:", 
data.vertices[0].bl_rna.name)
             if len(data.faces):
                 print("its faces:", data.faces[0].bl_rna.name)
         elif o.type == 'CAMERA':

Modified: branches/soc-2010-leifandersen/tests/python/hash_compare.py
===================================================================
--- branches/soc-2010-leifandersen/tests/python/hash_compare.py 2010-09-06 
15:54:08 UTC (rev 31789)
+++ branches/soc-2010-leifandersen/tests/python/hash_compare.py 2010-09-06 
17:16:29 UTC (rev 31790)
@@ -46,17 +46,17 @@
     
     def test_case(self):
         bpy.ops.tests.hash()
-        #tests.hashfile.data[os.path.split(bpy.data.filepath)[1]+'_start'] = 
tests.hashfile.last_hash
-        
#bpy.ops.tests.write_hashfile(filepath=os.path.join(os.path.split(sys.argv[0])[0],
 'hashfile.txt'))
-        self.assertEquals(self.hash_start, tests.hashfile.last_hash)
+        tests.hashfile.data[os.path.split(bpy.data.filepath)[1]+'_start'] = 
tests.hashfile.last_hash
+        
bpy.ops.tests.write_hashfile(filepath=os.path.join(os.path.split(sys.argv[0])[0],
 'hashfile.txt'))
+        #self.assertEquals(self.hash_start, tests.hashfile.last_hash)
 
         mod = __import__(self.name.replace('.py.blend', ''))
         mod.func()
         
         bpy.ops.tests.hash()
-        #tests.hashfile.data[os.path.split(bpy.data.filepath)[1]+'_end'] = 
tests.hashfile.last_hash
-        
#bpy.ops.tests.write_hashfile(filepath=os.path.join(os.path.split(sys.argv[0])[0],
 'hashfile.txt'))
-        self.assertEquals(self.hash_end, tests.hashfile.last_hash)
+        tests.hashfile.data[os.path.split(bpy.data.filepath)[1]+'_end'] = 
tests.hashfile.last_hash
+        
bpy.ops.tests.write_hashfile(filepath=os.path.join(os.path.split(sys.argv[0])[0],
 'hashfile.txt'))
+        #self.assertEquals(self.hash_end, tests.hashfile.last_hash)
 
 def suite():
     return unittest.TestSuite([


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to