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

Leif Andersen leif.a.andersen at gmail.com
Thu Aug 5 05:28:34 CEST 2010


Revision: 31057
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31057
Author:   leifandersen
Date:     2010-08-05 05:28:32 +0200 (Thu, 05 Aug 2010)

Log Message:
-----------
1.  Completed all of the physics tests.  I'm still a bit concerned about fluids, but seing as the soft pencil's down date is in 4 days, I'll call it good (for now).

2.  The tests properties panel was giving me trouble, and I don't plan on using it anyway, so it's gone (at least for now).

3.  Improved the hash operator by quite a bit, it may be a bit slower, but not noticably so (at least not on my hardware), also removed a few bugs that had been hidden in it.

Modified Paths:
--------------
    branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
    branches/soc-2010-leifandersen/source/creator/CMakeLists.txt
    branches/soc-2010-leifandersen/tests/export_import_testing/CMakeLists.txt
    branches/soc-2010-leifandersen/tests/physics/CMakeLists.txt

Added Paths:
-----------
    branches/soc-2010-leifandersen/tests/physics/hashfile.txt
    branches/soc-2010-leifandersen/tests/render/anim/grass_wind.blend
    branches/soc-2010-leifandersen/tests/render/anim/softhairtest.blend

Removed Paths:
-------------
    branches/soc-2010-leifandersen/release/scripts/ui/properties_tests.py
    branches/soc-2010-leifandersen/tests/physics/blendcache_continue_physics/
    branches/soc-2010-leifandersen/tests/physics/softbody_curve_lattice.blend

Modified: branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py	2010-08-05 03:25:45 UTC (rev 31056)
+++ branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py	2010-08-05 03:28:32 UTC (rev 31057)
@@ -29,9 +29,9 @@
             hashcode += hash(scene.name)
             for ob in scene.objects:
                 hashcode += hash(ob.name)
+                hashcode += hash(ob.type)
                 for num in ob.rotation_euler:
                     hashcode += hash(round(num, 6))
-                hashcode += hash(ob.type)
                 for num in ob.location:
                     hashcode += hash(num)
                 for num in ob.scale:
@@ -39,6 +39,74 @@
                 for point in ob.bound_box:
                     for num in point:
                         hashcode += hash(num)
+                for group in ob.vertex_groups:
+                    hashcode += hash(group.name)
+                if ob.soft_body != None:
+                    sb = ob.soft_body
+                    hashcode += hash(sb.speed)
+                    hashcode += hash(sb.spring_length)
+                    hashcode += hash(sb.spring_vertex_group)
+                    hashcode += hash(sb.pull)
+                    hashcode += hash(sb.push)
+                    hashcode += hash(sb.self_collision)
+                    hashcode += hash(sb.shear)
+                    hashcode += hash(sb.stiff_quads)
+                    hashcode += hash(sb.use_edges)
+                    hashcode += hash(sb.use_goal)
+                    hashcode += hash(sb.aero)
+                    hashcode += hash(sb.aerodynamics_type)  
+                    hashcode += hash(sb.auto_step)
+                    hashcode += hash(sb.ball_damp)
+                    hashcode += hash(sb.ball_size)
+                    hashcode += hash(sb.ball_stiff)
+                    hashcode += hash(sb.bending)
+                    hashcode += hash(sb.choke)
+                    hashcode += hash(sb.collision_type)
+                    hashcode += hash(sb.damp)
+                    hashcode += hash(sb.diagnose)
+                    hashcode += hash(sb.edge_collision)
+                    hashcode += hash(sb.error_limit)
+                    hashcode += hash(sb.estimate_matrix)
+                    hashcode += hash(sb.face_collision)
+                    hashcode += hash(sb.friction)
+                    hashcode += hash(sb.fuzzy)
+                    hashcode += hash(sb.goal_default)
+                    hashcode += hash(sb.goal_friction)
+                    hashcode += hash(sb.goal_max)
+                    hashcode += hash(sb.goal_min)
+                    hashcode += hash(sb.goal_spring)
+                    hashcode += hash(sb.goal_vertex_group)
+                    hashcode += hash(sb.gravity)
+                    hashcode += hash(sb.mass)
+                    hashcode += hash(sb.mass_vertex_group)
+                    hashcode += hash(sb.maxstep)
+                    hashcode += hash(sb.minstep)
+                    hashcode += hash(sb.plastic)
+                    for num in sb.lcom:
+                        hashcode += hash(num)
+                    for vector in sb.lrot:
+                        for num in vector:
+                            hashcode += hash(num)
+                    for vector in sb.lscale:
+                        for num in vector:
+                            hashcode += hash(num)
+                    if sb.effector_weights != None:
+                        ef = sb.effector_weights
+                        hashcode += hash(ef.all)
+                        hashcode += hash(ef.boid)
+                        hashcode += hash(ef.charge)
+                        hashcode += hash(ef.curveguide)
+                        hashcode += hash(ef.do_growing_hair)
+                        hashcode += hash(ef.drag)
+                        hashcode += hash(ef.force)
+                        hashcode += hash(ef.gravity)
+                        hashcode += hash(ef.harmonic)
+                        hashcode += hash(ef.lennardjones)
+                        hashcode += hash(ef.magnetic)
+                        hashcode += hash(ef.texture)
+                        hashcode += hash(ef.turbulence)
+                        hashcode += hash(ef.vortex)
+                        hashcode += hash(ef.wind)
                 if ob.type == 'MESH':
                     for vert in ob.data.verts:
                         for co in vert.co:
@@ -60,24 +128,66 @@
                     for ps in ob.particle_systems:
                         hashcode += hash(ps.editable)
                         hashcode += hash(ps.edited)
-                        hashcode += hash(ps.name)
-                        hashcode += hash(ps.birthtime)
                         for particle in ps.particles:
                             hashcode += hash(particle.size)
-                            for num in particles.velocity:
+                            for num in particle.velocity:
                                 hashcode += hash(num)
-                            for num in particles.rotation:
+                            for num in particle.rotation:
                                 hashcode += hash(num)
-                            for hair in particles.hair:
+                            for hair in particle.hair:
                                 for num in hair.location:
-                                    hashcode += hash(num)         
+                                    hashcode += hash(num)
+                if ob.type == 'LAMP':
+                    hashcode += hash(ob.data.rna_type.name)
+                    hashcode += hash(ob.data.name)
+                    hashcode += hash(ob.data.tag)
+                    hashcode += hash(ob.data.type)
+                    hashcode += hash(ob.data.diffuse)
+                    if ob.data.rna_type.name == 'PointLamp' or ob.data.rna_type.name == 'Area Lamp':
+                        hashcode += hash(ob.data.shadow_soft_size)
+                        hashcode += hash(ob.data.shadow_layer)
+                        hashcode += hash(ob.data.shadow_adaptive_threshold)
+                        hashcode += hash(ob.data.shadow_method)
+                        for num in ob.data.shadow_color:
+                            hashcode += hash(num)
+                    if ob.data.rna_type.name == 'PointLamp':
+                        hashcode += hash(ob.data.shadow_ray_samples)
+                        hashcode += hash(ob.data.shadow_ray_sampling_method)
+                        hashcode += hash(ob.data.sphere)
+                        hashcode += hash(ob.data.falloff_type)
+                        hashcode += hash(ob.data.falloff_curve.clip)
+                        hashcode += hash(ob.data.falloff_curve.clip_min_x)
+                        hashcode += hash(ob.data.falloff_curve.clip_min_y)
+                        hashcode += hash(ob.data.falloff_curve.clip_max_x)
+                        hashcode += hash(ob.data.falloff_curve.clip_max_y)
+                        for num in ob.data.falloff_curve.white_level:
+                            hashcode  += hash(num)
+                    for num in ob.data.color:
+                        hashcode += hash(num)
+                if ob.type == 'CAMERA':
+                    hashcode += hash(ob.data.name)
+                    hashcode += hash(ob.data.lens)
+                    hashcode += hash(ob.data.lens_unit)
+                    hashcode += hash(ob.data.show_limits)
+                    hashcode += hash(ob.data.show_name)
+                    hashcode += hash(ob.data.show_passepartout)
+                    hashcode += hash(ob.data.show_title_safe)
+                    hashcode += hash(ob.data.show_mist)
+                    hashcode += hash(ob.data.tag)
+                    hashcode += hash(ob.data.shift_x)
+                    hashcode += hash(ob.data.shift_y)
+                    hashcode += hash(ob.data.dof_distance)
+                    hashcode += hash(ob.data.ortho_scale)
+                    hashcode += hash(ob.data.panorama)
+                    hashcode += hash(ob.data.passepartout_alpha)
+                    hashcode += hash(ob.data.draw_size)
+                    hashcode += hash(ob.data.angle)
+                    
         print(hashcode)
         tests.hashfile.last_hash = hashcode 
         return {'FINISHED'}
-    
-    def invoke(self, context, event):
-        return {'RUNNING_MODAL'}
 
+
 class TESTS_OT_write_hashfile(bpy.types.Operator):
     '''Writes the current hash set stored into a hashfile'''
     bl_idname = "TESTS_OT_write_hashfile"
@@ -88,7 +198,7 @@
     directory = StringProperty(name="File Directory", description="File Directory used", maxlen= 1024, default= "")
 
     def poll(self, context):
-        return len(tests.data) < 0
+        return len(tests.hashfile.data) < 0
     
     def execute(self, context):
         file = open(self.properties.filepath, 'w')

Deleted: branches/soc-2010-leifandersen/release/scripts/ui/properties_tests.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/ui/properties_tests.py	2010-08-05 03:25:45 UTC (rev 31056)
+++ branches/soc-2010-leifandersen/release/scripts/ui/properties_tests.py	2010-08-05 03:28:32 UTC (rev 31057)
@@ -1,55 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-
-class TestsButtonsPanel(bpy.types.Panel):
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = "hash"
-    

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list