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

Leif Andersen leif.a.andersen at gmail.com
Tue Jun 22 20:52:34 CEST 2010


Revision: 29628
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29628
Author:   leifandersen
Date:     2010-06-22 20:52:34 +0200 (Tue, 22 Jun 2010)

Log Message:
-----------
1.  A bit more tinkering with the GUI.

2.  Fixed the CMake syntax so it should work with CMake v2.6, as well as v2.8

Modified Paths:
--------------
    branches/soc-2010-leifandersen/tests/pyunit/ops/physics/CMakeLists.txt

Added Paths:
-----------
    branches/soc-2010-leifandersen/tests/TestPanel.py

Added: branches/soc-2010-leifandersen/tests/TestPanel.py
===================================================================
--- branches/soc-2010-leifandersen/tests/TestPanel.py	                        (rev 0)
+++ branches/soc-2010-leifandersen/tests/TestPanel.py	2010-06-22 18:52:34 UTC (rev 29628)
@@ -0,0 +1,53 @@
+class hashcode(bpy.types.Operator):
+    bl_idname = "Hashcode"
+    bl_label = "Hashcode"
+    
+    def poll(self, context):
+        return True
+    
+    def execute(self, context):
+        print("Foobarred")
+        return {'FINISHED'}
+
+    def invoke(self, context, event):
+        wm = context.manager
+        wm.add_fileselect(self)
+        print("Selecting file")
+        return {'RUNNING_MODAL'}
+
+
+class hashpanel(bpy.types.Panel):
+    bl_space_type = 'VIEW_3D'
+    bl_region_type = 'TOOLS'
+    bl_label = "Testing Tools"
+
+    def draw(self, context):
+        layout = self.layout
+        row = layout.row()
+#        row.label(text="Render")
+#        row.operator_context = 'INVOKE_REGION_WIN'
+        row.operator('Hashcode', text = "Foo")
+	
+classes = [
+    hashcode,
+    hashpanel,
+]
+
+#Note used, there for notes while writing.
+#def menu_func(self, context):
+#    default_path = bpy.data.filename.replace(".blend", ".off")
+#    self.layout.operator(ExportOFF.bl_idname, text="Object File Format (.off)").path = default_path
+
+
+def register():
+    for i in classes:
+        bpy.types.register(i)
+        #bpy.types.INFO_MT_file_export.append(menu_func)
+
+def unregister():
+    for i in classes:
+        bpy.types.unregister(i)
+        #bpy.types.INFO_MT_file_export.remove(menu_func)
+
+if __name__ == '__main__':
+    register()
\ No newline at end of file

Modified: branches/soc-2010-leifandersen/tests/pyunit/ops/physics/CMakeLists.txt
===================================================================
--- branches/soc-2010-leifandersen/tests/pyunit/ops/physics/CMakeLists.txt	2010-06-22 18:36:30 UTC (rev 29627)
+++ branches/soc-2010-leifandersen/tests/pyunit/ops/physics/CMakeLists.txt	2010-06-22 18:52:34 UTC (rev 29628)
@@ -1,7 +1,6 @@
 ADD_TEST(Ops_Particle_Test ${Blender_BINARY_DIR}/bin/blender -P ${Blender_BINARY_DIR}/tests/pyunit/ops/physics/particle.py)
 
-ADD_TEST(NAME Ops_Particle_Test_Image_Compare
-	COMMAND ${CMAKE_COMMAND} -P ${Blender_BINARY_DIR}/tests/pyunit/ops/physics/runtests.cmake
+ADD_TEST(Ops_Particle_Test_Image_Compare ${CMAKE_COMMAND} -P ${Blender_BINARY_DIR}/tests/pyunit/ops/physics/runtests.cmake
 )
 
 SET_TESTS_PROPERTIES(Ops_Particle_Test Ops_Particle_Test_Image_Compare 





More information about the Bf-blender-cvs mailing list