[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30858] branches/soc-2010-leifandersen: 1.
Leif Andersen
leif.a.andersen at gmail.com
Thu Jul 29 03:29:43 CEST 2010
Revision: 30858
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30858
Author: leifandersen
Date: 2010-07-29 03:29:42 +0200 (Thu, 29 Jul 2010)
Log Message:
-----------
1. Removed the render_all operators, they didn't work properly and possibly pointless anyway.
2. Improved the other tests operators.
3. I *think* I fixed the CMake script for windows...but I don't have an environment to test it on.
4. Removed the hash functionality from the code altogether, it really made things ugly, and won't be done in time for the end of the project anyway (and was possibly quite pointless too).
Modified Paths:
--------------
branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
branches/soc-2010-leifandersen/release/scripts/op/tests_render.py
branches/soc-2010-leifandersen/release/scripts/ui/space_tests.py
branches/soc-2010-leifandersen/source/creator/CMakeLists.txt
Modified: branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py 2010-07-29 01:16:40 UTC (rev 30857)
+++ branches/soc-2010-leifandersen/release/scripts/op/tests_hash.py 2010-07-29 01:29:42 UTC (rev 30858)
@@ -23,6 +23,7 @@
return len(bpy.data.scenes) > 0
def execute(self, context):
+ tests.hashfile.last_hash = "Working"
hashcode = 0
for scene in bpy.data.scenes:
hashcode += hash(scene.name)
@@ -60,8 +61,8 @@
tests.hashfile.last_hash = hashcode
return {'FINISHED'}
-# def invoke(self, context, event):
-# return {'RUNNING_MODAL'}
+ def invoke(self, context, event):
+ return {'RUNNING_MODAL'}
classes = [
TESTS_OT_hash,
Modified: branches/soc-2010-leifandersen/release/scripts/op/tests_render.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/op/tests_render.py 2010-07-29 01:16:40 UTC (rev 30857)
+++ branches/soc-2010-leifandersen/release/scripts/op/tests_render.py 2010-07-29 01:29:42 UTC (rev 30858)
@@ -29,10 +29,11 @@
return True
def execute(self, context):
+ tests.render.status = "Working"
(directory, filename) = os.path.split(self.properties.filepath)
command = PYTHON_BIN + " " + IMAGEDIFF_PY + " --image " + self.properties.filepath + " --blender-bin " + BLENDER_BIN
print(os.system(command))
- tests.render.status = "Run"
+ tests.render.status = "Finished"
return {'FINISHED'}
def invoke(self, context, event):
@@ -40,34 +41,6 @@
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
-
-class TESTS_OT_render_all(bpy.types.Operator):
- ''''''
- bl_idname = "TESTS_OT_render_all"
- bl_label = "All Render Tests"
-
- filename = StringProperty(name="File Name", description="File name used", maxlen= 1024, default= "")
- filepath = StringProperty(name="File Path", description="Filepath used", maxlen= 1024, default= "")
- directory = StringProperty(name="File Directory", description="File Directory used", maxlen= 1024, default= "")
-
- def poll(self, context):
- return True
-
- def execute(self, context):
- test_passed = True
- (directory, filename) = os.path.split(self.properties.filepath)
- for file in os.listdir(directory):
- if file.find('.blend') != -1:
- bpy.ops.tests.render(filepath=self.properties.filepath)
- if test_passed and tests.render.status == "Not Run":
- tests_passed = False
- return {'FINISHED'}
-
- def invoke(self, context,event):
- wm = context.manager
- wm.add_fileselect(self)
- return {'RUNNING_MODAL'}
-
class TESTS_OT_anim(bpy.types.Operator):
''''''
bl_idname = "TESTS_OT_anim"
@@ -81,10 +54,11 @@
return True
def execute(self, context):
+ tests.render.status = "Working"
(directory, filename) = os.path.split(self.properties.filepath)
command = PYTHON_BIN + " " + IMAGEDIFF_PY + " --animation " + self.properties.filepath + " --blender-bin " + BLENDER_BIN
print(os.system(command))
- tests.render.status = "Run"
+ tests.render.status = "Finished"
return {'FINISHED'}
def invoke(self, context, event):
@@ -105,10 +79,11 @@
return True
def execute(self, context):
+ tests.render.status = "Working"
(directory, filename) = os.path.split(self.properties.filepath)
command = PYTHON_BIN + " " + IMAGEDIFF_PY + " --build-tests --image " + self.properties.filepath + " --blender-bin " + BLENDER_BIN
print(os.system(command))
- tests.render.status = "Run"
+ tests.render.status = "Finished"
return {'FINISHED'}
def invoke(self, context, event):
@@ -116,33 +91,6 @@
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
-class TESTS_OT_render_all_build(bpy.types.Operator):
- ''''''
- bl_idname = "TESTS_OT_render_all_build"
- bl_label = "Animation Render Test"
-
- filename = StringProperty(name="File Name", description="File name used", maxlen= 1024, default= "")
- filepath = StringProperty(name="File Path", description="Filepath used", maxlen= 1024, default= "")
- directory = StringProperty(name="File Directory", description="File Directory used", maxlen= 1024, default= "")
-
- def poll(self, context):
- return True
-
- def execute(self, context):
- test_passed = True
- (directory, filename) = os.path.split(self.properties.filepath)
- for file in os.listdir(directory):
- if file.find('.blend') != -1:
- bpy.ops.tests.render_build(filepath=self.properties.filepath)
- if test_passed and tests.render.status == "Not Run":
- tests_passed = False
- return {'FINISHED'}
-
- def invoke(self, context,event):
- wm = context.manager
- wm.add_fileselect(self)
- return {'RUNNING_MODAL'}
-
class TESTS_OT_anim_build(bpy.types.Operator):
''''''
bl_idname = "TESTS_OT_anim_build"
@@ -156,10 +104,11 @@
return True
def execute(self, context):
+ tests.render.status = "Working"
(directory, filename) = os.path.split(self.properties.filepath)
command = PYTHON_BIN + " " + IMAGEDIFF_PY + " --build-tests --animation " + self.properties.filepath + " --blender-bin " + BLENDER_BIN
print(os.system(command))
- tests.render.status = "Run"
+ tests.render.status = "Finished"
return {'FINISHED'}
def invoke(self, context, event):
@@ -169,10 +118,8 @@
classes = [
TESTS_OT_render,
- TESTS_OT_render_all,
TESTS_OT_anim,
TESTS_OT_render_build,
- TESTS_OT_render_all_build,
TESTS_OT_anim_build,
]
Modified: branches/soc-2010-leifandersen/release/scripts/ui/space_tests.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/ui/space_tests.py 2010-07-29 01:16:40 UTC (rev 30857)
+++ branches/soc-2010-leifandersen/release/scripts/ui/space_tests.py 2010-07-29 01:29:42 UTC (rev 30858)
@@ -8,13 +8,13 @@
def draw(self, context):
layout = self.layout
-# layout.operator_context = 'EXEC_AREA'
-# layout.operator_context = 'INVOKE_AREA'
layout.operator("TESTS_OT_render", text="Render Test")
- layout.operator("TESTS_OT_render_all", text="All Render Tests")
layout.operator("TESTS_OT_anim", text="Animation Test")
layout.operator("RENDER_OT_render", text="Render")
layout.separator()
+ layout.operator("TESTS_OT_render_build", text="Build Render Test")
+ layout.operator("TESTS_OT_anim_build", text="Build Animation Test")
+ layout.separator()
layout.operator("TESTS_OT_hash", text="File Hash")
class TestsPanel(bpy.types.Panel):
@@ -25,7 +25,6 @@
def draw(self, context):
layout = self.layout
row = layout.row()
-# row.operator_context = 'INVOKE_REGION_WIN'
row.label(text="Blend hashcode: " + str(tests.hashfile.last_hash))
row = layout.row()
row.operator('TESTS_OT_hash', text = "Get Hash")
@@ -35,8 +34,6 @@
row = layout.row()
row.operator("TESTS_OT_render", text="Render Test")
row = layout.row()
- row.operator("TESTS_OT_render_all", text="All Render Tests")
- row = layout.row()
row.operator("TESTS_OT_anim", text="Animation Test")
row = layout.row()
row.operator("RENDER_OT_render", text="Render")
@@ -46,8 +43,6 @@
row.label(text="Build Tests")
row = layout.row()
row.operator("TESTS_OT_render_build", text="Image")
- row.operator("TESTS_OT_render_all_build", text="All Images")
- row = layout.row()
row.operator("TESTS_OT_anim_build", text="Animations")
classes = [
Modified: branches/soc-2010-leifandersen/source/creator/CMakeLists.txt
===================================================================
--- branches/soc-2010-leifandersen/source/creator/CMakeLists.txt 2010-07-29 01:16:40 UTC (rev 30857)
+++ branches/soc-2010-leifandersen/source/creator/CMakeLists.txt 2010-07-29 01:29:42 UTC (rev 30858)
@@ -388,7 +388,7 @@
ADD_CUSTOM_COMMAND(TARGET blender POST_BUILD MAIN_DEPENDANCY blender
COMMENT "copying blender tests..."
COMMAND xcopy /E /Y \"${Blender_SOURCE_DIR}\tests\" \"${Blender_BINARY_DIR}\"
- COMMAND copy /Y \"${Blender_SOURCE_DIR}\tests\render\run.py\" \"${Blender_BINARY_DIR}\bin\imagediff.py\"
+ COMMAND copy /Y \"${Blender_SOURCE_DIR}\\tests\\render\\run.py\" \"${Blender_BINARY_DIR}\\bin\\imagediff.py\\\"
)
ENDIF(WITH_TESTS)
More information about the Bf-blender-cvs
mailing list