Skip to content

Commit

Permalink
cts adjustments
Browse files Browse the repository at this point in the history
- FMax.py: adjust to using OpenCOLLADAImporter/OpenCOLLADAExporter
- StandardDataSets: fixing some python-scripts, having invalid copyright
in line1 (not as comment!)
- adding .gitignore (removing some temporary / run directories)
  • Loading branch information
GerhardMaier committed Feb 11, 2013
1 parent 9aa4b4d commit f30490d
Show file tree
Hide file tree
Showing 35 changed files with 2,444 additions and 2,436 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
ApplicationSettings/
PackagedResults/
TestProcedures/
*.pyc
8 changes: 6 additions & 2 deletions Scripts/FMax.py
Expand Up @@ -141,6 +141,7 @@ def RunScript(self):


"""Calls 3DS MAX to run the script.""" """Calls 3DS MAX to run the script."""
print ("start running " + os.path.basename(self.__script.name)) print ("start running " + os.path.basename(self.__script.name))
# print "XXXX"


returnValue = self.RunApplication(self.configDict["maxPath"] + returnValue = self.RunApplication(self.configDict["maxPath"] +
" -U MAXScript \"" + self.__script.name + "\"", " -U MAXScript \"" + self.__script.name + "\"",
Expand Down Expand Up @@ -179,7 +180,7 @@ def WriteImport(self, filename, logname, outputDir, settings, isAnimated, camera
if (FUtils.GetExtension(filename) == FMax.__EXTENSION[1:]): if (FUtils.GetExtension(filename) == FMax.__EXTENSION[1:]):
command = " loadMaxFile my_importfilename useFileUnits:true quiet:true\n" command = " loadMaxFile my_importfilename useFileUnits:true quiet:true\n"
else: else:
command = " importFile my_importfilename #noprompt\n" command = " importFile my_importfilename #noprompt using:OpenCOLLADAImporter\n"


cfgFilename = os.path.normpath( cfgFilename = os.path.normpath(
self.configDict["maxColladaExporterFilename"]) self.configDict["maxColladaExporterFilename"])
Expand Down Expand Up @@ -216,6 +217,7 @@ def WriteRender(self, logname, outputDir, settings, isAnimated, cameraRig, light
Implements FApplication.WriteRender() Implements FApplication.WriteRender()
""" """
# print ("cameraRig: " + str(cameraRig))
command = "try (\n render " command = "try (\n render "
for setting in settings: for setting in settings:
prettyName = setting.GetPrettyName() prettyName = setting.GetPrettyName()
Expand Down Expand Up @@ -266,6 +268,8 @@ def WriteRender(self, logname, outputDir, settings, isAnimated, cameraRig, light
if (value == ""): if (value == ""):
value = self.FindDefault(FMax.__RENDER_OPTIONS, value = self.FindDefault(FMax.__RENDER_OPTIONS,
setting.GetPrettyName()) setting.GetPrettyName())

# print ("prettyName: " + prettyName +" value: " + value)


command = (command + setting.GetCommand() + ":" + value + " ") command = (command + setting.GetCommand() + ":" + value + " ")


Expand Down Expand Up @@ -321,7 +325,7 @@ def WriteExport(self, logname, outputDir, settings, isAnimated, cameraRig, light
"try (\n" + "try (\n" +
options + options +
" outfile_name = \"" + output + "\"\n" + " outfile_name = \"" + output + "\"\n" +
" exportFile outfile_name #noprompt\n" + " exportFile outfile_name #noprompt using:OpenCOLLADAExporter\n" +
" print \"Export succeeded with " + output + "\"\n" + " print \"Export succeeded with " + output + "\"\n" +
") catch (\n" + ") catch (\n" +
" print \"Export error with " + output + "\"\n" + " print \"Export error with " + output + "\"\n" +
Expand Down
@@ -1,75 +1,75 @@
Copyright (C) 2007 - 2009 Khronos Group # Copyright (C) 2007 - 2009 Khronos Group


# Copyright (c) 2012 The Khronos Group Inc. # Copyright (c) 2012 The Khronos Group Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to
# the following conditions: # the following conditions:
# The above copyright notice and this permission notice shall be included # The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Materials. # in all copies or substantial portions of the Materials.
# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. # THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.


# See Core.Logic.FJudgementContext for the information # See Core.Logic.FJudgementContext for the information
# of the 'context' parameter. # of the 'context' parameter.
# #


# This sample judging object does the following: # This sample judging object does the following:
# #
# JudgeBaseline: verifies that app did not crash, the required steps have been performed, # JudgeBaseline: verifies that app did not crash, the required steps have been performed,
# the rendered images match, and the required element(s) has been preserved # the rendered images match, and the required element(s) has been preserved
# JudgeExemplary: returns Baseline status. # JudgeExemplary: returns Baseline status.
# JudgeSuperior: returns Baseline status. # JudgeSuperior: returns Baseline status.


# We import an assistant script that includes the common verifications # We import an assistant script that includes the common verifications
# methods. The assistant buffers its checks, so that running them again # methods. The assistant buffers its checks, so that running them again
# does not incurs an unnecessary performance hint. # does not incurs an unnecessary performance hint.
from StandardDataSets.scripts import JudgeAssistant from StandardDataSets.scripts import JudgeAssistant


# Please feed your node list here: # Please feed your node list here:
tagLst = [] tagLst = []
attrName = '' attrName = ''
attrVal = '' attrVal = ''
dataToCheck = '' dataToCheck = ''


class SimpleJudgingObject: class SimpleJudgingObject:
def __init__(self, _tagLst, _attrName, _attrVal, _data): def __init__(self, _tagLst, _attrName, _attrVal, _data):
self.tagList = _tagLst self.tagList = _tagLst
self.attrName = _attrName self.attrName = _attrName
self.attrVal = _attrVal self.attrVal = _attrVal
self.dataToCheck = _data self.dataToCheck = _data
self.status_baseline = False self.status_baseline = False
self.status_superior = False self.status_superior = False
self.status_exemplary = False self.status_exemplary = False
self.__assistant = JudgeAssistant.JudgeAssistant() self.__assistant = JudgeAssistant.JudgeAssistant()


def JudgeBaseline(self, context): def JudgeBaseline(self, context):
# No step should not crash # No step should not crash
self.__assistant.CheckCrashes(context) self.__assistant.CheckCrashes(context)


# Import/export/validate must exist and pass, while Render must only exist. # Import/export/validate must exist and pass, while Render must only exist.
self.__assistant.CheckSteps(context, ["Import", "Export", "Validate"], ["Render"]) self.__assistant.CheckSteps(context, ["Import", "Export", "Validate"], ["Render"])


if (self.__assistant.GetResults() == False): if (self.__assistant.GetResults() == False):
self.status_baseline = False self.status_baseline = False
return False return False


# Compare the rendered images # Compare the rendered images
self.__assistant.CompareRenderedImages(context) self.__assistant.CompareRenderedImages(context)


self.status_baseline = self.__assistant.DeferJudgement(context) self.status_baseline = self.__assistant.DeferJudgement(context)
return self.status_baseline return self.status_baseline


# To pass intermediate you need to pass basic, this object could also include additional # To pass intermediate you need to pass basic, this object could also include additional
# tests that were specific to the intermediate badge. # tests that were specific to the intermediate badge.
def JudgeSuperior(self, context): def JudgeSuperior(self, context):
self.status_superior = self.status_baseline self.status_superior = self.status_baseline
return self.status_superior return self.status_superior


# To pass advanced you need to pass intermediate, this object could also include additional # To pass advanced you need to pass intermediate, this object could also include additional
# tests that were specific to the advanced badge # tests that were specific to the advanced badge
def JudgeExemplary(self, context): def JudgeExemplary(self, context):
self.status_exemplary = self.status_superior self.status_exemplary = self.status_superior
return self.status_exemplary return self.status_exemplary


# This is where all the work occurs: "judgingObject" is an absolutely necessary token. # This is where all the work occurs: "judgingObject" is an absolutely necessary token.
# The dynamic loader looks very specifically for a class instance named "judgingObject". # The dynamic loader looks very specifically for a class instance named "judgingObject".
# #
judgingObject = SimpleJudgingObject(tagLst, attrName, attrVal, dataToCheck); judgingObject = SimpleJudgingObject(tagLst, attrName, attrVal, dataToCheck);
@@ -1,75 +1,75 @@
Copyright (C) 2007 - 2009 Khronos Group # Copyright (C) 2007 - 2009 Khronos Group


# Copyright (c) 2012 The Khronos Group Inc. # Copyright (c) 2012 The Khronos Group Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to
# the following conditions: # the following conditions:
# The above copyright notice and this permission notice shall be included # The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Materials. # in all copies or substantial portions of the Materials.
# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. # THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.


# See Core.Logic.FJudgementContext for the information # See Core.Logic.FJudgementContext for the information
# of the 'context' parameter. # of the 'context' parameter.
# #


# This sample judging object does the following: # This sample judging object does the following:
# #
# JudgeBaseline: verifies that app did not crash, the required steps have been performed, # JudgeBaseline: verifies that app did not crash, the required steps have been performed,
# the rendered images match, and the required element(s) has been preserved # the rendered images match, and the required element(s) has been preserved
# JudgeExemplary: returns Baseline status. # JudgeExemplary: returns Baseline status.
# JudgeSuperior: returns Baseline status. # JudgeSuperior: returns Baseline status.


# We import an assistant script that includes the common verifications # We import an assistant script that includes the common verifications
# methods. The assistant buffers its checks, so that running them again # methods. The assistant buffers its checks, so that running them again
# does not incurs an unnecessary performance hint. # does not incurs an unnecessary performance hint.
from StandardDataSets.scripts import JudgeAssistant from StandardDataSets.scripts import JudgeAssistant


# Please feed your node list here: # Please feed your node list here:
tagLst = [] tagLst = []
attrName = '' attrName = ''
attrVal = '' attrVal = ''
dataToCheck = '' dataToCheck = ''


class SimpleJudgingObject: class SimpleJudgingObject:
def __init__(self, _tagLst, _attrName, _attrVal, _data): def __init__(self, _tagLst, _attrName, _attrVal, _data):
self.tagList = _tagLst self.tagList = _tagLst
self.attrName = _attrName self.attrName = _attrName
self.attrVal = _attrVal self.attrVal = _attrVal
self.dataToCheck = _data self.dataToCheck = _data
self.status_baseline = False self.status_baseline = False
self.status_superior = False self.status_superior = False
self.status_exemplary = False self.status_exemplary = False
self.__assistant = JudgeAssistant.JudgeAssistant() self.__assistant = JudgeAssistant.JudgeAssistant()


def JudgeBaseline(self, context): def JudgeBaseline(self, context):
# No step should not crash # No step should not crash
self.__assistant.CheckCrashes(context) self.__assistant.CheckCrashes(context)


# Import/export/validate must exist and pass, while Render must only exist. # Import/export/validate must exist and pass, while Render must only exist.
self.__assistant.CheckSteps(context, ["Import", "Export", "Validate"], ["Render"]) self.__assistant.CheckSteps(context, ["Import", "Export", "Validate"], ["Render"])


if (self.__assistant.GetResults() == False): if (self.__assistant.GetResults() == False):
self.status_baseline = False self.status_baseline = False
return False return False


# Compare the rendered images # Compare the rendered images
self.__assistant.CompareRenderedImages(context) self.__assistant.CompareRenderedImages(context)


self.status_baseline = self.__assistant.DeferJudgement(context) self.status_baseline = self.__assistant.DeferJudgement(context)
return self.status_baseline return self.status_baseline


# To pass intermediate you need to pass basic, this object could also include additional # To pass intermediate you need to pass basic, this object could also include additional
# tests that were specific to the intermediate badge. # tests that were specific to the intermediate badge.
def JudgeSuperior(self, context): def JudgeSuperior(self, context):
self.status_superior = self.status_baseline self.status_superior = self.status_baseline
return self.status_superior return self.status_superior


# To pass advanced you need to pass intermediate, this object could also include additional # To pass advanced you need to pass intermediate, this object could also include additional
# tests that were specific to the advanced badge # tests that were specific to the advanced badge
def JudgeExemplary(self, context): def JudgeExemplary(self, context):
self.status_exemplary = self.status_superior self.status_exemplary = self.status_superior
return self.status_exemplary return self.status_exemplary


# This is where all the work occurs: "judgingObject" is an absolutely necessary token. # This is where all the work occurs: "judgingObject" is an absolutely necessary token.
# The dynamic loader looks very specifically for a class instance named "judgingObject". # The dynamic loader looks very specifically for a class instance named "judgingObject".
# #
judgingObject = SimpleJudgingObject(tagLst, attrName, attrVal, dataToCheck); judgingObject = SimpleJudgingObject(tagLst, attrName, attrVal, dataToCheck);

0 comments on commit f30490d

Please sign in to comment.