[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30514] branches/soc-2010-leifandersen/ release/scripts: 1.
Leif Andersen
leif.a.andersen at gmail.com
Tue Jul 20 00:46:34 CEST 2010
Revision: 30514
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30514
Author: leifandersen
Date: 2010-07-20 00:46:34 +0200 (Tue, 20 Jul 2010)
Log Message:
-----------
1. Improvments on the hash operator
2. Some minor work done on creating a tests panel in the properties window.
Modified Paths:
--------------
branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
Added Paths:
-----------
branches/soc-2010-leifandersen/release/scripts/ui/properties_tests.py
Modified: branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py 2010-07-19 22:43:45 UTC (rev 30513)
+++ branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py 2010-07-19 22:46:34 UTC (rev 30514)
@@ -29,10 +29,28 @@
for num in ob.rotation_euler:
hashcode += hash(round(num, 6))
hashcode += hash(ob.type)
+ for point in ob.bounding_box:
+ for num in point:
+ hashcode += hash(num)
if ob.type == 'MESH':
for vert in ob.data.verts:
for co in vert.co:
hashcode += hash(co)
+ 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:
+ hashcode += hash(num)
+ for num in particles.rotation:
+ hashcode += hash(num)
+ for hair in particles.hair:
+ for num in hair.location:
+ hashcode += hash(num)
+
print(hashcode)
return {'FINISHED'}
Added: branches/soc-2010-leifandersen/release/scripts/ui/properties_tests.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/ui/properties_tests.py (rev 0)
+++ branches/soc-2010-leifandersen/release/scripts/ui/properties_tests.py 2010-07-19 22:46:34 UTC (rev 30514)
@@ -0,0 +1,69 @@
+# ##### 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"
+
+ def poll(self, context):
+ return True
+
+
+class TESTS_PT_hash(RenderButtonsPanel):
+ bl_label = "Hash"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+ def draw(self, context):
+ pass
+
+
+
+classes = [
+ RENDER_MT_presets,
+ RENDER_MT_ffmpeg_presets,
+ RENDER_PT_render,
+ RENDER_PT_layers,
+ RENDER_PT_dimensions,
+ RENDER_PT_antialiasing,
+ RENDER_PT_motion_blur,
+ RENDER_PT_shading,
+ RENDER_PT_output,
+ RENDER_PT_encoding,
+ RENDER_PT_performance,
+ RENDER_PT_post_processing,
+ RENDER_PT_stamp,
+ RENDER_PT_bake
+]
+
+
+def register():
+ register = bpy.types.register
+ for cls in classes:
+ register(cls)
+
+
+def unregister():
+ unregister = bpy.types.unregister
+ for cls in classes:
+ unregister(cls)
+
+if __name__ == "__main__":
+ register()
\ No newline at end of file
More information about the Bf-blender-cvs
mailing list