Revision: 31075 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31075 Author: leifandersen Date: 2010-08-05 19:26:16 +0200 (Thu, 05 Aug 2010)
Log Message: ----------- 1. Changed the pyunit folder to data, as I will just keep these tests as tests for raw data. 2. Hash now takes bones into account. 3. Started porting python files in blender folder to blender 2.5x api. Modified Paths: -------------- branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py branches/soc-2010-leifandersen/tests/CMakeLists.txt Added Paths: ----------- branches/soc-2010-leifandersen/tests/data/ Removed Paths: ------------- branches/soc-2010-leifandersen/tests/pyunit/ Modified: branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py =================================================================== --- branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py 2010-08-05 17:19:57 UTC (rev 31074) +++ branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py 2010-08-05 17:26:16 UTC (rev 31075) @@ -182,7 +182,85 @@ hashcode += hash(ob.data.passepartout_alpha) hashcode += hash(ob.data.draw_size) hashcode += hash(ob.data.angle) - + if ob.type == 'ARMATURE': + am = ob.data + hashcode += hash(am.auto_ik) + hashcode += hash(am.bl_rna.name) + hashcode += hash(am.deform_envelope) + hashcode += hash(am.deform_quaternion) + hashcode += hash(am.deform_vertexgroups) + hashcode += hash(am.delay_deform) + hashcode += hash(am.draw_axes) + hashcode += hash(am.draw_custom_bone_shapes) + hashcode += hash(am.draw_group_colors) + hashcode += hash(am.draw_names) + hashcode += hash(am.drawtype) + hashcode += hash(am.fake_user) + hashcode += hash(am.ghost_frame_end) + hashcode += hash(am.ghost_frame_start) + hashcode += hash(am.ghost_only_selected) + hashcode += hash(am.ghost_size) + hashcode += hash(am.ghost_step) + hashcode += hash(am.ghost_type) + hashcode += hash(am.name) + hashcode += hash(am.tag) + hashcode += hash(am.x_axis_mirror) + for bone in am.bones: + hashcode += hash(bone.basename) + hashcode += hash(bone.bbone_in) + hashcode += hash(bone.bbone_out) + hashcode += hash(bone.bbone_segments) + hashcode += hash(bone.bl_rna.name) + hashcode += hash(bone.connected) + hashcode += hash(bone.cyclic_offset) + hashcode += hash(bone.deform) + hashcode += hash(bone.draw_wire) + hashcode += hash(bone.envelope_distance) + hashcode += hash(bone.envelope_weight) + hashcode += hash(bone.head_radius) + hashcode += hash(bone.hide) + hashcode += hash(bone.hide_select) + hashcode += hash(bone.hinge) + hashcode += hash(bone.inherit_scale) + hashcode += hash(bone.length) + hashcode += hash(bone.local_location) + hashcode += hash(bone.multiply_vertexgroup_with_envelope) + hashcode += hash(bone.name) + if bone.parent != None: + hashcode += hash(bone.parent.name) + hashcode += hash(bone.select) + for num in bone.center: + hashcode += hash(num) + for child in bone.children: + hashcode += hash(bone.name) + for child in bone.children_recursive: + hashcode += hash(bone.name) + for num in bone.head: + hashcode += hash(num) + for num in bone.head_local: + hashcode += hash(num) + for layor in bone.layer: + hashcode += hash(layor.denominator) + hashcode += hash(layor.imag) + hashcode += hash(layor.real) + for vector in bone.matrix: + for num in vector: + hashcode += hash(num) + for vector in bone.matrix_local: + for num in vector: + hashcode += hash(num) + for item in bone.parent_recursive: + hashcode += hash(item.name) + for num in bone.tail: + hashcode += hash(num) + for num in bone.tail_local: + hashcode += hash(num) + for num in bone.vector: + hashcode += hash(num) + for num in bone.x_axis: + hashcode += hash(num) + for num in bone.y_axis: + hashcode += hash(num) print(hashcode) tests.hashfile.last_hash = hashcode return {'FINISHED'} Modified: branches/soc-2010-leifandersen/tests/CMakeLists.txt =================================================================== --- branches/soc-2010-leifandersen/tests/CMakeLists.txt 2010-08-05 17:19:57 UTC (rev 31074) +++ branches/soc-2010-leifandersen/tests/CMakeLists.txt 2010-08-05 17:26:16 UTC (rev 31075) @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** ENABLE_TESTING() -ADD_SUBDIRECTORY(pyunit) +ADD_SUBDIRECTORY(data) ADD_SUBDIRECTORY(export_import_testing) ADD_SUBDIRECTORY(physics) Copied: branches/soc-2010-leifandersen/tests/data (from rev 31051, branches/soc-2010-leifandersen/tests/pyunit) _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs