mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-14 08:16:03 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into 21660-updateNitpickForQuest
This commit is contained in:
commit
a8dba041a2
10 changed files with 68 additions and 34 deletions
|
@ -8,6 +8,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#include "AWSInterface.h"
|
||||
#include "common.h"
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QJsonDocument>
|
||||
|
@ -29,7 +30,9 @@ void AWSInterface::createWebPageFromResults(const QString& testResults,
|
|||
QCheckBox* updateAWSCheckBox,
|
||||
QRadioButton* diffImageRadioButton,
|
||||
QRadioButton* ssimImageRadionButton,
|
||||
QLineEdit* urlLineEdit
|
||||
QLineEdit* urlLineEdit,
|
||||
const QString& branch,
|
||||
const QString& user
|
||||
) {
|
||||
_workingDirectory = workingDirectory;
|
||||
|
||||
|
@ -53,6 +56,9 @@ void AWSInterface::createWebPageFromResults(const QString& testResults,
|
|||
_urlLineEdit = urlLineEdit;
|
||||
_urlLineEdit->setEnabled(false);
|
||||
|
||||
_branch = branch;
|
||||
_user = user;
|
||||
|
||||
QString zipFilenameWithoutExtension = zipFilename.split('.')[0];
|
||||
extractTestFailuresFromZippedFolder(_workingDirectory + "/" + zipFilenameWithoutExtension);
|
||||
|
||||
|
@ -202,13 +208,21 @@ void AWSInterface::writeTitle(QTextStream& stream, const QStringList& originalNa
|
|||
|
||||
stream << "run on " << hostName << "</h1>\n";
|
||||
|
||||
int numberOfFailures = originalNamesFailures.length();
|
||||
int numberOfSuccesses = originalNamesSuccesses.length();
|
||||
stream << "<h2>";
|
||||
stream << "nitpick " << nitpickVersion;
|
||||
stream << ", tests from GitHub: " << _user << "/" << _branch;
|
||||
stream << "</h2>";
|
||||
|
||||
stream << "<h2>" << QString::number(numberOfFailures) << " failed, out of a total of " << QString::number(numberOfSuccesses) << " tests</h2>\n";
|
||||
_numberOfFailures = originalNamesFailures.length();
|
||||
_numberOfSuccesses = originalNamesSuccesses.length();
|
||||
|
||||
stream << "<h2>" << QString::number(_numberOfFailures) << " failed, out of a total of " << QString::number(_numberOfFailures + _numberOfSuccesses) << " tests</h2>\n";
|
||||
|
||||
stream << "\t" << "\t" << "<font color=\"red\">\n";
|
||||
stream << "\t" << "\t" << "<h1>The following tests failed:</h1>";
|
||||
|
||||
if (_numberOfFailures > 0) {
|
||||
stream << "\t" << "\t" << "<h1>The following tests failed:</h1>";
|
||||
}
|
||||
}
|
||||
|
||||
void AWSInterface::writeTable(QTextStream& stream, const QStringList& originalNamesFailures, const QStringList& originalNamesSuccesses) {
|
||||
|
@ -289,7 +303,10 @@ void AWSInterface::writeTable(QTextStream& stream, const QStringList& originalNa
|
|||
|
||||
closeTable(stream);
|
||||
stream << "\t" << "\t" << "<font color=\"blue\">\n";
|
||||
stream << "\t" << "\t" << "<h1>The following tests passed:</h1>";
|
||||
|
||||
if (_numberOfSuccesses > 0) {
|
||||
stream << "\t" << "\t" << "<h1>The following tests passed:</h1>";
|
||||
}
|
||||
|
||||
// Now do the same for passes
|
||||
folderNames.clear();
|
||||
|
|
|
@ -31,7 +31,10 @@ public:
|
|||
QCheckBox* updateAWSCheckBox,
|
||||
QRadioButton* diffImageRadioButton,
|
||||
QRadioButton* ssimImageRadionButton,
|
||||
QLineEdit* urlLineEdit);
|
||||
QLineEdit* urlLineEdit,
|
||||
const QString& branch,
|
||||
const QString& user
|
||||
);
|
||||
|
||||
void extractTestFailuresFromZippedFolder(const QString& folderName);
|
||||
void createHTMLFile();
|
||||
|
@ -70,9 +73,13 @@ private:
|
|||
QString AWS_BUCKET{ "hifi-qa" };
|
||||
|
||||
QLineEdit* _urlLineEdit;
|
||||
|
||||
QString _user;
|
||||
QString _branch;
|
||||
|
||||
QString _comparisonImageFilename;
|
||||
|
||||
int _numberOfFailures;
|
||||
int _numberOfSuccesses;
|
||||
};
|
||||
|
||||
#endif // hifi_AWSInterface_h
|
|
@ -266,7 +266,7 @@ void Nitpick::on_createXMLScriptRadioButton_clicked() {
|
|||
}
|
||||
|
||||
void Nitpick::on_createWebPagePushbutton_clicked() {
|
||||
_testCreator->createWebPage(_ui.updateAWSCheckBox, _ui.diffImageRadioButton, _ui.ssimImageRadioButton, _ui.awsURLLineEdit);
|
||||
_testCreator->createWebPage(_ui.updateAWSCheckBox, _ui.diffImageRadioButton, _ui.ssimImageRadioButton, _ui.awsURLLineEdit, _ui.branchLineEdit->text(), _ui.userLineEdit->text());
|
||||
}
|
||||
|
||||
void Nitpick::about() {
|
||||
|
|
|
@ -1118,7 +1118,10 @@ void TestCreator::createWebPage(
|
|||
QCheckBox* updateAWSCheckBox,
|
||||
QRadioButton* diffImageRadioButton,
|
||||
QRadioButton* ssimImageRadionButton,
|
||||
QLineEdit* urlLineEdit
|
||||
QLineEdit* urlLineEdit,
|
||||
const QString& branch,
|
||||
const QString& user
|
||||
|
||||
) {
|
||||
QString testResults = QFileDialog::getOpenFileName(nullptr, "Please select the zipped test results to update from", nullptr,
|
||||
"Zipped TestCreator Results (TestResults--*.zip)");
|
||||
|
@ -1142,6 +1145,8 @@ void TestCreator::createWebPage(
|
|||
updateAWSCheckBox,
|
||||
diffImageRadioButton,
|
||||
ssimImageRadionButton,
|
||||
urlLineEdit
|
||||
urlLineEdit,
|
||||
branch,
|
||||
user
|
||||
);
|
||||
}
|
|
@ -107,7 +107,10 @@ public:
|
|||
QCheckBox* updateAWSCheckBox,
|
||||
QRadioButton* diffImageRadioButton,
|
||||
QRadioButton* ssimImageRadionButton,
|
||||
QLineEdit* urlLineEdit);
|
||||
QLineEdit* urlLineEdit,
|
||||
const QString& branch,
|
||||
const QString& user
|
||||
);
|
||||
|
||||
private:
|
||||
QProgressBar* _progressBar;
|
||||
|
|
|
@ -620,7 +620,7 @@
|
|||
<string><html><head/><body><p>If unchecked, will not show results during evaluation</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>usePreviousInstallation</string>
|
||||
<string>Use Previous Installation</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
|
@ -895,7 +895,7 @@
|
|||
<string><html><head/><body><p>If unchecked, will not show results during evaluation</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>usePreviousInstallation</string>
|
||||
<string>Use Previous Installation</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
|
|
|
@ -17,7 +17,7 @@ using System.Text.RegularExpressions;
|
|||
|
||||
class AvatarExporter : MonoBehaviour {
|
||||
// update version number for every PR that changes this file, also set updated version in README file
|
||||
static readonly string AVATAR_EXPORTER_VERSION = "0.3.6";
|
||||
static readonly string AVATAR_EXPORTER_VERSION = "0.3.7";
|
||||
|
||||
static readonly float HIPS_GROUND_MIN_Y = 0.01f;
|
||||
static readonly float HIPS_SPINE_CHEST_MIN_SEPARATION = 0.001f;
|
||||
|
@ -332,8 +332,7 @@ class AvatarExporter : MonoBehaviour {
|
|||
static List<string> alternateStandardShaderMaterials = new List<string>();
|
||||
static List<string> unsupportedShaderMaterials = new List<string>();
|
||||
|
||||
static Scene previewScene;
|
||||
static string previousScene = "";
|
||||
static SceneSetup[] previousSceneSetup;
|
||||
static Vector3 previousScenePivot = Vector3.zero;
|
||||
static Quaternion previousSceneRotation = Quaternion.identity;
|
||||
static float previousSceneSize = 0.0f;
|
||||
|
@ -1223,14 +1222,22 @@ class AvatarExporter : MonoBehaviour {
|
|||
}
|
||||
|
||||
static bool OpenPreviewScene() {
|
||||
// store the current scene setup to restore when closing the preview scene
|
||||
previousSceneSetup = EditorSceneManager.GetSceneManagerSetup();
|
||||
|
||||
// if the user is currently in the Humanoid Avatar Configuration then inform them to close it first
|
||||
if (EditorSceneManager.GetActiveScene().name == "Avatar Configuration" && previousSceneSetup.Length == 0) {
|
||||
EditorUtility.DisplayDialog("Error", "Please exit the Avatar Configuration before exporting.", "Ok");
|
||||
return false;
|
||||
}
|
||||
|
||||
// see if the user wants to save their current scene before opening preview avatar scene in place of user's scene
|
||||
if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// store the user's current scene to re-open when done and open a new default scene in place of the user's scene
|
||||
previousScene = EditorSceneManager.GetActiveScene().path;
|
||||
previewScene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene);
|
||||
// open a new empty scene in place of the user's scene
|
||||
EditorSceneManager.NewScene(NewSceneSetup.EmptyScene);
|
||||
|
||||
// instantiate a game object to preview the avatar and a game object for the height reference prefab at 0, 0, 0
|
||||
UnityEngine.Object heightReferenceResource = AssetDatabase.LoadAssetAtPath(HEIGHT_REFERENCE_PREFAB, typeof(UnityEngine.Object));
|
||||
|
@ -1259,13 +1266,8 @@ class AvatarExporter : MonoBehaviour {
|
|||
DestroyImmediate(avatarPreviewObject);
|
||||
DestroyImmediate(heightReferenceObject);
|
||||
|
||||
// re-open the scene the user had open before switching to the preview scene
|
||||
if (!string.IsNullOrEmpty(previousScene)) {
|
||||
EditorSceneManager.OpenScene(previousScene);
|
||||
}
|
||||
|
||||
// close the preview scene and flag it to be removed
|
||||
EditorSceneManager.CloseScene(previewScene, true);
|
||||
// restore to the previous scene setup that the user had open before exporting
|
||||
EditorSceneManager.RestoreSceneManagerSetup(previousSceneSetup);
|
||||
|
||||
// restore the camera pivot and rotation to the user's previous scene settings
|
||||
var sceneView = SceneView.lastActiveSceneView;
|
||||
|
|
|
@ -599,7 +599,7 @@ MeshRenderer:
|
|||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d1133891b03286946b3b0c63c1a57d08, type: 2}
|
||||
- {fileID: 2100000, guid: 83f430ba33ffd544bab7a13796246d30, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
|
@ -774,7 +774,7 @@ MeshRenderer:
|
|||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d1133891b03286946b3b0c63c1a57d08, type: 2}
|
||||
- {fileID: 2100000, guid: 83f430ba33ffd544bab7a13796246d30, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
|
@ -809,7 +809,7 @@ MeshRenderer:
|
|||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d1133891b03286946b3b0c63c1a57d08, type: 2}
|
||||
- {fileID: 2100000, guid: 83f430ba33ffd544bab7a13796246d30, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
|
@ -844,7 +844,7 @@ MeshRenderer:
|
|||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d1133891b03286946b3b0c63c1a57d08, type: 2}
|
||||
- {fileID: 2100000, guid: 83f430ba33ffd544bab7a13796246d30, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
|
@ -879,7 +879,7 @@ MeshRenderer:
|
|||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d1133891b03286946b3b0c63c1a57d08, type: 2}
|
||||
- {fileID: 2100000, guid: 83f430ba33ffd544bab7a13796246d30, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
High Fidelity, Inc.
|
||||
Avatar Exporter
|
||||
Version 0.3.6
|
||||
Version 0.3.7
|
||||
|
||||
Note: It is recommended to use Unity versions between 2017.4.17f1 and 2018.2.12f1 for this Avatar Exporter.
|
||||
Note: It is recommended to use Unity versions between 2017.4.15f1 and 2018.2.12f1 for this Avatar Exporter.
|
||||
|
||||
To create a new avatar project:
|
||||
1. Import your .fbx avatar model into your Unity project's Assets by either dragging and dropping the file into the Assets window or by using Assets menu > Import New Assets.
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue