Skip to content

Commit

Permalink
Migrate code to use Make* functions (ezEngine#1022)
Browse files Browse the repository at this point in the history
This changes all EZ code to make use of the new Make functions. The old functions have not yet been removed, so existing user code continues to compile with this change, but internally EZ makes no use of the old functions anymore.

Since the [[deprecated]] attribute is utter rubbish with MSVC (with warnings as errors you just get errors, you can't disable that), I probably won't enable it, but rather the next PR will actually remove the old functions. Though that is yet up for discussion.
  • Loading branch information
jankrassnigg authored Aug 3, 2023
1 parent ea2e284 commit c42cf1d
Show file tree
Hide file tree
Showing 637 changed files with 2,918 additions and 3,115 deletions.
4 changes: 2 additions & 2 deletions Code/Editor/EditorEngineProcess/EngineProcGameApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void ezEngineProcessGameApplication::AfterCoreSystemsStartup()

DisableErrorReport();

ezTaskSystem::SetTargetFrameTime(ezTime::Seconds(1.0 / 20.0));
ezTaskSystem::SetTargetFrameTime(ezTime::MakeFromSeconds(1.0 / 20.0));

ConnectToHost();
}
Expand Down Expand Up @@ -97,7 +97,7 @@ void ezEngineProcessGameApplication::WaitForDebugger()
{
while (!ezSystemInformation::IsDebuggerAttached())
{
ezThreadUtils::Sleep(ezTime::Milliseconds(10));
ezThreadUtils::Sleep(ezTime::MakeFromMilliseconds(10));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ void ezEngineProcessDocumentContext::DestroyDocumentContext(ezUuid guid)

ezBoundingBoxSphere ezEngineProcessDocumentContext::GetWorldBounds(ezWorld* pWorld)
{
ezBoundingBoxSphere bounds;
bounds.SetInvalid();
ezBoundingBoxSphere bounds = ezBoundingBoxSphere::MakeInvalid();

{
EZ_LOCK(pWorld->GetReadMarker());
Expand All @@ -88,7 +87,7 @@ ezBoundingBoxSphere ezEngineProcessDocumentContext::GetWorldBounds(ezWorld* pWor
}

if (!bounds.IsValid())
bounds = ezBoundingBoxSphere(ezVec3::ZeroVector(), ezVec3(1, 1, 1), 2);
bounds = ezBoundingBoxSphere::MakeFromCenterExtents(ezVec3::MakeZero(), ezVec3(1, 1, 1), 2);

return bounds;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ bool ezEngineProcessViewContext::FocusCameraOnObject(ezCamera& inout_camera, con
ezVec3 vCameraPos = inout_camera.GetCenterPosition();
ezVec3 vCenterPos = objectBounds.GetSphere().m_vCenter;

const float fDist = ezMath::Max(0.1f, objectBounds.GetSphere().m_fRadius) / ezMath::Sin(ezAngle::Degree(fFov / 2));
const float fDist = ezMath::Max(0.1f, objectBounds.GetSphere().m_fRadius) / ezMath::Sin(ezAngle::MakeFromDegree(fFov / 2));
vDir.Normalize();
ezVec3 vNewCameraPos = vCenterPos - vDir * fDist;
if (!vNewCameraPos.IsEqual(vCameraPos, 0.01f))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ void ezEngineViewLightSettings::UpdateForEngine(ezWorld* pWorld)
const bool bNeedGameObject = m_bDirectionalLight | m_bSkyLight;
if (ezGameObject* pParent = SyncGameObject(m_pWorld, m_hGameObject, bNeedGameObject))
{
ezQuat rot;
rot.SetFromAxisAndAngle(ezVec3(0.0f, 1.0f, 0.0f), m_DirectionalLightAngle + ezAngle::Degree(90.0));
ezQuat rot = ezQuat::MakeFromAxisAndAngle(ezVec3(0.0f, 1.0f, 0.0f), m_DirectionalLightAngle + ezAngle::MakeFromDegree(90.0));
pParent->SetLocalRotation(rot);

if (ezDirectionalLightComponent* pDirLight = SyncComponent<ezDirectionalLightComponent>(m_pWorld, pParent, m_hDirLight, m_bDirectionalLight))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class EZ_EDITORENGINEPROCESSFRAMEWORK_DLL ezEngineViewLightSettings : public ezE
float m_fSkyLightIntensity = 1.0f;

bool m_bDirectionalLight = true;
ezAngle m_DirectionalLightAngle = ezAngle::Degree(30.0f);
ezAngle m_DirectionalLightAngle = ezAngle::MakeFromDegree(30.0f);
bool m_bDirectionalLightShadows = false;
float m_fDirectionalLightIntensity = 10.0f;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ void ezGizmoHandle::SetTransformation(const ezTransform& m)

void ezGizmoHandle::SetTransformation(const ezMat4& m)
{
ezTransform t;
t.SetFromMat4(m);
ezTransform t = ezTransform::MakeFromMat4(m);
SetTransformation(t);
}

Expand Down Expand Up @@ -96,7 +95,7 @@ static ezMeshBufferResourceHandle CreateMeshBufferArrow()
const float fLength = 1.0f;

ezGeometry::GeoOptions opt;
opt.m_Transform.SetRotationMatrixY(ezAngle::Degree(90));
opt.m_Transform = ezMat4::MakeRotationY(ezAngle::MakeFromDegree(90));

ezGeometry geom;
geom.AddCylinderOnePiece(fThickness, fThickness, fLength * 0.5f, fLength * 0.5f, 16, opt);
Expand All @@ -120,7 +119,7 @@ static ezMeshBufferResourceHandle CreateMeshBufferPiston()
const float fLength = 1.0f;

ezGeometry::GeoOptions opt;
opt.m_Transform.SetRotationMatrixY(ezAngle::Degree(90));
opt.m_Transform = ezMat4::MakeRotationY(ezAngle::MakeFromDegree(90));

ezGeometry geom;
geom.AddCylinderOnePiece(fThickness, fThickness, fLength * 0.5f, fLength * 0.5f, 16, opt);
Expand All @@ -144,7 +143,7 @@ static ezMeshBufferResourceHandle CreateMeshBufferHalfPiston()
const float fLength = 1.0f;

ezGeometry::GeoOptions opt;
opt.m_Transform.SetRotationMatrixY(ezAngle::Degree(90));
opt.m_Transform = ezMat4::MakeRotationY(ezAngle::MakeFromDegree(90));
opt.m_Transform.SetTranslationVector(ezVec3(fLength * 0.5f, 0, 0));

ezGeometry geom;
Expand Down Expand Up @@ -310,11 +309,11 @@ static ezMeshBufferResourceHandle CreateMeshBufferBoxFaces()

ezGeometry geom;
ezGeometry::GeoOptions opt;
opt.m_Transform.SetTranslationMatrix(ezVec3(0, 0, 0.5f));
opt.m_Transform = ezMat4::MakeTranslation(ezVec3(0, 0, 0.5f));

geom.AddRectXY(ezVec2(0.5f), 1, 1, opt);

opt.m_Transform.SetRotationMatrixY(ezAngle::Degree(180.0));
opt.m_Transform = ezMat4::MakeRotationY(ezAngle::MakeFromDegree(180.0));
opt.m_Transform.SetTranslationVector(ezVec3(0, 0, -0.5f));
geom.AddRectXY(ezVec2(0.5f), 1, 1, opt);

Expand All @@ -337,13 +336,13 @@ static ezMeshBufferResourceHandle CreateMeshBufferBoxEdges()

for (ezUInt32 i = 0; i < 4; ++i)
{
rot.SetRotationMatrixY(ezAngle::Degree(90.0f * i));
rot = ezMat4::MakeRotationY(ezAngle::MakeFromDegree(90.0f * i));

opt.m_Transform.SetTranslationMatrix(ezVec3(0.5f - 0.125f, 0, 0.5f));
opt.m_Transform = ezMat4::MakeTranslation(ezVec3(0.5f - 0.125f, 0, 0.5f));
opt.m_Transform = rot * opt.m_Transform;
geom.AddRectXY(ezVec2(0.25f, 0.5f), 1, 1, opt);

opt.m_Transform.SetTranslationMatrix(ezVec3(-0.5f + 0.125f, 0, 0.5f));
opt.m_Transform = ezMat4::MakeTranslation(ezVec3(-0.5f + 0.125f, 0, 0.5f));
geom.AddRectXY(ezVec2(0.25f, 0.5f), 1, 1, opt);
}

Expand All @@ -361,30 +360,30 @@ static ezMeshBufferResourceHandle CreateMeshBufferBoxCorners()

ezMat4 rot[6];
rot[0].SetIdentity();
rot[1].SetRotationMatrixX(ezAngle::Degree(90));
rot[2].SetRotationMatrixX(ezAngle::Degree(180));
rot[3].SetRotationMatrixX(ezAngle::Degree(270));
rot[4].SetRotationMatrixY(ezAngle::Degree(90));
rot[5].SetRotationMatrixY(ezAngle::Degree(-90));
rot[1] = ezMat4::MakeRotationX(ezAngle::MakeFromDegree(90));
rot[2] = ezMat4::MakeRotationX(ezAngle::MakeFromDegree(180));
rot[3] = ezMat4::MakeRotationX(ezAngle::MakeFromDegree(270));
rot[4] = ezMat4::MakeRotationY(ezAngle::MakeFromDegree(90));
rot[5] = ezMat4::MakeRotationY(ezAngle::MakeFromDegree(-90));

ezGeometry geom;
ezGeometry::GeoOptions opt;

for (ezUInt32 i = 0; i < 6; ++i)
{
opt.m_Transform.SetTranslationMatrix(ezVec3(0.5f - 0.125f, 0.5f - 0.125f, 0.5f));
opt.m_Transform = ezMat4::MakeTranslation(ezVec3(0.5f - 0.125f, 0.5f - 0.125f, 0.5f));
opt.m_Transform = rot[i] * opt.m_Transform;
geom.AddRectXY(ezVec2(0.25f, 0.25f), 1, 1, opt);

opt.m_Transform.SetTranslationMatrix(ezVec3(0.5f - 0.125f, -0.5f + 0.125f, 0.5f));
opt.m_Transform = ezMat4::MakeTranslation(ezVec3(0.5f - 0.125f, -0.5f + 0.125f, 0.5f));
opt.m_Transform = rot[i] * opt.m_Transform;
geom.AddRectXY(ezVec2(0.25f, 0.25f), 1, 1, opt);

opt.m_Transform.SetTranslationMatrix(ezVec3(-0.5f + 0.125f, 0.5f - 0.125f, 0.5f));
opt.m_Transform = ezMat4::MakeTranslation(ezVec3(-0.5f + 0.125f, 0.5f - 0.125f, 0.5f));
opt.m_Transform = rot[i] * opt.m_Transform;
geom.AddRectXY(ezVec2(0.25f, 0.25f), 1, 1, opt);

opt.m_Transform.SetTranslationMatrix(ezVec3(-0.5f + 0.125f, -0.5f + 0.125f, 0.5f));
opt.m_Transform = ezMat4::MakeTranslation(ezVec3(-0.5f + 0.125f, -0.5f + 0.125f, 0.5f));
opt.m_Transform = rot[i] * opt.m_Transform;
geom.AddRectXY(ezVec2(0.25f, 0.25f), 1, 1, opt);
}
Expand All @@ -402,7 +401,7 @@ static ezMeshBufferResourceHandle CreateMeshBufferCone()
return hMesh;

ezGeometry::GeoOptions opt;
opt.m_Transform.SetRotationMatrixY(ezAngle::Degree(270.0f));
opt.m_Transform = ezMat4::MakeRotationY(ezAngle::MakeFromDegree(270.0f));
opt.m_Transform.SetTranslationVector(ezVec3(1.0f, 0, 0));

ezGeometry geom;
Expand Down Expand Up @@ -458,7 +457,7 @@ static ezMeshBufferResourceHandle CreateMeshBufferFromFile(const char* szFile)
ezGeometry geom;
for (ezUInt32 v = 0; v < obj.m_Positions.GetCount(); ++v)
{
geom.AddVertex(obj.m_Positions[v], ezVec3::ZeroVector(), ezVec2::ZeroVector(), ezColor::White);
geom.AddVertex(obj.m_Positions[v], ezVec3::MakeZero(), ezVec2::MakeZero(), ezColor::White);
}

ezStaticArray<ezUInt32, 3> triangle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ ezResult ezProcessCommunicationChannel::WaitForMessage(const ezRTTI* pMessageTyp
{
ezTime tTimeLeft = timeout - (ezTime::Now() - tStart);

if (tTimeLeft < ezTime::Zero())
if (tTimeLeft < ezTime::MakeZero())
{
m_pWaitForMessageType = nullptr;
ezLog::Dev("Reached time-out of {0} seconds while waiting for {1}", ezArgF(timeout.GetSeconds(), 1), pMessageType->GetTypeName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ EZ_END_DYNAMIC_REFLECTED_TYPE;

ezEditorEngineSyncObject::ezEditorEngineSyncObject()
{
m_SyncObjectGuid.CreateNewUuid();
m_SyncObjectGuid = ezUuid::MakeUuid();
m_bModified = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void ezLongOpControllerManager::RegisterLongOp(const ezUuid& documentGuid, const
auto& opInfo = *opInfoPtr;
opInfo.m_DocumentGuid = documentGuid;
opInfo.m_ComponentGuid = componentGuid;
opInfo.m_OperationGuid.CreateNewUuid();
opInfo.m_OperationGuid = ezUuid::MakeUuid();

opInfo.m_pProxyOp = pRtti->GetAllocator()->Allocate<ezLongOpProxy>();
opInfo.m_pProxyOp->InitializeRegistered(documentGuid, componentGuid);
Expand Down Expand Up @@ -205,7 +205,7 @@ void ezLongOpControllerManager::CancelAndRemoveAllOpsForDocument(const ezUuid& d

if (bOperationsStillActive)
{
ezThreadUtils::Sleep(ezTime::Milliseconds(100));
ezThreadUtils::Sleep(ezTime::MakeFromMilliseconds(100));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ void ezPickingRenderPass::ReadBackPropertiesSinglePick(ezView* pView)
ezGraphicsUtils::ConvertScreenPosToWorldPos(m_mPickingInverseViewProjectionMatrix, 0, 0, m_uiWindowWidth, m_uiWindowHeight, ezVec3((float)x, (float)(m_uiWindowHeight - (y + 1)), fOtherDepths[2]), vOtherPos[2]).IgnoreResult();
ezGraphicsUtils::ConvertScreenPosToWorldPos(m_mPickingInverseViewProjectionMatrix, 0, 0, m_uiWindowWidth, m_uiWindowHeight, ezVec3((float)x, (float)(m_uiWindowHeight - (y - 1)), fOtherDepths[3]), vOtherPos[3]).IgnoreResult();

vNormals[0] = ezPlane(vPickedPosition, vOtherPos[0], vOtherPos[2]).m_vNormal;
vNormals[1] = ezPlane(vPickedPosition, vOtherPos[2], vOtherPos[1]).m_vNormal;
vNormals[2] = ezPlane(vPickedPosition, vOtherPos[1], vOtherPos[3]).m_vNormal;
vNormals[3] = ezPlane(vPickedPosition, vOtherPos[3], vOtherPos[0]).m_vNormal;
vNormals[0] = ezPlane::MakeFromPoints(vPickedPosition, vOtherPos[0], vOtherPos[2]).m_vNormal;
vNormals[1] = ezPlane::MakeFromPoints(vPickedPosition, vOtherPos[2], vOtherPos[1]).m_vNormal;
vNormals[2] = ezPlane::MakeFromPoints(vPickedPosition, vOtherPos[1], vOtherPos[3]).m_vNormal;
vNormals[3] = ezPlane::MakeFromPoints(vPickedPosition, vOtherPos[3], vOtherPos[0]).m_vNormal;

vNormal = (vNormals[0] + vNormals[1] + vNormals[2] + vNormals[3]).GetNormalized();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ void ezProjectAction::Execute(const ezVariant& value)

case ezProjectAction::ButtonType::ReloadResources:
{
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage("Reloading Resources...", ezTime::Seconds(5));
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage("Reloading Resources...", ezTime::MakeFromSeconds(5));

ezSimpleConfigMsgToEngine msg;
msg.m_sWhatToDo = "ReloadResources";
Expand All @@ -699,7 +699,7 @@ void ezProjectAction::Execute(const ezVariant& value)

case ezProjectAction::ButtonType::LaunchFileserve:
{
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage("Launching FileServe...", ezTime::Seconds(5));
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage("Launching FileServe...", ezTime::MakeFromSeconds(5));

ezQtLaunchFileserveDlg dlg(nullptr);
dlg.exec();
Expand All @@ -708,7 +708,7 @@ void ezProjectAction::Execute(const ezVariant& value)

case ezProjectAction::ButtonType::LaunchInspector:
{
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage("Launching ezInspector...", ezTime::Seconds(5));
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage("Launching ezInspector...", ezTime::MakeFromSeconds(5));

ezQtEditorApp::GetSingleton()->RunInspector();
}
Expand Down Expand Up @@ -762,7 +762,7 @@ void ezProjectAction::Execute(const ezVariant& value)
};
ezProcessCommunicationChannel::WaitForMessageCallback cb = callback;

if (ezEditorEngineProcessConnection::GetSingleton()->WaitForMessage(ezGetStaticRTTI<ezSaveProfilingResponseToEditor>(), ezTime::Seconds(15), &cb).Failed())
if (ezEditorEngineProcessConnection::GetSingleton()->WaitForMessage(ezGetStaticRTTI<ezSaveProfilingResponseToEditor>(), ezTime::MakeFromSeconds(15), &cb).Failed())
{
ezLog::Error("Timeout while waiting for engine process to create profiling capture. Captures will not be merged.");
return;
Expand Down Expand Up @@ -808,7 +808,7 @@ void ezProjectAction::Execute(const ezVariant& value)
sMergedProfilingJson.Append(ezStringView(szStartArray, sEditorProfilingJson.GetElementCount() - (szStartArray - sEditorProfilingJson.GetData())));
}
ezStringBuilder sMergedFile;
const ezDateTime dt = ezTimestamp::CurrentTimestamp();
const ezDateTime dt = ezDateTime::MakeFromTimestamp(ezTimestamp::CurrentTimestamp());
sMergedFile.AppendFormat(":appdata/profiling_{0}-{1}-{2}_{3}-{4}-{5}-{6}.json", dt.GetYear(), ezArgU(dt.GetMonth(), 2, true), ezArgU(dt.GetDay(), 2, true), ezArgU(dt.GetHour(), 2, true), ezArgU(dt.GetMinute(), 2, true), ezArgU(dt.GetSecond(), 2, true), ezArgU(dt.GetMicroseconds() / 1000, 3, true));
ezFileWriter fileWriter;
if (fileWriter.Open(sMergedFile).Failed() || fileWriter.WriteBytes(sMergedProfilingJson.GetData(), sMergedProfilingJson.GetElementCount()).Failed())
Expand All @@ -817,7 +817,7 @@ void ezProjectAction::Execute(const ezVariant& value)
return;
}
ezLog::Info("Merged profiling capture saved to '{0}'.", fileWriter.GetFilePathAbsolute().GetData());
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage(ezFmt("Merged profiling capture saved to '{0}'.", fileWriter.GetFilePathAbsolute().GetData()), ezTime::Seconds(5.0));
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage(ezFmt("Merged profiling capture saved to '{0}'.", fileWriter.GetFilePathAbsolute().GetData()), ezTime::MakeFromSeconds(5.0));
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ void ezViewLightSliderAction::Execute(const ezVariant& value)
break;
case ezEngineViewLightSettingsEvent::Type::DirectionalLightAngleChanged:
{
m_pSettings->SetDirectionalLightAngle(ezAngle::Degree(value.ConvertTo<float>()));
m_pSettings->SetDirectionalLightAngle(ezAngle::MakeFromDegree(value.ConvertTo<float>()));
}
break;
case ezEngineViewLightSettingsEvent::Type::DirectionalLightIntensityChanged:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ void ezQtAssetBrowserWidget::OnListCopyAssetGuid()
mimeData->setText(ezConversionUtils::ToString(guid, tmp).GetData());
clipboard->setMimeData(mimeData);

ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage(ezFmt("Copied asset GUID: {}", tmp), ezTime::Seconds(5));
ezQtUiServices::GetSingleton()->ShowAllDocumentsTemporaryStatusBarMessage(ezFmt("Copied asset GUID: {}", tmp), ezTime::MakeFromSeconds(5));
}

void ezQtAssetBrowserWidget::OnFilterToThisPath()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ ezDateTime ezAssetCurator::GetLastFullTransformDate() const
if (ezOSFile::GetFileStats(path, stat).Failed())
return {};

return stat.m_LastModificationTime;
return ezDateTime::MakeFromTimestamp(stat.m_LastModificationTime);
}

void ezAssetCurator::StoreFullTransformDate()
Expand Down Expand Up @@ -1852,7 +1852,7 @@ void ezAssetCurator::LoadCaches(ezMap<ezString, ezFileStatus>& out_referencedFil
ezFileStatus stat;
reader >> stat;
// We invalidate all asset guids as the current cache as stored on disk is missing various bits in the curator that requires the code to go through the found new asset init code on load again.
stat.m_DocumentID.SetInvalid();
stat.m_DocumentID = ezUuid::MakeInvalid();
out_referencedFiles.Insert(std::move(sPath), stat);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ ezStatus ezAssetDocument::RemoteExport(const ezAssetFileHeader& header, const ch
}
else if (GetEngineStatus() == ezAssetDocument::EngineStatus::Initializing)
{
if (ezEditorEngineProcessConnection::GetSingleton()->WaitForDocumentMessage(GetGuid(), ezDocumentOpenResponseMsgToEditor::GetStaticRTTI(), ezTime::Seconds(10)).Failed())
if (ezEditorEngineProcessConnection::GetSingleton()->WaitForDocumentMessage(GetGuid(), ezDocumentOpenResponseMsgToEditor::GetStaticRTTI(), ezTime::MakeFromSeconds(10)).Failed())
{
return ezStatus(ezFmt("Exporting {0} to \"{1}\" failed, document initialization timed out.", GetDocumentTypeName(), szOutputTarget));
}
Expand All @@ -718,7 +718,7 @@ ezStatus ezAssetDocument::RemoteExport(const ezAssetFileHeader& header, const ch
return true;
};

if (ezEditorEngineProcessConnection::GetSingleton()->WaitForDocumentMessage(GetGuid(), ezExportDocumentMsgToEditor::GetStaticRTTI(), ezTime::Seconds(60), &callback).Failed())
if (ezEditorEngineProcessConnection::GetSingleton()->WaitForDocumentMessage(GetGuid(), ezExportDocumentMsgToEditor::GetStaticRTTI(), ezTime::MakeFromSeconds(60), &callback).Failed())
{
return ezStatus(ezFmt("Remote exporting {0} to \"{1}\" timed out.", GetDocumentTypeName(), msg.m_sOutputFile));
}
Expand Down Expand Up @@ -755,7 +755,7 @@ ezStatus ezAssetDocument::RemoteCreateThumbnail(const ThumbnailInfo& thumbnailIn
}
else if (GetEngineStatus() == ezAssetDocument::EngineStatus::Initializing)
{
if (ezEditorEngineProcessConnection::GetSingleton()->WaitForDocumentMessage(GetGuid(), ezDocumentOpenResponseMsgToEditor::GetStaticRTTI(), ezTime::Seconds(10)).Failed())
if (ezEditorEngineProcessConnection::GetSingleton()->WaitForDocumentMessage(GetGuid(), ezDocumentOpenResponseMsgToEditor::GetStaticRTTI(), ezTime::MakeFromSeconds(10)).Failed())
{
return ezStatus(ezFmt("Create {0} thumbnail for \"{1}\" failed, document initialization timed out.", GetDocumentTypeName(), GetDocumentPath()));
}
Expand All @@ -780,7 +780,7 @@ ezStatus ezAssetDocument::RemoteCreateThumbnail(const ThumbnailInfo& thumbnailIn
return true;
};

if (ezEditorEngineProcessConnection::GetSingleton()->WaitForDocumentMessage(GetGuid(), ezCreateThumbnailMsgToEditor::GetStaticRTTI(), ezTime::Seconds(60), &callback).Failed())
if (ezEditorEngineProcessConnection::GetSingleton()->WaitForDocumentMessage(GetGuid(), ezCreateThumbnailMsgToEditor::GetStaticRTTI(), ezTime::MakeFromSeconds(60), &callback).Failed())
{
return ezStatus(ezFmt("Create {0} thumbnail for \"{1}\" failed timed out.", GetDocumentTypeName(), GetDocumentPath()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void ezAssetProcessor::Run()
m_ProcessRunning[i] = m_ProcessTasks[i].BeginExecute();
}
}
ezThreadUtils::Sleep(ezTime::Milliseconds(100));
ezThreadUtils::Sleep(ezTime::MakeFromMilliseconds(100));
}

while (true)
Expand All @@ -195,7 +195,7 @@ void ezAssetProcessor::Run()
}

if (bAnyRunning)
ezThreadUtils::Sleep(ezTime::Milliseconds(100));
ezThreadUtils::Sleep(ezTime::MakeFromMilliseconds(100));
else
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ ezResult ezAssetCurator::SaveAssetProfiles()
ddl.BeginObject("Config", pCfg->m_sName);

// make sure to create the same GUID every time, otherwise the serialized file changes all the time
const ezUuid guid = ezUuid::StableUuidForString(pCfg->GetConfigName());
const ezUuid guid = ezUuid::MakeStableUuidFromString(pCfg->GetConfigName());

ezReflectionSerializer::WriteObjectToDDL(ddl, pCfg->GetDynamicRTTI(), pCfg, guid);

Expand Down
Loading

0 comments on commit c42cf1d

Please sign in to comment.