Merge branch 'main' into LY-113714
This commit is contained in:
@@ -384,18 +384,11 @@ void Q2DViewport::OnMouseMove(Qt::KeyboardModifiers modifiers, Qt::MouseButtons
|
||||
CaptureMouse();
|
||||
}
|
||||
|
||||
QRect rc;
|
||||
// You can only scroll while the middle mouse button is down
|
||||
if (buttons & Qt::RightButton || buttons & Qt::MiddleButton)
|
||||
{
|
||||
if (modifiers & Qt::ShiftModifier)
|
||||
{
|
||||
// Get the dimensions of the window
|
||||
rc = rect();
|
||||
|
||||
int w = rc.right();
|
||||
int h = rc.bottom();
|
||||
|
||||
// Zoom to mouse position.
|
||||
float z = m_prevZoomFactor + (point.y() - m_RMouseDownPos.y()) * 0.02f;
|
||||
SetZoom(z, m_RMouseDownPos);
|
||||
@@ -482,8 +475,6 @@ void Q2DViewport::SetZoom(float fZoomFactor, const QPoint& center)
|
||||
fZoomFactor = m_maxZoom;
|
||||
}
|
||||
|
||||
float prevz = GetZoomFactor();
|
||||
|
||||
// Zoom to mouse position.
|
||||
float ofsx, ofsy;
|
||||
GetScrollOffset(ofsx, ofsy);
|
||||
@@ -831,12 +822,6 @@ void Q2DViewport::DrawGrid(DisplayContext& dc, bool bNoXNumbers)
|
||||
}
|
||||
}
|
||||
|
||||
int firstGridLineX = origin[0] / gridSize - 1;
|
||||
int firstGridLineY = origin[1] / gridSize - 1;
|
||||
|
||||
int numGridLinesX = (m_rcClient.width() / fScale) / gridSize + 1;
|
||||
int numGridLinesY = (m_rcClient.height() / fScale) / gridSize + 1;
|
||||
|
||||
Matrix34 viewTM = GetViewTM().GetInverted() * m_screenTM_Inverted;
|
||||
Matrix34 viewTM_Inv = m_screenTM * GetViewTM();
|
||||
|
||||
@@ -961,8 +946,6 @@ void Q2DViewport::DrawGrid(DisplayContext& dc, bool bNoXNumbers)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void Q2DViewport::DrawAxis(DisplayContext& dc)
|
||||
{
|
||||
int ix = 0;
|
||||
int iy = 0;
|
||||
float cl = 0.85f;
|
||||
char xstr[2], ystr[2], zstr[2];
|
||||
Vec3 colx, coly, colz;
|
||||
@@ -1005,7 +988,6 @@ void Q2DViewport::DrawAxis(DisplayContext& dc)
|
||||
break;
|
||||
}
|
||||
|
||||
int width = m_rcClient.width();
|
||||
int height = m_rcClient.height();
|
||||
|
||||
int size = 25;
|
||||
@@ -1146,7 +1128,6 @@ void Q2DViewport::DrawObjects(DisplayContext& dc)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void Q2DViewport::MakeConstructionPlane([[maybe_unused]] int axis)
|
||||
{
|
||||
RefCoordSys coordSys = GetIEditor()->GetReferenceCoordSys();
|
||||
m_constructionMatrix[COORDS_VIEW] = GetViewTM();
|
||||
|
||||
Vec3 p(0, 0, 0);
|
||||
|
||||
@@ -55,7 +55,7 @@ CAboutDialog::CAboutDialog(QString versionText, QString richTextCopyrightNotice,
|
||||
QImage backgroundImage(QStringLiteral(":/StartupLogoDialog/splashscreen_1_27.png"));
|
||||
m_backgroundImage = QPixmap::fromImage(backgroundImage.scaled(m_enforcedWidth, m_enforcedHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
|
||||
// Draw the Lumberyard logo from svg
|
||||
// Draw the Open 3D Engine logo from svg
|
||||
m_ui->m_logo->load(QStringLiteral(":/StartupLogoDialog/lumberyard_logo.svg"));
|
||||
|
||||
// Prevent re-sizing
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About Lumberyard Editor</string>
|
||||
<string>About Open 3D Engine Editor</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: transparent</string>
|
||||
@@ -92,7 +92,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="m_transparentVersion">
|
||||
<property name="text">
|
||||
<string>Lumberyard Editor</string>
|
||||
<string>Open 3D Engine Editor</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
|
||||
@@ -153,6 +153,6 @@ void CAlembicCompiler::AddSourceFileOpeners(const char* fullSourceFileName, [[ma
|
||||
}
|
||||
};
|
||||
|
||||
openers.push_back({ "Lumberyard_AlembicCompiler", "Open In Alembic Compiler...", QIcon(), alembicCallback });
|
||||
openers.push_back({ "O3DE_AlembicCompiler", "Open In Alembic Compiler...", QIcon(), alembicCallback });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +40,6 @@ void CAlignPickCallback::OnPick(CBaseObject* picked)
|
||||
const Vec3& pickedScale = picked->GetScale();
|
||||
const Vec3& pickedPos = picked->GetPos();
|
||||
|
||||
float fPickedWidth = pickedAABB.max.x - pickedAABB.min.x;
|
||||
float fPickedHeight = pickedAABB.max.z - pickedAABB.min.z;
|
||||
float fPickedLength = pickedAABB.max.y - pickedAABB.min.y;
|
||||
|
||||
bool bKeepScale = CheckVirtualKey(Qt::Key_Shift);
|
||||
bool bKeepRotation = CheckVirtualKey(Qt::Key_Alt);
|
||||
bool bAlignToBoundBox = CheckVirtualKey(Qt::Key_Control);
|
||||
|
||||
@@ -56,8 +56,6 @@ protected:
|
||||
void OnSetCamera(const SCameraParams& Params)
|
||||
{
|
||||
// Only switch camera when in Play mode.
|
||||
CAnimationContext* ac = GetIEditor()->GetAnimation();
|
||||
|
||||
GUID camObjId = GUID_NULL;
|
||||
if (Params.cameraEntityId.IsValid())
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ void AssetEditorRequestsHandler::OpenAssetEditor(const AZ::Data::Asset<AZ::Data:
|
||||
using namespace AzToolsFramework::AssetEditor;
|
||||
|
||||
// Open the AssetEditor if it isn't open already.
|
||||
auto&& pane = QtViewPaneManager::instance()->OpenPane(LyViewPane::AssetEditor, QtViewPane::OpenMode::RestoreLayout);
|
||||
QtViewPaneManager::instance()->OpenPane(LyViewPane::AssetEditor, QtViewPane::OpenMode::RestoreLayout);
|
||||
|
||||
AssetEditorWidgetRequestsBus::Broadcast(&AssetEditorWidgetRequests::OpenAsset, asset);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <AzCore/Asset/AssetTypeInfoBus.h>
|
||||
|
||||
// AzFramework
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <AzFramework/Asset/GenericAssetHandler.h>
|
||||
|
||||
// AzToolsFramework
|
||||
@@ -174,10 +175,18 @@ namespace AzAssetBrowserRequestHandlerPrivate
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare undo command last so it captures the final state of the entity.
|
||||
EntityCreateCommand* command = aznew EntityCreateCommand(static_cast<AZ::u64>(newEntity->GetId()));
|
||||
command->Capture(newEntity);
|
||||
command->SetParent(undo.GetUndoBatch());
|
||||
bool isPrefabSystemEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
|
||||
if (!isPrefabSystemEnabled)
|
||||
{
|
||||
// Prepare undo command last so it captures the final state of the entity.
|
||||
EntityCreateCommand* command = aznew EntityCreateCommand(static_cast<AZ::u64>(newEntity->GetId()));
|
||||
command->Capture(newEntity);
|
||||
command->SetParent(undo.GetUndoBatch());
|
||||
}
|
||||
|
||||
ToolsApplicationRequests::Bus::Broadcast(&ToolsApplicationRequests::AddDirtyEntity, newEntity->GetId());
|
||||
spawnList.push_back(newEntity->GetId());
|
||||
}
|
||||
@@ -274,7 +283,7 @@ void AzAssetBrowserRequestHandler::AddContextMenuActions(QWidget* caller, QMenu*
|
||||
|
||||
// Add the "Open" menu item.
|
||||
// Note that source file openers are allowed to "veto" the showing of the "Open" menu if it is 100% known that they aren't openable!
|
||||
// for example, custom data formats that are made by Lumberyard that can not have a program associated in the operating system to view them.
|
||||
// for example, custom data formats that are made by Open 3D Engine that can not have a program associated in the operating system to view them.
|
||||
// If the only opener that can open that file has no m_opener, then it is not openable.
|
||||
SourceFileOpenerList openers;
|
||||
AssetBrowserInteractionNotificationBus::Broadcast(&AssetBrowserInteractionNotificationBus::Events::AddSourceFileOpeners, fullFilePath.c_str(), sourceID, openers);
|
||||
@@ -544,11 +553,11 @@ void AzAssetBrowserRequestHandler::AddSourceFileOpeners(const char* fullSourceFi
|
||||
if (AZStd::wildcard_match("*.lua", fullSourceFileName))
|
||||
{
|
||||
AZStd::string fullName(fullSourceFileName);
|
||||
// LUA files can be opened with the lumberyard LUA editor.
|
||||
// LUA files can be opened with the O3DE LUA editor.
|
||||
openers.push_back(
|
||||
{
|
||||
"Lumberyard_LUA_Editor",
|
||||
"Open in Lumberyard LUA Editor...",
|
||||
"O3DE_LUA_Editor",
|
||||
"Open in Open 3D Engine LUA Editor...",
|
||||
QIcon(),
|
||||
[](const char* fullSourceFileNameInCallback, const AZ::Uuid& /*sourceUUID*/)
|
||||
{
|
||||
|
||||
@@ -135,7 +135,7 @@ ly_add_source_properties(
|
||||
SOURCES CryEdit.cpp
|
||||
PROPERTY COMPILE_DEFINITIONS
|
||||
VALUES
|
||||
LUMBERYARD_COPYRIGHT_YEAR=${LY_VERSION_COPYRIGHT_YEAR}
|
||||
O3DE_COPYRIGHT_YEAR=${LY_VERSION_COPYRIGHT_YEAR}
|
||||
LY_BUILD=${LY_VERSION_BUILD_NUMBER}
|
||||
${LY_PAL_TOOLS_DEFINES}
|
||||
)
|
||||
|
||||
@@ -137,10 +137,6 @@ void CColorGradientCtrl::PointToTimeValue(QPoint point, float& time, ISplineInte
|
||||
float CColorGradientCtrl::XOfsToTime(int x)
|
||||
{
|
||||
return m_grid.ClientToWorld(QPoint(x, 0)).x;
|
||||
|
||||
// m_fMinTime to m_fMaxTime time range.
|
||||
float time = m_fMinTime + (float)((m_fMaxTime - m_fMinTime) * (x - m_rcGradient.left())) / m_rcGradient.width();
|
||||
return time;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -194,9 +190,6 @@ void CColorGradientCtrl::paintEvent(QPaintEvent* e)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CColorGradientCtrl::DrawGradient(QPaintEvent* e, QPainter* painter)
|
||||
{
|
||||
int cx = m_rcGradient.width();
|
||||
int cy = m_rcGradient.height();
|
||||
|
||||
//Draw Curve
|
||||
// create and select a thick, white pen
|
||||
painter->setPen(QPen(QColor(128, 255, 128), 1, Qt::SolidLine));
|
||||
|
||||
@@ -1210,7 +1210,6 @@ ConsoleVariableEditor::ConsoleVariableEditor(QWidget* parent)
|
||||
mainLayout->addWidget(m_tableView, 1);
|
||||
|
||||
// Set the console variables
|
||||
IConsole* console = GetIEditor()->GetSystem()->GetIConsole();
|
||||
m_varBlock = VarBlockFromConsoleVars();
|
||||
SetVarBlock(m_varBlock);
|
||||
}
|
||||
|
||||
@@ -243,8 +243,6 @@ void QBitmapPreviewDialogImp::refreshData()
|
||||
|
||||
int w = m_image->GetWidth();
|
||||
int h = m_image->GetHeight();
|
||||
bool hasAlpha = m_image->HasAlphaChannel();
|
||||
bool isLimitedHDR = m_image->IsLimitedHDR();
|
||||
|
||||
int multiplier = (m_showMode == ESHOW_RGB_ALPHA ? 2 : 1);
|
||||
int originalW = w * multiplier;
|
||||
|
||||
@@ -215,7 +215,6 @@ void QRollupCtrl::writeSettings(const QString& qSettingsGroup)
|
||||
|
||||
void QRollupCtrl::updateTabs()
|
||||
{
|
||||
QRollupCtrlButton* lastButton = 0;
|
||||
for (auto i = m_pageList.constBegin(); i != m_pageList.constEnd(); ++i)
|
||||
{
|
||||
QRollupCtrlButton* tB = (*i).button;
|
||||
|
||||
@@ -494,8 +494,6 @@ void QToolTipWidget::KeepTipOnScreen(QRect targetRect, ArrowDirection preferredA
|
||||
|
||||
QPolygonF QToolTipWidget::QArrow::CreateArrow()
|
||||
{
|
||||
int height = 10;
|
||||
|
||||
QVector<QPointF> vertex;
|
||||
//3 points in triangle
|
||||
vertex.reserve(3);
|
||||
@@ -645,4 +643,4 @@ void QToolTipWrapper::DestroyToolTip()
|
||||
{
|
||||
m_actualTooltip->deleteLater();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ CReflectedVarAnimation AnimationPropertyCtrl::value() const
|
||||
|
||||
void AnimationPropertyCtrl::OnApplyClicked()
|
||||
{
|
||||
CUIEnumerations &roGeneralProxy = CUIEnumerations::GetUIEnumerationsInstance();
|
||||
QStringList cSelectedAnimations;
|
||||
size_t nTotalAnimations(0);
|
||||
size_t nCurrentAnimation(0);
|
||||
|
||||
@@ -672,7 +672,6 @@ CReflectedVar * ReflectedPropertyControl::GetReflectedVarFromCallbackInstance(Az
|
||||
return reinterpret_cast<CReflectedVar *>(pNode->GetInstance(0));
|
||||
else
|
||||
return GetReflectedVarFromCallbackInstance(pNode->GetParent());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -191,9 +191,6 @@ void CSplineCtrl::DrawGrid(QPainter* painter)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CSplineCtrl::DrawSpline(QPainter* painter)
|
||||
{
|
||||
int cx = m_rcSpline.width();
|
||||
int cy = m_rcSpline.height();
|
||||
|
||||
//Draw Curve
|
||||
// create and select a thick, white pen
|
||||
const QPen pOldPen = painter->pen();
|
||||
|
||||
@@ -2671,7 +2671,6 @@ void AbstractSplineWidget::SelectAll()
|
||||
for (int splineIndex = 0, splineCount = m_splines.size(); splineIndex < splineCount; ++splineIndex)
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
ISplineInterpolator* pDetailSpline = m_splines[splineIndex].pDetailSpline;
|
||||
|
||||
for (int i = 0; i < (int)pSpline->GetKeyCount(); i++)
|
||||
{
|
||||
@@ -2721,7 +2720,6 @@ void SplineWidget::SetTimelineCtrl(TimelineWidget* pTimelineCtrl)
|
||||
m_pTimelineCtrl = pTimelineCtrl;
|
||||
if (m_pTimelineCtrl)
|
||||
{
|
||||
QWidget* pOwner = pTimelineCtrl->parentWidget();
|
||||
pTimelineCtrl->setParent(this);
|
||||
pTimelineCtrl->SetZoom(m_grid.zoom.x);
|
||||
pTimelineCtrl->SetOrigin(m_grid.origin.x);
|
||||
|
||||
@@ -1,461 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or
|
||||
* a third party where indicated.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
// SyntaxColorizer.cpp: implementation of the CSyntaxColorizer class.
|
||||
//
|
||||
// Version: 1.0.0
|
||||
// Author: Jeff Schering jeffschering@hotmail.com
|
||||
// Date: Jan 2001
|
||||
// Copyright 2001 by Jeff Schering
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "EditorDefs.h"
|
||||
|
||||
#include "SyntaxColorizer.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
CSyntaxColorizer::CSyntaxColorizer(QTextDocument *pParent)
|
||||
: QSyntaxHighlighter(pParent)
|
||||
{
|
||||
createDefaultCharFormat();
|
||||
SetCommentColor(CLR_COMMENT);
|
||||
SetStringColor(CLR_STRING);
|
||||
createTables();
|
||||
m_pskKeyword = NULL;
|
||||
createDefaultKeywordList();
|
||||
}
|
||||
|
||||
CSyntaxColorizer::~CSyntaxColorizer()
|
||||
{
|
||||
ClearKeywordList();
|
||||
deleteTables();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Member Functions
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
void CSyntaxColorizer::createDefaultCharFormat()
|
||||
{
|
||||
m_cfComment = m_cfDefault;
|
||||
m_cfString = m_cfDefault;
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::createDefaultKeywordList()
|
||||
{
|
||||
const char *sKeywords = "__asm,else,main,struct,__assume,enum,"
|
||||
"__multiple_inheritance,switch,auto,__except,__single_inheritance,"
|
||||
"template,__based,explicit,__virtual_inheritance,this,bool,extern,"
|
||||
"mutable,thread,break,false,naked,throw,case,__fastcall,namespace,"
|
||||
"true,catch,__finally,new,try,__cdecl,float,noreturn,__try,char,for,"
|
||||
"operator,typedef,class,friend,private,typeid,const,goto,protected,"
|
||||
"typename,const_cast,if,public,union,continue,inline,register,"
|
||||
"unsigned,__declspec,__inline,reinterpret_cast,using,declaration,"
|
||||
"directive,default,int,return,uuid,delete,__int8,short,"
|
||||
"__uuidof,dllexport,__int16,signed,virtual,dllimport,__int32,sizeof,"
|
||||
"void,do,__int64,static,volatile,double,__leave,static_cast,wmain,"
|
||||
"dynamic_cast,long,__stdcall,while";
|
||||
const char *sDirectives = "#define,#elif,#else,#endif,#error,#ifdef,"
|
||||
"#ifndef,#import,#include,#line,#pragma,#undef";
|
||||
const char *sPragmas = "alloc_text,comment,init_seg1,optimize,auto_inline,"
|
||||
"component,inline_depth,pack,bss_seg,data_seg,"
|
||||
"inline_recursion,pointers_to_members1,check_stack,"
|
||||
"function,intrinsic,setlocale,code_seg,hdrstop,message,"
|
||||
"vtordisp1,const_seg,include_alias,once,warning";
|
||||
|
||||
AddKeyword(sKeywords,CLR_KEYWORD,GRP_KEYWORD);
|
||||
AddKeyword(sDirectives,CLR_KEYWORD,GRP_KEYWORD);
|
||||
AddKeyword(sPragmas,CLR_KEYWORD,GRP_KEYWORD);
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::createTables()
|
||||
{
|
||||
m_pTableZero = new unsigned char[256]; m_pTableOne = new unsigned char[256];
|
||||
m_pTableTwo = new unsigned char[256]; m_pTableThree = new unsigned char[256];
|
||||
m_pTableFour = new unsigned char[256]; m_pAllowable = new unsigned char[256];
|
||||
|
||||
memset(m_pTableZero,SKIP,256); memset(m_pTableOne,SKIP,256);
|
||||
memset(m_pTableTwo,SKIP,256); memset(m_pTableThree,SKIP,256);
|
||||
memset(m_pTableFour,SKIP,256); memset(m_pAllowable,false,256);
|
||||
|
||||
*(m_pTableZero + int('"')) = DQSTART; *(m_pTableZero + int('\'')) = SQSTART;
|
||||
*(m_pTableZero + int('/')) = CMSTART; *(m_pTableOne + int('"')) = DQEND;
|
||||
*(m_pTableTwo + int('\'')) = SQEND;
|
||||
*(m_pTableFour + int('*')) = MLEND;
|
||||
|
||||
*(m_pAllowable + int('\n')) = true; *(m_pAllowable + int('\r')) = true;
|
||||
*(m_pAllowable + int('\t')) = true; *(m_pAllowable + int('\0')) = true;
|
||||
*(m_pAllowable + int(' ')) = true; *(m_pAllowable + int(';')) = true;
|
||||
*(m_pAllowable + int('(')) = true; *(m_pAllowable + int(')')) = true;
|
||||
*(m_pAllowable + int('{')) = true; *(m_pAllowable + int('}')) = true;
|
||||
*(m_pAllowable + int('[')) = true; *(m_pAllowable + int(']')) = true;
|
||||
*(m_pAllowable + int('*')) = true;
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::deleteTables()
|
||||
{
|
||||
delete m_pTableZero; delete m_pTableOne; delete m_pTableTwo;
|
||||
delete m_pTableThree; delete m_pTableFour; delete m_pAllowable;
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::AddKeyword(const char *Keyword, const QBrush &cr, int grp)
|
||||
{
|
||||
QTextCharFormat cf = m_cfDefault;
|
||||
cf.setForeground(cr);
|
||||
|
||||
for (auto token : QString(Keyword).split(","))
|
||||
{
|
||||
addKey(token,cf,grp);
|
||||
}
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::AddKeyword(const char *Keyword, const QTextCharFormat& cf, int grp)
|
||||
{
|
||||
for (auto token : QString(Keyword).split(","))
|
||||
{
|
||||
addKey(token,cf,grp);
|
||||
}
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::addKey(const QString& Keyword, const QTextCharFormat& cf, int grp) //add in ascending order
|
||||
{
|
||||
SKeyword* pskNewKey = new SKeyword;
|
||||
SKeyword* prev,*curr;
|
||||
|
||||
pskNewKey->keyword = Keyword;
|
||||
|
||||
m_keywords[pskNewKey->keyword] = pskNewKey;
|
||||
|
||||
pskNewKey->cf = cf;
|
||||
pskNewKey->group = grp;
|
||||
pskNewKey->pNext = NULL;
|
||||
*(m_pTableZero + pskNewKey->keyword[0].toLatin1()) = KEYWORD;
|
||||
|
||||
//if list is empty, add first node
|
||||
if(m_pskKeyword == NULL)
|
||||
m_pskKeyword = pskNewKey;
|
||||
else
|
||||
{
|
||||
//check to see if new node goes before first node
|
||||
if(Keyword.compare(m_pskKeyword->keyword) < 0)
|
||||
{
|
||||
pskNewKey->pNext = m_pskKeyword;
|
||||
m_pskKeyword = pskNewKey;
|
||||
}
|
||||
//check to see if new keyword already exists at the first node
|
||||
else if(Keyword == m_pskKeyword->keyword)
|
||||
{
|
||||
//the keyword exists, so replace the existing with the new
|
||||
pskNewKey->pNext = m_pskKeyword->pNext;
|
||||
delete m_pskKeyword;
|
||||
m_pskKeyword = pskNewKey;
|
||||
}
|
||||
else
|
||||
{
|
||||
prev = m_pskKeyword;
|
||||
curr = m_pskKeyword->pNext;
|
||||
while(curr != NULL && curr->keyword.compare(Keyword) < 0)
|
||||
{
|
||||
prev = curr;
|
||||
curr = curr->pNext;
|
||||
}
|
||||
if(curr != NULL && curr->keyword == Keyword)
|
||||
{
|
||||
//the keyword exists, so replace the existing with the new
|
||||
prev->pNext = pskNewKey;
|
||||
pskNewKey->pNext = curr->pNext;
|
||||
delete curr;
|
||||
}
|
||||
else
|
||||
{
|
||||
pskNewKey->pNext = curr;
|
||||
prev->pNext = pskNewKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::ClearKeywordList()
|
||||
{
|
||||
SKeyword* pTemp = m_pskKeyword;
|
||||
|
||||
m_keywords.clear();
|
||||
|
||||
while(m_pskKeyword != NULL)
|
||||
{
|
||||
*(m_pTableZero + m_pskKeyword->keyword[0].toLatin1()) = SKIP;
|
||||
pTemp = m_pskKeyword->pNext;
|
||||
delete m_pskKeyword;
|
||||
m_pskKeyword = pTemp;
|
||||
}
|
||||
}
|
||||
|
||||
QString CSyntaxColorizer::GetKeywordList()
|
||||
{
|
||||
QString sList;
|
||||
|
||||
SKeyword* pTemp = m_pskKeyword;
|
||||
|
||||
while(pTemp != NULL)
|
||||
{
|
||||
if(!sList.isEmpty())
|
||||
sList += QLatin1Char(',');
|
||||
sList += pTemp->keyword;
|
||||
pTemp = pTemp->pNext;
|
||||
}
|
||||
|
||||
return sList;
|
||||
}
|
||||
|
||||
QString CSyntaxColorizer::GetKeywordList(int grp)
|
||||
{
|
||||
QString sList;
|
||||
|
||||
SKeyword* pTemp = m_pskKeyword;
|
||||
|
||||
while(pTemp != NULL)
|
||||
{
|
||||
if(pTemp->group == grp)
|
||||
{
|
||||
if(!sList.isEmpty())
|
||||
sList += QLatin1Char(',');
|
||||
sList += pTemp->keyword;
|
||||
}
|
||||
pTemp = pTemp->pNext;
|
||||
}
|
||||
|
||||
return sList;
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::SetCommentColor(const QBrush& cr)
|
||||
{
|
||||
QTextCharFormat cf = m_cfComment;
|
||||
cf.setForeground(cr);
|
||||
|
||||
SetCommentStyle(cf);
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::SetStringColor(const QBrush& cr)
|
||||
{
|
||||
QTextCharFormat cf = m_cfString;
|
||||
|
||||
cf.setForeground(cr);
|
||||
|
||||
SetStringStyle(cf);
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::SetGroupStyle(int grp, const QTextCharFormat& cf)
|
||||
{
|
||||
SKeyword* pTemp = m_pskKeyword;
|
||||
|
||||
while(pTemp != NULL)
|
||||
{
|
||||
if(pTemp->group == grp)
|
||||
{
|
||||
pTemp->cf = cf;
|
||||
}
|
||||
pTemp = pTemp->pNext;
|
||||
}
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::GetGroupStyle(int grp, QTextCharFormat& cf)
|
||||
{
|
||||
SKeyword* pTemp = m_pskKeyword;
|
||||
|
||||
while(pTemp != NULL)
|
||||
{
|
||||
if(pTemp->group == grp)
|
||||
{
|
||||
cf = pTemp->cf;
|
||||
pTemp = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
pTemp = pTemp->pNext;
|
||||
//if grp is not found, return default style
|
||||
if(pTemp == NULL) cf = m_cfDefault;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::SetGroupColor(int grp, const QBrush& cr)
|
||||
{
|
||||
QTextCharFormat cf;
|
||||
GetGroupStyle(grp,cf);
|
||||
|
||||
cf.setForeground(cr);
|
||||
|
||||
SetGroupStyle(grp,cf);
|
||||
}
|
||||
|
||||
void CSyntaxColorizer::highlightBlock(const QString& text)
|
||||
{
|
||||
//setup some vars
|
||||
char sWord[4096];
|
||||
QTextCharFormat cf;
|
||||
const char *lpszTemp;
|
||||
long iStart = 0;
|
||||
long x = 0;
|
||||
SKeyword* pskTemp = m_pskKeyword;
|
||||
|
||||
QByteArray latin1Text = text.toLatin1();
|
||||
const char *lpszBuf = latin1Text.constData();
|
||||
|
||||
const unsigned char *ppTables[] = { m_pTableZero, m_pTableOne, m_pTableTwo, m_pTableThree, m_pTableFour };
|
||||
int iState = previousBlockState();
|
||||
if (iState == -1)
|
||||
iState = 0;
|
||||
|
||||
//do the work
|
||||
while(lpszBuf[x])
|
||||
{
|
||||
switch(ppTables[iState][int(lpszBuf[x])])
|
||||
{
|
||||
case DQSTART:
|
||||
iState = 1;
|
||||
iStart = x;
|
||||
break;
|
||||
case SQSTART:
|
||||
iState = 2;
|
||||
iStart = x;
|
||||
break;
|
||||
case CMSTART:
|
||||
if(lpszBuf[x+1] == '/')
|
||||
{
|
||||
iState = 3;
|
||||
iStart = x;
|
||||
x++;
|
||||
}
|
||||
else if(lpszBuf[x+1] == '*')
|
||||
{
|
||||
iState = 4;
|
||||
iStart = x;
|
||||
x++;
|
||||
}
|
||||
else if(lpszBuf[x] == '\'')
|
||||
{
|
||||
iState = 3;
|
||||
iStart = x;
|
||||
x++;
|
||||
}
|
||||
|
||||
break;
|
||||
case MLEND:
|
||||
if(lpszBuf[x+1] == '/')
|
||||
{
|
||||
x++;
|
||||
iState = 0;
|
||||
setFormat(iStart, x + 1 - iStart, m_cfComment);
|
||||
}
|
||||
break;
|
||||
case DQEND:
|
||||
iState = 0;
|
||||
setFormat(iStart, x + 1 - iStart, m_cfString);
|
||||
break;
|
||||
case SQEND:
|
||||
if(lpszBuf[x-1] == '\\' && lpszBuf[x+1] == '\'')
|
||||
break;
|
||||
iState = 0;
|
||||
setFormat(iStart, x + 1 - iStart, m_cfString);
|
||||
break;
|
||||
|
||||
case KEYWORD:
|
||||
// Extract whole word.
|
||||
lpszTemp = lpszBuf+x;
|
||||
{
|
||||
if (x > 0 && !m_pAllowable[int(lpszBuf[x-1])])
|
||||
break;
|
||||
|
||||
int i = 0;
|
||||
while (!m_pAllowable[int(lpszTemp[i])])
|
||||
{
|
||||
sWord[i] = lpszTemp[i];
|
||||
i++;
|
||||
}
|
||||
if (i > 0)
|
||||
{
|
||||
sWord[i] = 0;
|
||||
// Word extracted.
|
||||
// Find keyword.
|
||||
Keywords::iterator it = m_keywords.find( QString(sWord) );
|
||||
if (it != m_keywords.end())
|
||||
{
|
||||
int iStart2 = x;
|
||||
pskTemp = it->second;
|
||||
x += pskTemp->keyword.size();
|
||||
setFormat(iStart2, x - iStart2, pskTemp->cf);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
lpszTemp = lpszBuf+x;
|
||||
while(pskTemp != NULL)
|
||||
{
|
||||
if(pskTemp->keyword[0] == lpszTemp[0])
|
||||
{
|
||||
int x1=0,y1=0;iStart = iOffset + x;
|
||||
while(pskTemp->keyword[x1])
|
||||
{
|
||||
y1 += lpszTemp[x1] ^ pskTemp->keyword[x1];
|
||||
x1++;
|
||||
}
|
||||
if(y1 == 0 && (*(m_pAllowable + (lpszBuf[x-1])) &&
|
||||
*(m_pAllowable + (lpszBuf[x+pskTemp->keylen]))))
|
||||
{
|
||||
if(_stricmp(pskTemp->keyword,"rem") == 0)
|
||||
{
|
||||
pTable = m_pTableThree;
|
||||
}
|
||||
else
|
||||
{
|
||||
x += pskTemp->keylen;
|
||||
pCtrl->SetSel(iStart,iOffset + x);
|
||||
pCtrl->SetSelectionCharFormat(pskTemp->cf);
|
||||
}
|
||||
}
|
||||
}
|
||||
pskTemp = pskTemp->pNext;
|
||||
}
|
||||
*/
|
||||
pskTemp = m_pskKeyword;
|
||||
break;
|
||||
case SKIP:;
|
||||
}
|
||||
x++;
|
||||
}
|
||||
//sometimes we get to the end of the file before the end of the string
|
||||
//or comment, so we deal with that situation here
|
||||
if(iState == 1)
|
||||
{
|
||||
setFormat(iStart, x + 1 - iStart, m_cfString);
|
||||
}
|
||||
else if(iState == 2)
|
||||
{
|
||||
setFormat(iStart, x + 1 - iStart, m_cfString);
|
||||
}
|
||||
else if(iState == 3)
|
||||
{
|
||||
setFormat(iStart, x + 1 - iStart, m_cfComment);
|
||||
if(lpszBuf[x-2] != '\\') // line continuation character
|
||||
iState = 0;
|
||||
}
|
||||
else if(iState == 4)
|
||||
{
|
||||
setFormat(iStart, x + 1 - iStart, m_cfComment);
|
||||
}
|
||||
|
||||
setCurrentBlockState(iState);
|
||||
}
|
||||
|
||||
#include <Controls/moc_SyntaxColorizer.cpp>
|
||||
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
// Original file Copyright Crytek GMBH or its affiliates, used under license.
|
||||
|
||||
// Description : interface for the CSyntaxColorizer class.
|
||||
|
||||
|
||||
#ifndef CRYINCLUDE_EDITOR_CONTROLS_SYNTAXCOLORIZER_H
|
||||
#define CRYINCLUDE_EDITOR_CONTROLS_SYNTAXCOLORIZER_H
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QSyntaxHighlighter>
|
||||
#endif
|
||||
|
||||
#define CLR_STRING QColor(55, 0, 200)
|
||||
#define CLR_PLAIN QColor(0, 0, 0)
|
||||
#define CLR_COMMENT QColor(0, 170, 0)
|
||||
#define CLR_KEYWORD QColor(0, 0, 255)
|
||||
#define GRP_KEYWORD 0
|
||||
|
||||
class CSyntaxColorizer
|
||||
: public QSyntaxHighlighter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CSyntaxColorizer(QTextDocument* pParent = nullptr);
|
||||
virtual ~CSyntaxColorizer();
|
||||
|
||||
//protected vars
|
||||
protected:
|
||||
unsigned char* m_pTableZero, * m_pTableOne;
|
||||
unsigned char* m_pTableTwo, * m_pTableThree;
|
||||
unsigned char* m_pTableFour, * m_pAllowable;
|
||||
|
||||
enum Types
|
||||
{
|
||||
SKIP,
|
||||
DQSTART, //Double Quotes start
|
||||
DQEND, //Double Quotes end
|
||||
SQSTART, //Single Quotes start
|
||||
SQEND, //Single Quotes end
|
||||
CMSTART, //Comment start (both single and multi line)
|
||||
MLEND, //Multi line comment end
|
||||
KEYWORD //Keyword start
|
||||
} m_type;
|
||||
|
||||
struct SKeyword
|
||||
{
|
||||
QString keyword;
|
||||
int keylen;
|
||||
QTextCharFormat cf;
|
||||
int group;
|
||||
SKeyword* pNext;
|
||||
SKeyword() { pNext = NULL; }
|
||||
};
|
||||
|
||||
SKeyword* m_pskKeyword;
|
||||
QTextCharFormat m_cfComment;
|
||||
QTextCharFormat m_cfString;
|
||||
QTextCharFormat m_cfDefault;
|
||||
|
||||
//typedef std::map<LPCSTR,SKeyword*,> Keywords;
|
||||
//typedef std::hash_map<const char*,SKeyword*,stl::hash_strcmp<const char*> > Keywords;
|
||||
|
||||
//typedef std::map<const char*,SKeyword*,stl::hash_strcmp<const char*> > Keywords;
|
||||
typedef std::map<QString, SKeyword*> Keywords;
|
||||
|
||||
Keywords m_keywords;
|
||||
|
||||
//protected member functions
|
||||
protected:
|
||||
void addKey(const QString& Keyword, const QTextCharFormat& cf, int grp);
|
||||
void createTables();
|
||||
void deleteTables();
|
||||
void createDefaultKeywordList();
|
||||
void createDefaultCharFormat();
|
||||
|
||||
//public member functions
|
||||
public:
|
||||
void highlightBlock(const QString& text) override;
|
||||
|
||||
void GetCommentStyle(QTextCharFormat& cf) { cf = m_cfComment; };
|
||||
void GetStringStyle(QTextCharFormat& cf) { cf = m_cfString; };
|
||||
void GetGroupStyle(int grp, QTextCharFormat& cf);
|
||||
void GetDefaultStyle(QTextCharFormat& cf) { cf = m_cfDefault; };
|
||||
|
||||
void SetCommentStyle(const QTextCharFormat& cf) { m_cfComment = cf; };
|
||||
void SetCommentColor(const QBrush& cr);
|
||||
void SetStringStyle(const QTextCharFormat& cf) { m_cfString = cf; };
|
||||
void SetStringColor(const QBrush& cr);
|
||||
void SetGroupStyle(int grp, const QTextCharFormat& cf);
|
||||
void SetGroupColor(int grp, const QBrush& cr);
|
||||
void SetDefaultStyle(const QTextCharFormat& cf) { m_cfDefault = cf; };
|
||||
|
||||
void AddKeyword(const char* Keyword, const QTextCharFormat& cf, int grp = 0);
|
||||
void AddKeyword(const char* Keyword, const QBrush& cr, int grp = 0);
|
||||
void ClearKeywordList();
|
||||
QString GetKeywordList();
|
||||
QString GetKeywordList(int grp);
|
||||
};
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_CONTROLS_SYNTAXCOLORIZER_H
|
||||
|
||||
@@ -15,69 +15,12 @@
|
||||
|
||||
#include "TextEditorCtrl.h"
|
||||
|
||||
#define GRP_KEYWORD 0
|
||||
#define GRP_CONSTANTS 1
|
||||
#define GRP_DIRECTIVE 2
|
||||
#define GRP_PRAGMA 3
|
||||
|
||||
|
||||
// CTextEditorCtrl
|
||||
|
||||
CTextEditorCtrl::CTextEditorCtrl(QWidget* pParent)
|
||||
: QTextEdit(pParent)
|
||||
, m_sc(document())
|
||||
{
|
||||
/*
|
||||
//reconfigure CSyntaxColorizer's default keyword groupings
|
||||
LPTSTR sKeywords = "for,for,else,main,struct,enum,switch,auto,"
|
||||
"template,explicit,this,bool,extern,thread,break,false,"
|
||||
"throw,case,namespace,true,catch,new,try,float,noreturn,"
|
||||
"char,operator,typedef,class,friend,private,const,goto,"
|
||||
"protected,typename,if,public,union,continue,inline,"
|
||||
"unsigned,using,directive,default,int,return,delete,short,"
|
||||
"signed,virtual,sizeof,void,do,static,double,long,while";
|
||||
LPTSTR sDirectives = "#define,#elif,#else,#endif,#error,#ifdef,"
|
||||
"#ifndef,#import,#include,#line,#pragma,#undef";
|
||||
LPTSTR sPragmas = "comment,optimize,auto_inline,once,warning,"
|
||||
"component,pack,function,intrinsic,setlocale,hdrstop,message";
|
||||
|
||||
m_sc.ClearKeywordList();
|
||||
m_sc.AddKeyword(sKeywords,QColor(0,0,255),GRP_KEYWORD);
|
||||
m_sc.AddKeyword(sDirectives,QColor(0,0,255),GRP_DIRECTIVE);
|
||||
m_sc.AddKeyword(sPragmas,QColor(0,0,255),GRP_PRAGMA);
|
||||
m_sc.AddKeyword("REM,Rem,rem",QColor(255,0,255),4);
|
||||
*/
|
||||
const char* sKeywords = "Shader,ShadeLayer,HW,LightStyle,ValueString,Orient,Origin,Params,Array,Template,Templates,"
|
||||
"Version,CGVProgram,CGVPParam,Name,"
|
||||
"DeclareLightMaterial,Side,Ambient,Diffuse,Specular,Emission,Shininess,"
|
||||
"Layer,Map,RGBGen,RgbGen,AlphaGen,NoDepthTest,Blend,TexCoordMod,Scale,UScale,VScale,ShiftNoise,Noise,SRange,TRange,"
|
||||
"Cull,Sort,State,NoCull,ShadowMapGen,Conditions,Vars,DepthWrite,NoColorMask,Portal,LMNoAlpha,"
|
||||
"TexColorOp,TexStage,TexType,TexFilter,TexGen,UpdateStyle,EvalLight,Style,TexDecal,Tex1Decal,TexBump,"
|
||||
"RCParam,RCombiner,RShader,TSParam,Reg,Comp,DepthMask,AlphaFunc,Light,LightType,ClipPlane,PlaneS,PlaneT,"
|
||||
"PolygonOffset,NoLightmap,ShineMap,Turbulence,tcMod,Procedure,TessSize,Spark,Sequence,Maps,Time,Loop,"
|
||||
"Mask,Public,float,RenderParams,User,"
|
||||
"rgbGen,blend,map,"
|
||||
"Translate,Identity,Rotate,RotateX,RotateY,RotateZ,Div,DeformGen,Scroll,UScroll,VScroll,Angle"
|
||||
"Type,Level,Amp,Phase,Freq,DeformVertexes,FlareSize,NoLight,Const,Start,"
|
||||
"Matrix,FLOAT,BYTE,Verts,Vertex,Normal,Normals,Color,Texture0,Texture1,Texture2,Texture3,Texture4,TNormals";
|
||||
|
||||
const char* sConstants = "Decal,None,Nearest,TwoSided,RCRGBToAlpha,OcclusionTest,NoSet,Replace,FromClient,"
|
||||
"Opaque,MonitorNoise,Point,Front,Back,Water,TriLinear,"
|
||||
"MuzzleFlash,FromObj,Modulate,Base,SphereMap,Add,Glare,Additive,Intensity,White,Sin,Cos,Tan,"
|
||||
"$Diffuse,$None,$Specular,$Whiteimage,$Environment,$Glare,$Opacity,$Flare";
|
||||
|
||||
const char* sDirectives = "#define,#elif,#else,#endif,#error,#ifdef,"
|
||||
"#ifndef,#import,#include,#line,#pragma,#undef";
|
||||
|
||||
m_sc.ClearKeywordList();
|
||||
m_sc.AddKeyword(sKeywords, QColor(0, 0, 255), GRP_KEYWORD);
|
||||
m_sc.AddKeyword(sConstants, QColor(180, 0, 110), GRP_CONSTANTS);
|
||||
m_sc.AddKeyword(sDirectives, QColor(160, 0, 160), GRP_DIRECTIVE);
|
||||
|
||||
m_sc.SetCommentColor(QColor(0, 128, 128));
|
||||
m_sc.SetStringColor(QColor(0, 128, 0));
|
||||
|
||||
m_bModified = true;
|
||||
m_bModified = true;
|
||||
|
||||
QFont font;
|
||||
font.setFamily("Courier New");
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
// CTextEditorCtrl
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include "SyntaxColorizer.h"
|
||||
|
||||
#include <QTextEdit>
|
||||
#endif
|
||||
|
||||
@@ -42,7 +40,6 @@ public:
|
||||
|
||||
protected:
|
||||
QString m_filename;
|
||||
CSyntaxColorizer m_sc;
|
||||
bool m_bModified;
|
||||
};
|
||||
|
||||
|
||||
@@ -331,11 +331,6 @@ void LevelEditorMenuHandler::ResetToolsMenus()
|
||||
|
||||
CreateMenuOptions(&menuMap, otherSubMenu, LyViewPane::CategoryOther);
|
||||
|
||||
// Plug-Ins
|
||||
auto plugInsMenu = m_toolsMenu.AddMenu(QObject::tr("Plug-Ins"));
|
||||
|
||||
CreateMenuOptions(&menuMap, plugInsMenu, LyViewPane::CategoryPlugIns);
|
||||
|
||||
m_toolsMenu.AddSeparator();
|
||||
|
||||
// Optional Sub Menus
|
||||
@@ -923,15 +918,15 @@ QMenu* LevelEditorMenuHandler::CreateHelpMenu()
|
||||
|
||||
QUrl docSearchUrl("https://docs.aws.amazon.com/search/doc-search.html");
|
||||
QUrlQuery docSearchQuery;
|
||||
QString lumberyardProductString = QUrl::toPercentEncoding("Amazon Lumberyard");
|
||||
QString o3deProductString = QUrl::toPercentEncoding("Open 3D Engine");
|
||||
// The order of these QueryItems matters. wiki Search URL Formatting
|
||||
docSearchQuery.addQueryItem("searchPath", "documentation-product");
|
||||
docSearchQuery.addQueryItem("searchQuery", text);
|
||||
docSearchQuery.addQueryItem("this_doc_product", lumberyardProductString);
|
||||
docSearchQuery.addQueryItem("this_doc_product", o3deProductString);
|
||||
docSearchQuery.addQueryItem("ref", "lye");
|
||||
docSearchQuery.addQueryItem("ev", productVersionString);
|
||||
docSearchUrl.setQuery(docSearchQuery);
|
||||
docSearchUrl.setFragment(QString("facet_doc_product=%1").arg(lumberyardProductString));
|
||||
docSearchUrl.setFragment(QString("facet_doc_product=%1").arg(o3deProductString));
|
||||
QDesktopServices::openUrl(docSearchUrl);
|
||||
}
|
||||
lineEdit->clear();
|
||||
@@ -953,8 +948,8 @@ QMenu* LevelEditorMenuHandler::CreateHelpMenu()
|
||||
// Glossary
|
||||
documentationMenu.AddAction(ID_DOCUMENTATION_GLOSSARY);
|
||||
|
||||
// Lumberyard Documentation
|
||||
documentationMenu.AddAction(ID_DOCUMENTATION_LUMBERYARD);
|
||||
// Open 3D Engine Documentation
|
||||
documentationMenu.AddAction(ID_DOCUMENTATION_O3DE);
|
||||
|
||||
// GameLift Documentation
|
||||
documentationMenu.AddAction(ID_DOCUMENTATION_GAMELIFT);
|
||||
@@ -985,7 +980,7 @@ QMenu* LevelEditorMenuHandler::CreateHelpMenu()
|
||||
// Report a Bug???
|
||||
// auto reportBugMenu = helpMenu.Get()->addAction(tr("Report a Bug"));
|
||||
|
||||
// About Lumberyard
|
||||
// About Open 3D Engine
|
||||
helpMenu.AddAction(ID_APP_ABOUT);
|
||||
|
||||
// Welcome dialog
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
// AzQtComponents
|
||||
#include <AzQtComponents/Components/GlobalEventFilter.h>
|
||||
#include <AzQtComponents/Components/LumberyardStylesheet.h>
|
||||
#include <AzQtComponents/Components/O3DEStylesheet.h>
|
||||
#include <AzQtComponents/Components/Titlebar.h>
|
||||
#include <AzQtComponents/Components/WindowDecorationWrapper.h>
|
||||
|
||||
@@ -53,7 +53,7 @@ enum
|
||||
UninitializedFrequency = 9999,
|
||||
};
|
||||
|
||||
Q_LOGGING_CATEGORY(InputDebugging, "lumberyard.editor.input")
|
||||
Q_LOGGING_CATEGORY(InputDebugging, "o3de.editor.input")
|
||||
|
||||
// internal, private namespace:
|
||||
namespace
|
||||
@@ -249,17 +249,17 @@ namespace Editor
|
||||
EditorQtApplication::EditorQtApplication(int& argc, char** argv)
|
||||
: QApplication(argc, argv)
|
||||
, m_inWinEventFilter(false)
|
||||
, m_stylesheet(new AzQtComponents::LumberyardStylesheet(this))
|
||||
, m_stylesheet(new AzQtComponents::O3DEStylesheet(this))
|
||||
, m_idleTimer(new QTimer(this))
|
||||
{
|
||||
m_idleTimer->setInterval(UninitializedFrequency);
|
||||
|
||||
setWindowIcon(QIcon(":/Application/res/lyeditor.ico"));
|
||||
setWindowIcon(QIcon(":/Application/res/o3de_editor.ico"));
|
||||
|
||||
// set the default key store for our preferences:
|
||||
setOrganizationName("Amazon");
|
||||
setOrganizationDomain("amazon.com");
|
||||
setApplicationName("Lumberyard");
|
||||
setApplicationName("Open 3D Engine");
|
||||
|
||||
connect(m_idleTimer, &QTimer::timeout, this, &EditorQtApplication::maybeProcessIdle);
|
||||
|
||||
@@ -267,7 +267,7 @@ namespace Editor
|
||||
installEventFilter(this);
|
||||
|
||||
// Disable our debugging input helpers by default
|
||||
QLoggingCategory::setFilterRules(QStringLiteral("lumberyard.editor.input.*=false"));
|
||||
QLoggingCategory::setFilterRules(QStringLiteral("o3de.editor.input.*=false"));
|
||||
|
||||
// Initialize our stylesheet here to allow Gems to register stylesheets when their system components activate.
|
||||
AZ::IO::FixedMaxPath engineRootPath;
|
||||
|
||||
@@ -32,7 +32,7 @@ class QByteArray;
|
||||
|
||||
namespace AzQtComponents
|
||||
{
|
||||
class LumberyardStylesheet;
|
||||
class O3DEStylesheet;
|
||||
}
|
||||
|
||||
enum EEditorNotifyEvent;
|
||||
@@ -118,7 +118,7 @@ namespace Editor
|
||||
void UninstallFilters();
|
||||
void maybeProcessIdle();
|
||||
|
||||
AzQtComponents::LumberyardStylesheet* m_stylesheet;
|
||||
AzQtComponents::O3DEStylesheet* m_stylesheet;
|
||||
|
||||
bool m_inWinEventFilter = false;
|
||||
|
||||
|
||||
@@ -187,8 +187,8 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
#include <AzCore/std/smart_ptr/make_shared.h>
|
||||
|
||||
static const char lumberyardEditorClassName[] = "LumberyardEditorClass";
|
||||
static const char lumberyardApplicationName[] = "LumberyardApplication";
|
||||
static const char O3DEEditorClassName[] = "O3DEEditorClass";
|
||||
static const char O3DEApplicationName[] = "O3DEApplication";
|
||||
|
||||
static AZ::EnvironmentVariable<bool> inEditorBatchMode = nullptr;
|
||||
|
||||
@@ -378,7 +378,7 @@ void CCryEditApp::RegisterActionHandlers()
|
||||
ON_COMMAND(ID_DOCUMENTATION_GETTINGSTARTEDGUIDE, OnDocumentationGettingStartedGuide)
|
||||
ON_COMMAND(ID_DOCUMENTATION_TUTORIALS, OnDocumentationTutorials)
|
||||
ON_COMMAND(ID_DOCUMENTATION_GLOSSARY, OnDocumentationGlossary)
|
||||
ON_COMMAND(ID_DOCUMENTATION_LUMBERYARD, OnDocumentationLumberyard)
|
||||
ON_COMMAND(ID_DOCUMENTATION_O3DE, OnDocumentationO3DE)
|
||||
ON_COMMAND(ID_DOCUMENTATION_GAMELIFT, OnDocumentationGamelift)
|
||||
ON_COMMAND(ID_DOCUMENTATION_RELEASENOTES, OnDocumentationReleaseNotes)
|
||||
ON_COMMAND(ID_DOCUMENTATION_GAMEDEVBLOG, OnDocumentationGameDevBlog)
|
||||
@@ -639,7 +639,7 @@ public:
|
||||
QString appRootOverride;
|
||||
parser.addHelpOption();
|
||||
parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
|
||||
parser.setApplicationDescription(QObject::tr("Amazon Lumberyard"));
|
||||
parser.setApplicationDescription(QObject::tr("Open 3D Engine"));
|
||||
// nsDocumentRevisionDebugMode is an argument that the macOS system passed into an App bundle that is being debugged.
|
||||
// Need to include it here so that Qt argument parser does not error out.
|
||||
bool nsDocumentRevisionsDebugMode = false;
|
||||
@@ -758,13 +758,13 @@ struct SharedData
|
||||
// article Q141752 to locate the previous instance of the application. .
|
||||
BOOL CCryEditApp::FirstInstance(bool bForceNewInstance)
|
||||
{
|
||||
QSystemSemaphore sem(QString(lumberyardApplicationName) + "_sem", 1);
|
||||
QSystemSemaphore sem(QString(O3DEApplicationName) + "_sem", 1);
|
||||
sem.acquire();
|
||||
{
|
||||
FixDanglingSharedMemory(lumberyardEditorClassName);
|
||||
FixDanglingSharedMemory(O3DEEditorClassName);
|
||||
}
|
||||
sem.release();
|
||||
m_mutexApplication = new QSharedMemory(lumberyardEditorClassName);
|
||||
m_mutexApplication = new QSharedMemory(O3DEEditorClassName);
|
||||
if (!m_mutexApplication->create(sizeof(SharedData)) && !bForceNewInstance)
|
||||
{
|
||||
m_mutexApplication->attach();
|
||||
@@ -789,7 +789,7 @@ BOOL CCryEditApp::FirstInstance(bool bForceNewInstance)
|
||||
sem.release();
|
||||
QTimer* t = new QTimer(this);
|
||||
connect(t, &QTimer::timeout, this, [this]() {
|
||||
QSystemSemaphore sem(QString(lumberyardApplicationName) + "_sem", 1);
|
||||
QSystemSemaphore sem(QString(O3DEApplicationName) + "_sem", 1);
|
||||
sem.acquire();
|
||||
SharedData* data = reinterpret_cast<SharedData*>(m_mutexApplication->data());
|
||||
QString preview = QString::fromLatin1(data->text);
|
||||
@@ -1018,9 +1018,9 @@ QString FormatRichTextCopyrightNotice()
|
||||
{
|
||||
// copyright symbol is HTML Entity = ©
|
||||
QString copyrightHtmlSymbol = "©";
|
||||
QString copyrightString = QObject::tr("Lumberyard and related materials Copyright %1 %2 Amazon Web Services, Inc., its affiliates or licensors.<br>By accessing or using these materials, you agree to the terms of the AWS Customer Agreement.");
|
||||
QString copyrightString = QObject::tr("Open 3D Engine and related materials Copyright %1 %2 Amazon Web Services, Inc., its affiliates or licensors.<br>By accessing or using these materials, you agree to the terms of the AWS Customer Agreement.");
|
||||
|
||||
return copyrightString.arg(copyrightHtmlSymbol).arg(LUMBERYARD_COPYRIGHT_YEAR);
|
||||
return copyrightString.arg(copyrightHtmlSymbol).arg(O3DE_COPYRIGHT_YEAR);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1180,8 +1180,8 @@ BOOL CCryEditApp::CheckIfAlreadyRunning()
|
||||
|
||||
if (!m_bPreviewMode)
|
||||
{
|
||||
FixDanglingSharedMemory(lumberyardApplicationName);
|
||||
m_mutexApplication = new QSharedMemory(lumberyardApplicationName);
|
||||
FixDanglingSharedMemory(O3DEApplicationName);
|
||||
m_mutexApplication = new QSharedMemory(O3DEApplicationName);
|
||||
if (!m_mutexApplication->create(16))
|
||||
{
|
||||
// Don't prompt the user in non-interactive export mode. Instead, default to allowing multiple instances to
|
||||
@@ -1189,7 +1189,7 @@ BOOL CCryEditApp::CheckIfAlreadyRunning()
|
||||
// NOTE: If you choose to do this, be sure to export *different* levels, since nothing prevents multiple runs
|
||||
// from trying to write to the same level at the same time.
|
||||
// If we're running interactively, let's ask and make sure the user actually intended to do this.
|
||||
if (!m_bExportMode && QMessageBox::question(AzToolsFramework::GetActiveWindow(), QObject::tr("Too many apps"), QObject::tr("There is already a Lumberyard application running\nDo you want to start another one?")) != QMessageBox::Yes)
|
||||
if (!m_bExportMode && QMessageBox::question(AzToolsFramework::GetActiveWindow(), QObject::tr("Too many apps"), QObject::tr("There is already an Open 3D Engine application running\nDo you want to start another one?")) != QMessageBox::Yes)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1798,7 +1798,7 @@ BOOL CCryEditApp::InitInstance()
|
||||
GetIEditor()->GetCommandManager()->RegisterAutoCommands();
|
||||
GetIEditor()->AddUIEnums();
|
||||
|
||||
mainWindowWrapper->enableSaveRestoreGeometry("amazon", "lumberyard", "mainWindowGeometry");
|
||||
mainWindowWrapper->enableSaveRestoreGeometry("amazon", "O3DE", "mainWindowGeometry");
|
||||
m_pDocManager->OnFileNew();
|
||||
|
||||
if (IsInRegularEditorMode())
|
||||
@@ -1933,9 +1933,11 @@ BOOL CCryEditApp::InitInstance()
|
||||
if (GetIEditor()->GetCommandManager()->IsRegistered("editor.open_lnm_editor"))
|
||||
{
|
||||
CCommand0::SUIInfo uiInfo;
|
||||
bool ok = GetIEditor()->GetCommandManager()->GetUIInfo("editor.open_lnm_editor", uiInfo);
|
||||
#if !defined(NDEBUG)
|
||||
bool ok =
|
||||
#endif
|
||||
GetIEditor()->GetCommandManager()->GetUIInfo("editor.open_lnm_editor", uiInfo);
|
||||
assert(ok);
|
||||
int ID_VIEW_AI_LNMEDITOR(uiInfo.commandId);
|
||||
}
|
||||
|
||||
RunInitPythonScript(cmdInfo);
|
||||
@@ -2088,7 +2090,7 @@ void CCryEditApp::OnAppAbout()
|
||||
aboutDlg.exec();
|
||||
}
|
||||
|
||||
// App command to run the Welcome to Lumberyard dialog
|
||||
// App command to run the Welcome to Open 3D Engine dialog
|
||||
void CCryEditApp::OnAppShowWelcomeScreen()
|
||||
{
|
||||
// This logic is a simplified version of the startup
|
||||
@@ -2180,7 +2182,7 @@ void CCryEditApp::OnDocumentationGlossary()
|
||||
QDesktopServices::openUrl(QUrl(webLink));
|
||||
}
|
||||
|
||||
void CCryEditApp::OnDocumentationLumberyard()
|
||||
void CCryEditApp::OnDocumentationO3DE()
|
||||
{
|
||||
QString webLink = tr("https://docs.aws.amazon.com/lumberyard/userguide");
|
||||
QDesktopServices::openUrl(QUrl(webLink));
|
||||
@@ -2481,7 +2483,6 @@ int CCryEditApp::IdleProcessing(bool bBackgroundUpdate)
|
||||
static AZStd::chrono::system_clock::time_point lastUpdate = now;
|
||||
|
||||
AZStd::chrono::duration<float> delta = now - lastUpdate;
|
||||
float deltaTime = delta.count();
|
||||
|
||||
lastUpdate = now;
|
||||
|
||||
@@ -4837,7 +4838,6 @@ void CCryEditApp::OnEditRenameobject()
|
||||
QString newName;
|
||||
QString str = dlg.GetString();
|
||||
int num = 0;
|
||||
bool bWarningShown = false;
|
||||
|
||||
for (int i = 0; i < pSelection->GetCount(); ++i)
|
||||
{
|
||||
@@ -4952,7 +4952,6 @@ void CCryEditApp::OnValidateObjectPositions()
|
||||
std::vector<CBaseObject*> foundObjects;
|
||||
|
||||
std::vector<GUID> objIDs;
|
||||
bool reportVeg = false;
|
||||
|
||||
for (int i1 = 0; i1 < objCount; ++i1)
|
||||
{
|
||||
@@ -5391,7 +5390,6 @@ void CCryEditApp::SetEditorWindowTitle(QString sTitleStr, QString sPreTitleStr,
|
||||
if (MainWindow::instance() || m_pConsoleDialog)
|
||||
{
|
||||
QString platform = "";
|
||||
const SFileVersion& v = GetIEditor()->GetFileVersion();
|
||||
|
||||
#ifdef WIN64
|
||||
platform = "[x64]";
|
||||
@@ -5401,7 +5399,7 @@ void CCryEditApp::SetEditorWindowTitle(QString sTitleStr, QString sPreTitleStr,
|
||||
|
||||
if (sTitleStr.isEmpty())
|
||||
{
|
||||
sTitleStr = QObject::tr("Lumberyard Editor Beta %1 - Build %2").arg(platform).arg(LY_BUILD);
|
||||
sTitleStr = QObject::tr("Open 3D Engine Editor Beta %1 - Build %2").arg(platform).arg(LY_BUILD);
|
||||
}
|
||||
|
||||
if (!sPreTitleStr.isEmpty())
|
||||
@@ -5492,7 +5490,7 @@ void CCryEditApp::StartProcessDetached(const char* process, const char* args)
|
||||
}
|
||||
|
||||
// Launch the process
|
||||
bool startDetachedReturn = QProcess::startDetached(
|
||||
[[maybe_unused]] bool startDetachedReturn = QProcess::startDetached(
|
||||
process,
|
||||
argsList,
|
||||
QCoreApplication::applicationDirPath()
|
||||
@@ -5704,7 +5702,7 @@ extern "C" int AZ_DLL_EXPORT CryEditMain(int argc, char* argv[])
|
||||
int exitCode = 0;
|
||||
|
||||
BOOL didCryEditStart = CCryEditApp::instance()->InitInstance();
|
||||
AZ_Error("Editor", didCryEditStart, "CryEditor did not initialize correctly, and will close."
|
||||
AZ_Error("Editor", didCryEditStart, "O3DE Editor did not initialize correctly, and will close."
|
||||
"\nThis could be because of incorrectly configured components, or missing required gems."
|
||||
"\nSee other errors for more details.");
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
void OnUpdateShowWelcomeScreen(QAction* action);
|
||||
void OnDocumentationTutorials();
|
||||
void OnDocumentationGlossary();
|
||||
void OnDocumentationLumberyard();
|
||||
void OnDocumentationO3DE();
|
||||
void OnDocumentationGamelift();
|
||||
void OnDocumentationReleaseNotes();
|
||||
void OnDocumentationGameDevBlog();
|
||||
|
||||
@@ -1931,7 +1931,7 @@ void CCryEditDoc::Fetch(const QString& holdName, const QString& relativeHoldPath
|
||||
if (!LoadXmlArchiveArray(arrXmlAr, holdFilename, holdPath))
|
||||
{
|
||||
QMessageBox::critical(QApplication::activeWindow(), "Error", "The temporary 'Hold' level failed to load successfully. Your level might be corrupted, you should restart the Editor.", QMessageBox::Ok);
|
||||
AZ_Error("CryEditDoc", false, "Fetch failed to load the Xml Archive");
|
||||
AZ_Error("EditDoc", false, "Fetch failed to load the Xml Archive");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1336,7 +1336,7 @@ bool LibraryItemTreeModel::DoesGroupExist([[maybe_unused]] const QString& groupN
|
||||
QStringList LibraryItemTreeModel::mimeTypes() const
|
||||
{
|
||||
QStringList mimeTypes;
|
||||
mimeTypes << QStringLiteral("application/x-lumberyard-libraryitems");
|
||||
mimeTypes << QStringLiteral("application/x-o3de-libraryitems");
|
||||
return mimeTypes;
|
||||
}
|
||||
|
||||
@@ -1412,9 +1412,9 @@ bool LibraryItemTreeModel::MoveItem(CBaseLibraryItem* item, const QModelIndex& t
|
||||
|
||||
bool LibraryItemTreeModel::dropMimeData(const QMimeData* data, [[maybe_unused]] Qt::DropAction action, [[maybe_unused]] int row, [[maybe_unused]] int column, const QModelIndex& index)
|
||||
{
|
||||
if (data->hasFormat("application/x-lumberyard-libraryitems"))
|
||||
if (data->hasFormat("application/x-o3de-libraryitems"))
|
||||
{
|
||||
QByteArray array = data->data("application/x-lumberyard-libraryitems");
|
||||
QByteArray array = data->data("application/x-o3de-libraryitems");
|
||||
|
||||
QModelIndex targetParent = index;
|
||||
|
||||
@@ -1474,7 +1474,7 @@ QMimeData* LibraryItemTreeModel::mimeData(const QModelIndexList& indexes) const
|
||||
}
|
||||
|
||||
QMimeData* data = new QMimeData;
|
||||
data->setData(QStringLiteral("application/x-lumberyard-libraryitems"), array);
|
||||
data->setData(QStringLiteral("application/x-o3de-libraryitems"), array);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ void CDisplaySettings::LoadRegistry()
|
||||
|
||||
void CDisplaySettings::SetObjectHideMask(int hideMask)
|
||||
{
|
||||
int prevMask = m_objectHideMask;
|
||||
m_objectHideMask = hideMask;
|
||||
|
||||
gSettings.objectHideMask = m_objectHideMask;
|
||||
@@ -87,7 +86,6 @@ void CDisplaySettings::PostInitApply()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CDisplaySettings::SetRenderFlags(int flags)
|
||||
{
|
||||
int prev = m_renderFlags;
|
||||
m_renderFlags = flags;
|
||||
|
||||
if (!GetIEditor()->Get3DEngine())
|
||||
|
||||
@@ -70,8 +70,6 @@ CObjectMode::~CObjectMode()
|
||||
|
||||
void CObjectMode::DrawSelectionPreview(struct DisplayContext& dc, CBaseObject* drawObject)
|
||||
{
|
||||
int childColVal = 0;
|
||||
|
||||
AABB bbox;
|
||||
drawObject->GetBoundBox(bbox);
|
||||
|
||||
@@ -312,7 +310,6 @@ bool CObjectMode::OnLButtonDown(CViewport* view, int nFlags, const QPoint& point
|
||||
|
||||
// CPointF ptMarker;
|
||||
QPoint ptCoord;
|
||||
int iCurSel = -1;
|
||||
|
||||
if (GetIEditor()->IsInGameMode() || GetIEditor()->IsInSimulationMode())
|
||||
{
|
||||
|
||||
@@ -1 +1 @@
|
||||
IDI_ICON1 ICON DISCARDABLE "res\\lyeditor.ico"
|
||||
IDI_ICON1 ICON DISCARDABLE "res\\o3de_editor.ico"
|
||||
@@ -79,7 +79,6 @@ bool CEditorFileMonitor::RegisterListener(IFileChangeListener* pListener, const
|
||||
CFileChangeMonitor* fileChangeMonitor = CFileChangeMonitor::Instance();
|
||||
AZ_Assert(fileChangeMonitor, "CFileChangeMonitor singleton missing.");
|
||||
|
||||
int modIndex = 0;
|
||||
naivePath += gameFolder;
|
||||
// Append slash in preparation for appending the second part.
|
||||
naivePath = PathUtil::AddSlash(naivePath);
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
|
||||
virtual bool HotKey_LoadExisting() override
|
||||
{
|
||||
QSettings settings("Amazon", "Lumberyard");
|
||||
QSettings settings("Amazon", "O3DE");
|
||||
QString group = "Hotkeys/";
|
||||
|
||||
HotKey_BuildDefaults();
|
||||
@@ -278,12 +278,11 @@ public:
|
||||
|
||||
virtual void HotKey_SaveCurrent() override
|
||||
{
|
||||
QSettings settings("Amazon", "Lumberyard");
|
||||
QSettings settings("Amazon", "O3DE");
|
||||
QString group = "Hotkeys/";
|
||||
settings.remove("Hotkeys/");
|
||||
settings.sync();
|
||||
settings.beginWriteArray(group);
|
||||
int hotkeyCount = hotkeys.count();
|
||||
int saveIndex = 0;
|
||||
for (HotKey key : hotkeys)
|
||||
{
|
||||
|
||||
@@ -101,10 +101,10 @@ void CEditorPreferencesPage_General::Reflect(AZ::SerializeContext& serialize)
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_stylusMode, "Stylus Mode", "Stylus Mode for tablets and other pointing devices")
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_restoreViewportCamera, EditorPreferencesGeneralRestoreViewportCameraSettingName, "Keep the original editor viewport transform when exiting game mode.")
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_enableSceneInspector, "Enable Scene Inspector (EXPERIMENTAL)", "Enable the option to inspect the internal data loaded from scene files like .fbx. This is an experimental feature. Restart the Scene Settings if the option is not visible under the Help menu.")
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_enablePrefabSystem, "Enable Prefab System (EXPERIMENTAL)", "Enable this option to preview Lumberyard's new prefab system. Enabling this setting removes slice support for level entities; you will need to restart the Editor for the change to take effect.");
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_enablePrefabSystem, "Enable Prefab System (EXPERIMENTAL)", "Enable this option to preview Open 3D Engine's new prefab system. Enabling this setting removes slice support for level entities; you will need to restart the Editor for the change to take effect.");
|
||||
|
||||
editContext->Class<Messaging>("Messaging", "")
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &Messaging::m_showDashboard, "Show Welcome to Lumberyard at startup", "Show Welcome to Lumberyard at startup")
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &Messaging::m_showDashboard, "Show Welcome to Open 3D Engine at startup", "Show Welcome to Open 3D Engine at startup")
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &Messaging::m_showCircularDependencyError, "Show Error: Circular dependency", "Show an error message when adding a slice instance to the target slice would create a cyclic asset dependency. All other valid overrides will be saved even if this is turned off.");
|
||||
|
||||
editContext->Class<Undo>("Undo", "")
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
#include "EditorPreferencesPageGeneral.h"
|
||||
#include "ViewportManipulatorController.h"
|
||||
#include "LegacyViewportCameraController.h"
|
||||
#include "ModernViewportCameraController.h"
|
||||
|
||||
#include "ViewPane.h"
|
||||
#include "CustomResolutionDlg.h"
|
||||
@@ -93,6 +94,7 @@
|
||||
// Atom
|
||||
#include <Atom/RPI.Public/View.h>
|
||||
#include <Atom/RPI.Public/ViewportContextManager.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Math/MatrixUtils.h>
|
||||
|
||||
#include <QtGui/private/qhighdpiscaling_p.h>
|
||||
@@ -111,6 +113,10 @@ void StartFixedCursorMode(QObject *viewport);
|
||||
#define RENDER_MESH_TEST_DISTANCE (0.2f)
|
||||
#define CURSOR_FONT_HEIGHT 8.0f
|
||||
|
||||
AZ_CVAR(
|
||||
bool, ed_useNewCameraSystem, false, nullptr, AZ::ConsoleFunctorFlags::Null,
|
||||
"Use the new Editor camera system (the Atom-native Editor viewport (experimental) must also be enabled)");
|
||||
|
||||
namespace AZ::ViewportHelpers
|
||||
{
|
||||
static const char TextCantCreateCameraNoLevel[] = "Cannot create camera when no level is loaded.";
|
||||
@@ -675,7 +681,6 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event)
|
||||
}
|
||||
}
|
||||
SetCurrentCursor(STD_CURSOR_GAME);
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -683,7 +688,6 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event)
|
||||
case eNotify_OnEndGameMode:
|
||||
if (GetIEditor()->GetViewManager()->GetGameViewport() == this)
|
||||
{
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect();
|
||||
SetCurrentCursor(STD_CURSOR_DEFAULT);
|
||||
if (gSettings.bEnableGameModeVR)
|
||||
{
|
||||
@@ -876,10 +880,6 @@ void EditorViewportWidget::OnBeginPrepareRender()
|
||||
|
||||
GetIEditor()->GetSystem()->SetViewCamera(m_Camera);
|
||||
|
||||
CGameEngine* ge = GetIEditor()->GetGameEngine();
|
||||
|
||||
bool levelIsDisplayable = (ge && ge->IsLevelLoaded() && GetIEditor()->GetDocument() && GetIEditor()->GetDocument()->IsDocumentReady());
|
||||
|
||||
PreWidgetRendering();
|
||||
|
||||
RenderAll();
|
||||
@@ -1217,7 +1217,16 @@ void EditorViewportWidget::SetViewportId(int id)
|
||||
viewportContext->ConnectProjectionMatrixChangedHandler(m_cameraProjectionMatrixChangeHandler);
|
||||
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::ViewportManipulatorController>());
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::LegacyViewportCameraController>());
|
||||
|
||||
if (ed_useNewCameraSystem)
|
||||
{
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::ModernViewportCameraController>());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::LegacyViewportCameraController>());
|
||||
}
|
||||
|
||||
UpdateScene();
|
||||
|
||||
if (m_pPrimaryViewport == this)
|
||||
@@ -1231,10 +1240,14 @@ void EditorViewportWidget::ConnectViewportInteractionRequestBus()
|
||||
AzToolsFramework::ViewportInteraction::ViewportFreezeRequestBus::Handler::BusConnect(GetViewportId());
|
||||
AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusConnect(GetViewportId());
|
||||
m_viewportUi.ConnectViewportUiBus(GetViewportId());
|
||||
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
void EditorViewportWidget::DisconnectViewportInteractionRequestBus()
|
||||
{
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect();
|
||||
|
||||
m_viewportUi.DisconnectViewportUiBus();
|
||||
AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::ViewportInteraction::ViewportFreezeRequestBus::Handler::BusDisconnect();
|
||||
@@ -2720,6 +2733,20 @@ void EditorViewportWidget::UpdateCurrentMousePos(const QPoint& newPosition)
|
||||
m_mousePos = newPosition;
|
||||
}
|
||||
|
||||
void* EditorViewportWidget::GetSystemCursorConstraintWindow() const
|
||||
{
|
||||
AzFramework::SystemCursorState systemCursorState = AzFramework::SystemCursorState::Unknown;
|
||||
|
||||
AzFramework::InputSystemCursorRequestBus::EventResult(
|
||||
systemCursorState, AzFramework::InputDeviceMouse::Id, &AzFramework::InputSystemCursorRequests::GetSystemCursorState);
|
||||
|
||||
const bool systemCursorConstrained =
|
||||
(systemCursorState == AzFramework::SystemCursorState::ConstrainedAndHidden ||
|
||||
systemCursorState == AzFramework::SystemCursorState::ConstrainedAndVisible);
|
||||
|
||||
return systemCursorConstrained ? renderOverlayHWND() : nullptr;
|
||||
}
|
||||
|
||||
void EditorViewportWidget::BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt)
|
||||
{
|
||||
const auto scaledPoint = WidgetToViewport(pt);
|
||||
|
||||
@@ -554,7 +554,7 @@ protected:
|
||||
bool CheckRespondToInput() const;
|
||||
|
||||
// AzFramework::InputSystemCursorConstraintRequestBus
|
||||
void* GetSystemCursorConstraintWindow() const override { return renderOverlayHWND(); }
|
||||
void* GetSystemCursorConstraintWindow() const override;
|
||||
|
||||
void BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt) override;
|
||||
|
||||
|
||||
@@ -271,7 +271,6 @@ void CErrorReportDialog::OnReportColumnRClick()
|
||||
actionAlignRight->setCheckable(true);
|
||||
actionAlignCenter->setCheckable(true);
|
||||
|
||||
int nAlignOption = 0;
|
||||
const int alignment = m_errorReportModel->headerData(column, Qt::Horizontal, Qt::TextAlignmentRole).toInt();
|
||||
actionAlignLeft->setChecked(alignment & Qt::AlignLeft);
|
||||
actionAlignRight->setChecked(alignment & Qt::AlignRight);
|
||||
|
||||
@@ -149,7 +149,7 @@ QVariant CErrorReportTableModel::data(const CErrorRecord& record, int column, in
|
||||
case ColumnCount:
|
||||
return record.count;
|
||||
case ColumnText:
|
||||
return record.error;
|
||||
return QString(record.error).simplified();
|
||||
case ColumnFile:
|
||||
return record.file;
|
||||
case ColumnObject:
|
||||
|
||||
@@ -247,8 +247,6 @@ void CExportManager::AddEntityAnimationData(const CTrackViewTrack* pTrack, Expor
|
||||
float fOutTantentX = tout[0];
|
||||
float fOutTantentY = tout[1];
|
||||
|
||||
float fTangentDelta = 0.01f;
|
||||
|
||||
if (fInTantentX == 0.0f)
|
||||
{
|
||||
fInTantentX = kTangentDelta;
|
||||
@@ -789,8 +787,6 @@ bool CExportManager::ProcessObjectsForExport()
|
||||
float fpsTimeInterval = 1.0f / m_FBXBakedExportFPS;
|
||||
float timeValue = 0.0f;
|
||||
|
||||
IObjectManager* pObjMgr = GetIEditor()->GetObjectManager();
|
||||
|
||||
GetIEditor()->GetAnimation()->SetRecording(false);
|
||||
GetIEditor()->GetAnimation()->SetPlaying(false);
|
||||
|
||||
@@ -814,7 +810,6 @@ bool CExportManager::ProcessObjectsForExport()
|
||||
|
||||
if (QString::compare(pObj2->name, kMasterCameraName) == 0)
|
||||
{
|
||||
REFGUID camGUID = GetIEditor()->GetViewManager()->GetCameraObjectId();
|
||||
pObject = GetIEditor()->GetObjectManager()->FindObject(GetIEditor()->GetViewManager()->GetCameraObjectId());
|
||||
}
|
||||
else
|
||||
|
||||
@@ -21,10 +21,10 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
|
||||
namespace {
|
||||
QString feedbackText = "<h3>We love getting feedback from our customers.</h3>"
|
||||
"Feedback from our community helps us to constantly improve Lumberyard.<br/><br/>"
|
||||
"Feedback from our community helps us to constantly improve Open 3D Engine.<br/><br/>"
|
||||
"In addition to using our forums and AWS support channels, you can always email us with your comments and suggestions at "
|
||||
"<a href=\"mailto:lumberyard-feedback@amazon.com\" style=\"color: #4285F4;\">lumberyard-feedback@amazon.com</a>. "
|
||||
"While we do not respond to everyone who submits feedback, we read everything and aspire to use your feedback to improve Lumberyard for everyone.";
|
||||
"<a href=\"mailto:o3de-feedback@amazon.com\" style=\"color: #4285F4;\">o3de-feedback@amazon.com</a>. "
|
||||
"While we do not respond to everyone who submits feedback, we read everything and aspire to use your feedback to improve Open 3D Engine for everyone.";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -321,7 +321,7 @@ void KillMemory(IConsoleCmdArgs* /* pArgs */)
|
||||
size = size > kLimit ? kLimit : size;
|
||||
}
|
||||
|
||||
uint8* alloc = new uint8[size];
|
||||
new uint8[size];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,8 +712,6 @@ void CGameEngine::SwitchToInGame()
|
||||
gEnv->p3DEngine->ResetParticlesAndDecals();
|
||||
}
|
||||
|
||||
CViewport* pGameViewport = GetIEditor()->GetViewManager()->GetGameViewport();
|
||||
|
||||
m_pISystem->GetIMovieSystem()->EnablePhysicsEvents(true);
|
||||
m_bInGameMode = true;
|
||||
|
||||
|
||||
@@ -123,8 +123,6 @@ bool CGameExporter::Export(unsigned int flags, [[maybe_unused]] EEndian eExportE
|
||||
}
|
||||
else
|
||||
{
|
||||
CObjectManager* pObjectManager = static_cast<CObjectManager*>(pEditor->GetObjectManager());
|
||||
|
||||
QDir::setCurrent(pEditor->GetPrimaryCDFolder());
|
||||
|
||||
// Close all Editor tools
|
||||
@@ -284,8 +282,6 @@ void CGameExporter::ExportVisAreas(const char* pszGamePath, EEndian eExportEndia
|
||||
sprintf_s(szFileOutputPath, "%s%s", pszGamePath, COMPILED_VISAREA_MAP_FILE_NAME);
|
||||
m_levelPak.m_pakFile.RemoveFile(szFileOutputPath);
|
||||
|
||||
SHotUpdateInfo* pExportInfo = NULL;
|
||||
|
||||
SHotUpdateInfo exportInfo;
|
||||
I3DEngine* p3DEngine = pEditor->Get3DEngine();
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ GraphicsSettingsDialog::GraphicsSettingsDialog(QWidget* parent /* = nullptr */)
|
||||
m_ui->m_platformEntry->addItem(platform);
|
||||
}
|
||||
|
||||
QSettings settings("Amazon", "Lumberyard");
|
||||
QSettings settings("Amazon", "O3DE");
|
||||
settings.beginGroup("GraphicsSettingsDialog");
|
||||
|
||||
if (settings.contains("Platform"))
|
||||
@@ -179,7 +179,7 @@ GraphicsSettingsDialog::GraphicsSettingsDialog(QWidget* parent /* = nullptr */)
|
||||
|
||||
GraphicsSettingsDialog::~GraphicsSettingsDialog()
|
||||
{
|
||||
QSettings settings("Amazon", "Lumberyard");
|
||||
QSettings settings("Amazon", "O3DE");
|
||||
settings.beginGroup("GraphicsSettingsDialog");
|
||||
|
||||
auto platformCheck = [this](AZStd::pair<AZStd::string, ESystemConfigPlatform>& stringConfigPair) { return stringConfigPair.second == m_currentPlatform; };
|
||||
@@ -491,7 +491,7 @@ void GraphicsSettingsDialog::LoadPlatformConfigurations()
|
||||
m_currentConfigFilename = m_cfgFiles[m_currentPlatform][cfgFileIndex];
|
||||
GetISystem()->LoadConfiguration(m_currentConfigFilename.c_str(), this, true);
|
||||
|
||||
CVarGroupInfo& specFileGroup = m_cvarGroupData["SpecFile"];
|
||||
/*CVarGroupInfo& specFileGroup =*/ m_cvarGroupData["SpecFile"];
|
||||
m_graphicsSettingsModel->setHeaderData(cfgFileIndex + CVAR_VALUE_COLUMN_OFFSET, Qt::Horizontal, QApplication::translate("GraphicsSettingsDialog", m_cfgFiles[m_currentPlatform][cfgFileIndex].c_str()));
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ void GraphicsSettingsDialog::LoadPlatformConfigurations()
|
||||
|
||||
setUpdatesEnabled(true);
|
||||
|
||||
QSettings settings("Amazon", "Lumberyard");
|
||||
QSettings settings("Amazon", "O3DE");
|
||||
settings.beginGroup("GraphicsSettingsDialog");
|
||||
settings.beginGroup("cvarGroup");
|
||||
|
||||
@@ -624,7 +624,7 @@ void GraphicsSettingsDialog::CleanUI()
|
||||
{
|
||||
setUpdatesEnabled(false);
|
||||
|
||||
QSettings settings("Amazon", "Lumberyard");
|
||||
QSettings settings("Amazon", "O3DE");
|
||||
settings.beginGroup("GraphicsSettingsDialog");
|
||||
settings.beginGroup("cvarGroup");
|
||||
|
||||
|
||||
@@ -998,7 +998,6 @@ CBaseObject* CEditorImpl::CloneObject(CBaseObject* obj)
|
||||
|
||||
CBaseObject* CEditorImpl::GetSelectedObject()
|
||||
{
|
||||
CBaseObject* obj = nullptr;
|
||||
if (m_pObjectManager->GetSelection()->GetCount() != 1)
|
||||
{
|
||||
return nullptr;
|
||||
@@ -1433,10 +1432,10 @@ AZStd::string CEditorImpl::LoadProjectIdFromProjectData()
|
||||
QByteArray editorProjectNameUtf8 = editorProjectName.toUtf8();
|
||||
AZ::Uuid id = AZ::Uuid::CreateName(editorProjectNameUtf8.constData());
|
||||
|
||||
// The projects that Lumberyard ships with had their project IDs hand-generated based on the name of the level.
|
||||
// The projects that Open 3D Engine ships with had their project IDs hand-generated based on the name of the level.
|
||||
// Therefore, if the UUID from the project name is the same as the UUID in the file, it's one of our projects
|
||||
// and we can therefore send the name back, making it easier for Metrics to determine which level it was.
|
||||
// We are checking to see if this is a project we ship with Lumberyard, and therefore we can unobfuscate non-customer information.
|
||||
// We are checking to see if this is a project we ship with Open 3D Engine, and therefore we can unobfuscate non-customer information.
|
||||
if (id != AZ::Uuid(projectId.data()))
|
||||
{
|
||||
return projectId;
|
||||
@@ -2098,7 +2097,7 @@ namespace
|
||||
|
||||
void CEditorImpl::LoadSettings()
|
||||
{
|
||||
QSettings settings(QStringLiteral("Amazon"), QStringLiteral("Lumberyard"));
|
||||
QSettings settings(QStringLiteral("Amazon"), QStringLiteral("O3DE"));
|
||||
|
||||
settings.beginGroup(QStringLiteral("Editor"));
|
||||
settings.beginGroup(QStringLiteral("CoordSys"));
|
||||
@@ -2117,7 +2116,7 @@ void CEditorImpl::LoadSettings()
|
||||
|
||||
void CEditorImpl::SaveSettings() const
|
||||
{
|
||||
QSettings settings(QStringLiteral("Amazon"), QStringLiteral("Lumberyard"));
|
||||
QSettings settings(QStringLiteral("Amazon"), QStringLiteral("O3DE"));
|
||||
|
||||
settings.beginGroup(QStringLiteral("Editor"));
|
||||
settings.beginGroup(QStringLiteral("CoordSys"));
|
||||
|
||||
@@ -166,7 +166,6 @@ int CIconManager::GetIconTexture(const char* iconName)
|
||||
if (QString::compare(ext, "bmp", Qt::CaseInsensitive) == 0 || QString::compare(ext, "jpg", Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
int sz = image.GetWidth() * image.GetHeight();
|
||||
int h = image.GetHeight();
|
||||
uint8* buf = (uint8*)image.GetData();
|
||||
for (int i = 0; i < sz; i++)
|
||||
{
|
||||
|
||||
@@ -466,9 +466,6 @@ void CInfoBar::IdleUpdate()
|
||||
}
|
||||
|
||||
{
|
||||
int settings = GetIEditor()->GetDisplaySettings()->GetSettings();
|
||||
bool noCollision = settings & SETTINGS_NOCOLLISION;
|
||||
|
||||
bool bPhysics = GetIEditor()->GetGameEngine()->GetSimulationMode();
|
||||
if ((ui->m_physicsBtn->isChecked() && !bPhysics) ||
|
||||
(!ui->m_physicsBtn->isChecked() && bPhysics))
|
||||
|
||||
@@ -109,7 +109,7 @@ void KeyboardCustomizationSettings::LoadDefaults()
|
||||
|
||||
void KeyboardCustomizationSettings::Load()
|
||||
{
|
||||
QSettings settings(QStringLiteral("Amazon"), QStringLiteral("Lumberyard"));
|
||||
QSettings settings(QStringLiteral("Amazon"), QStringLiteral("O3DE"));
|
||||
settings.beginGroup(QStringLiteral("Keyboard Shortcuts"));
|
||||
settings.beginGroup(m_group);
|
||||
|
||||
@@ -156,7 +156,7 @@ void KeyboardCustomizationSettings::LoadFromSnapshot(const Snapshot& snapshot)
|
||||
|
||||
void KeyboardCustomizationSettings::Save()
|
||||
{
|
||||
QSettings settings(QStringLiteral("Amazon"), QStringLiteral("Lumberyard"));
|
||||
QSettings settings(QStringLiteral("Amazon"), QStringLiteral("O3DE"));
|
||||
settings.beginGroup(QStringLiteral("Keyboard Shortcuts"));
|
||||
settings.beginGroup(m_group);
|
||||
|
||||
@@ -189,7 +189,7 @@ KeyboardCustomizationSettings::Snapshot KeyboardCustomizationSettings::CreateSna
|
||||
|
||||
void KeyboardCustomizationSettings::ExportToFile(QWidget* parent)
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(parent, QObject::tr("Export Keyboard Shortcuts"), QStringLiteral("lumberyard.keys"), QObject::tr("Keyboard Settings (*.keys)"));
|
||||
QString fileName = QFileDialog::getSaveFileName(parent, QObject::tr("Export Keyboard Shortcuts"), QStringLiteral("o3de.keys"), QObject::tr("Keyboard Settings (*.keys)"));
|
||||
if (fileName.isEmpty())
|
||||
{
|
||||
return;
|
||||
@@ -205,7 +205,7 @@ void KeyboardCustomizationSettings::ExportToFile(QWidget* parent)
|
||||
|
||||
QJsonObject store;
|
||||
store.insert("version", "1.0");
|
||||
store.insert("Content-Type", "application/x-lumberyard-sdk-keyboard-settings+json");
|
||||
store.insert("Content-Type", "application/x-o3de-sdk-keyboard-settings+json");
|
||||
QJsonObject groups;
|
||||
|
||||
for (auto instance = m_instances.constBegin(); instance != m_instances.constEnd(); instance++)
|
||||
@@ -262,7 +262,7 @@ void KeyboardCustomizationSettings::ImportFromFile(QWidget* parent)
|
||||
QJsonDocument imported(QJsonDocument::fromJson(rawData));
|
||||
QJsonObject store = imported.object();
|
||||
|
||||
if (store.value("Content-Type") != "application/x-lumberyard-sdk-keyboard-settings+json" || store.value("version") != "1.0")
|
||||
if (store.value("Content-Type") != "application/x-o3de-sdk-keyboard-settings+json" || store.value("version") != "1.0")
|
||||
{
|
||||
QMessageBox::critical(parent, QObject::tr("Shortcut Import Error"), QObject::tr("\"%1\" doesn't appear to contain keyboard settings").arg(fileName));
|
||||
return;
|
||||
|
||||
@@ -633,7 +633,6 @@ bool CLayoutWnd::LoadConfig()
|
||||
{
|
||||
const QString str = settings.value("Viewports").toString();
|
||||
int nIndex = 1;
|
||||
int curPos = 0;
|
||||
for (auto resToken : str.split(","))
|
||||
{
|
||||
if (nIndex >= MAX_VIEWPORTS)
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
*/
|
||||
|
||||
#include "LegacyViewportCameraController.h"
|
||||
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h>
|
||||
#include <AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h>
|
||||
#include <AzFramework/Viewport/ScreenGeometry.h>
|
||||
#include <AzToolsFramework/Viewport/ViewportMessages.h>
|
||||
#include <Atom/RPI.Public/ViewportContextBus.h>
|
||||
#include <Atom/RPI.Public/ViewportContext.h>
|
||||
@@ -73,7 +75,8 @@ AZ::RPI::ViewportContextPtr LegacyViewportCameraControllerInstance::GetViewportC
|
||||
return viewportContextManager->GetViewportContextById(GetViewportId());
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& currentMousePos, const QPoint& previousMousePos)
|
||||
bool LegacyViewportCameraControllerInstance::HandleMouseMove(
|
||||
const AzFramework::ScreenPoint& currentMousePos, const AzFramework::ScreenPoint& previousMousePos)
|
||||
{
|
||||
if (previousMousePos == currentMousePos)
|
||||
{
|
||||
@@ -93,6 +96,11 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
speedScale *= gSettings.cameraFastMoveSpeed;
|
||||
}
|
||||
|
||||
if (m_inMoveMode || m_inOrbitMode || m_inRotateMode || m_inZoomMode)
|
||||
{
|
||||
m_totalMouseMoveDelta += (QPoint(currentMousePos.m_x, currentMousePos.m_y)-QPoint(previousMousePos.m_x, previousMousePos.m_y)).manhattanLength();
|
||||
}
|
||||
|
||||
if ((m_inRotateMode && m_inMoveMode) || m_inZoomMode)
|
||||
{
|
||||
Matrix34 m = AZTransformToLYTransform(viewportContext->GetCameraTransform());
|
||||
@@ -100,7 +108,7 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
Vec3 ydir = m.GetColumn1().GetNormalized();
|
||||
Vec3 pos = m.GetTranslation();
|
||||
|
||||
const float posDelta = 0.2f * (previousMousePos.y() - currentMousePos.y()) * speedScale;
|
||||
const float posDelta = 0.2f * (previousMousePos.m_y - currentMousePos.m_y) * speedScale;
|
||||
pos = pos - ydir * posDelta;
|
||||
m_orbitDistance = m_orbitDistance + posDelta;
|
||||
m_orbitDistance = fabs(m_orbitDistance);
|
||||
@@ -111,7 +119,7 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
}
|
||||
else if (m_inRotateMode)
|
||||
{
|
||||
Ang3 angles(-currentMousePos.y() + previousMousePos.y(), 0, -currentMousePos.x() + previousMousePos.x());
|
||||
Ang3 angles(-currentMousePos.m_y + previousMousePos.m_y, 0, -currentMousePos.m_x + previousMousePos.m_x);
|
||||
angles = angles * 0.002f * gSettings.cameraRotateSpeed;
|
||||
if (gSettings.invertYRotation)
|
||||
{
|
||||
@@ -143,7 +151,7 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
}
|
||||
|
||||
Vec3 pos = m.GetTranslation();
|
||||
pos += 0.1f * xdir * (currentMousePos.x() - previousMousePos.x()) * speedScale + 0.1f * zdir * (previousMousePos.y() - currentMousePos.y()) * speedScale;
|
||||
pos += 0.1f * xdir * (currentMousePos.m_x - previousMousePos.m_x) * speedScale + 0.1f * zdir * (previousMousePos.m_y - currentMousePos.m_y) * speedScale;
|
||||
m.SetTranslation(pos);
|
||||
|
||||
AZ::Transform transform = viewportContext->GetCameraTransform();
|
||||
@@ -153,7 +161,7 @@ bool LegacyViewportCameraControllerInstance::HandleMouseMove(const QPoint& curre
|
||||
}
|
||||
else if (m_inOrbitMode)
|
||||
{
|
||||
Ang3 angles(-currentMousePos.y() + previousMousePos.y(), 0, -currentMousePos.x() + previousMousePos.x());
|
||||
Ang3 angles(-currentMousePos.m_y + previousMousePos.m_y, 0, -currentMousePos.m_x + previousMousePos.m_x);
|
||||
angles = angles * 0.002f * gSettings.cameraRotateSpeed;
|
||||
|
||||
if (gSettings.invertPan)
|
||||
@@ -289,14 +297,13 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra
|
||||
|
||||
if (id == AzFramework::InputDeviceMouse::SystemCursorPosition)
|
||||
{
|
||||
QPoint screenPosition = QPoint();
|
||||
bool result = false;
|
||||
AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Event(
|
||||
GetViewportId(),
|
||||
[this, &result](AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequests* mouseRequests)
|
||||
{
|
||||
auto previousMousePosition = mouseRequests->PreviousViewportCursorScreenPosition();
|
||||
if (previousMousePosition.has_value())
|
||||
if (auto previousMousePosition = mouseRequests->PreviousViewportCursorScreenPosition();
|
||||
previousMousePosition.has_value())
|
||||
{
|
||||
result = HandleMouseMove(mouseRequests->ViewportCursorScreenPosition(), previousMousePosition.value());
|
||||
}
|
||||
@@ -340,13 +347,16 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra
|
||||
m_inRotateMode = true;
|
||||
}
|
||||
|
||||
shouldConsumeEvent = true;
|
||||
shouldCaptureCursor = true;
|
||||
// Record how much the cursor has been moved to see if we should own the mouse up event.
|
||||
m_totalMouseMoveDelta = 0;
|
||||
}
|
||||
else if (state == InputChannel::State::Ended)
|
||||
{
|
||||
m_inZoomMode = false;
|
||||
m_inRotateMode = false;
|
||||
// If we've moved the cursor more than a couple pixels, we should eat this mouse up event to prevent the context menu controller from seeing it.
|
||||
shouldConsumeEvent = m_totalMouseMoveDelta > 2;
|
||||
shouldCaptureCursor = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
#include <QtCore/qnamespace.h>
|
||||
#include <QPoint>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
struct ScreenPoint;
|
||||
}
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
class LegacyViewportCameraControllerInstance final
|
||||
@@ -45,7 +50,7 @@ namespace SandboxEditor
|
||||
|
||||
AZ::RPI::ViewportContextPtr GetViewportContext();
|
||||
|
||||
bool HandleMouseMove(const QPoint& currentMousePos, const QPoint& previousMousePos);
|
||||
bool HandleMouseMove(const AzFramework::ScreenPoint& currentMousePos, const AzFramework::ScreenPoint& previousMousePos);
|
||||
bool HandleMouseWheel(float zDelta);
|
||||
bool IsKeyDown(Qt::Key key) const;
|
||||
|
||||
@@ -53,6 +58,7 @@ namespace SandboxEditor
|
||||
bool m_inMoveMode = false;
|
||||
bool m_inOrbitMode = false;
|
||||
bool m_inZoomMode = false;
|
||||
int m_totalMouseMoveDelta = 0;
|
||||
float m_orbitDistance = 10.f;
|
||||
float m_moveSpeed = 1.f;
|
||||
AZ::Vector3 m_orbitTarget = {};
|
||||
|
||||
@@ -185,10 +185,18 @@ int QLensFlareAtomicListModel::rowCount(const QModelIndex& parent) const
|
||||
QVariant QLensFlareAtomicListModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
Item* item;
|
||||
if (!index.isValid() || !(item = ItemFromIndex(index)))
|
||||
if (!index.isValid())
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
else
|
||||
{
|
||||
item = ItemFromIndex(index);
|
||||
if (!item)
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
switch (role)
|
||||
{
|
||||
@@ -212,10 +220,18 @@ QVariant QLensFlareAtomicListModel::data(const QModelIndex& index, int role) con
|
||||
bool QLensFlareAtomicListModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
Item* item;
|
||||
if (!index.isValid() || !(item = ItemFromIndex(index)))
|
||||
if (index.isValid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = ItemFromIndex(index);
|
||||
if (!item)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
switch (role)
|
||||
{
|
||||
@@ -247,10 +263,18 @@ Qt::ItemFlags QLensFlareAtomicListModel::flags(const QModelIndex& index) const
|
||||
EFlareType QLensFlareAtomicListModel::FlareTypeFromIndex(QModelIndex index) const
|
||||
{
|
||||
Item* item;
|
||||
if (!index.isValid() || !(item = ItemFromIndex(index)))
|
||||
if (!index.isValid())
|
||||
{
|
||||
return eFT_Max;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = ItemFromIndex(index);
|
||||
if (!item)
|
||||
{
|
||||
return eFT_Max;
|
||||
}
|
||||
}
|
||||
|
||||
return item->flareType;
|
||||
}
|
||||
@@ -268,7 +292,7 @@ QLensFlareAtomicListModel::Item* QLensFlareAtomicListModel::ItemFromIndex(QModel
|
||||
QStringList QLensFlareAtomicListModel::mimeTypes() const
|
||||
{
|
||||
return {
|
||||
QStringLiteral("application/x-lumberyard-flaretypes")
|
||||
QStringLiteral("application/x-o3de-flaretypes")
|
||||
};
|
||||
}
|
||||
|
||||
@@ -284,7 +308,7 @@ QMimeData* QLensFlareAtomicListModel::mimeData(const QModelIndexList& indexes) c
|
||||
stream << static_cast<int>(FlareTypeFromIndex(index));
|
||||
}
|
||||
|
||||
data->setData(QStringLiteral("application/x-lumberyard-flaretypes"), encoded);
|
||||
data->setData(QStringLiteral("application/x-o3de-flaretypes"), encoded);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -1173,7 +1173,7 @@ LensFlareItemTreeModel::LensFlareItemTreeModel(CDatabaseFrameWnd* pParent)
|
||||
QStringList LensFlareItemTreeModel::mimeTypes() const
|
||||
{
|
||||
QStringList mimeTypes = LibraryItemTreeModel::mimeTypes();
|
||||
mimeTypes << QStringLiteral("application/x-lumberyard-flaretypes");
|
||||
mimeTypes << QStringLiteral("application/x-o3de-flaretypes");
|
||||
return mimeTypes;
|
||||
}
|
||||
|
||||
@@ -1184,9 +1184,9 @@ bool LensFlareItemTreeModel::dropMimeData(const QMimeData* data, Qt::DropAction
|
||||
return true;
|
||||
}
|
||||
|
||||
if (data->hasFormat(QStringLiteral("application/x-lumberyard-flaretypes")))
|
||||
if (data->hasFormat(QStringLiteral("application/x-o3de-flaretypes")))
|
||||
{
|
||||
QByteArray encoded = data->data(QStringLiteral("application/x-lumberyard-flaretypes"));
|
||||
QByteArray encoded = data->data(QStringLiteral("application/x-o3de-flaretypes"));
|
||||
QDataStream stream(&encoded, QIODevice::ReadOnly);
|
||||
|
||||
while (!stream.atEnd())
|
||||
|
||||
@@ -737,8 +737,8 @@ bool LensFlareElementTreeModel::removeRows(int row, int count, const QModelIndex
|
||||
QStringList LensFlareElementTreeModel::mimeTypes() const
|
||||
{
|
||||
QStringList types;
|
||||
types << QStringLiteral("application/x-lumberyard-flareelements");
|
||||
types << QStringLiteral("application/x-lumberyard-flaretypes");
|
||||
types << QStringLiteral("application/x-o3de-flareelements");
|
||||
types << QStringLiteral("application/x-o3de-flaretypes");
|
||||
return types;
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ QMimeData* LensFlareElementTreeModel::mimeData(const QModelIndexList& indexes) c
|
||||
array.append(reinterpret_cast<const char*>(&pElement), sizeof(CLensFlareElement*));
|
||||
}
|
||||
|
||||
data->setData(QStringLiteral("application/x-lumberyard-flareelements"), array);
|
||||
data->setData(QStringLiteral("application/x-o3de-flareelements"), array);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -1052,11 +1052,11 @@ bool LensFlareElementTreeModel::MoveElement(CLensFlareElement* pElement, int row
|
||||
|
||||
bool LensFlareElementTreeModel::dropMimeData(const QMimeData* data, [[maybe_unused]] Qt::DropAction action, int row, [[maybe_unused]] int column, const QModelIndex& parent)
|
||||
{
|
||||
if (data->hasFormat(QStringLiteral("application/x-lumberyard-flaretypes")))
|
||||
if (data->hasFormat(QStringLiteral("application/x-o3de-flaretypes")))
|
||||
{
|
||||
// drop from atomic list
|
||||
|
||||
QByteArray encoded = data->data(QStringLiteral("application/x-lumberyard-flaretypes"));
|
||||
QByteArray encoded = data->data(QStringLiteral("application/x-o3de-flaretypes"));
|
||||
QDataStream stream(&encoded, QIODevice::ReadOnly);
|
||||
|
||||
while (!stream.atEnd())
|
||||
@@ -1070,9 +1070,9 @@ bool LensFlareElementTreeModel::dropMimeData(const QMimeData* data, [[maybe_unus
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (data->hasFormat(QStringLiteral("application/x-lumberyard-flareelements")))
|
||||
else if (data->hasFormat(QStringLiteral("application/x-o3de-flareelements")))
|
||||
{
|
||||
QByteArray array = data->data("application/x-lumberyard-flareelements");
|
||||
QByteArray array = data->data("application/x-o3de-flareelements");
|
||||
|
||||
int count = array.size() / sizeof(CLensFlareElement*);
|
||||
auto ppElements = reinterpret_cast<CLensFlareElement**>(array.data());
|
||||
|
||||
@@ -311,7 +311,6 @@ void CLevelFileDialog::OnNewFolder()
|
||||
if (!isLevelFolder && index.isValid())
|
||||
{
|
||||
const QString parentFullPath = index.data(LevelTreeModel::FullPathRole).toString();
|
||||
bool ok = false;
|
||||
QInputDialog inputDlg(this);
|
||||
inputDlg.setLabelText(tr("Please select a folder name"));
|
||||
|
||||
|
||||
@@ -250,7 +250,8 @@ bool CLinkTool::ChildIsValid(CBaseObject* pParent, CBaseObject* pChild, int nDir
|
||||
CBaseObject* pObj;
|
||||
if (nDir & 1)
|
||||
{
|
||||
if (pObj = pChild->GetParent())
|
||||
pObj = pChild->GetParent();
|
||||
if (pObj)
|
||||
{
|
||||
if (!ChildIsValid(pParent, pObj, 1))
|
||||
{
|
||||
@@ -262,7 +263,8 @@ bool CLinkTool::ChildIsValid(CBaseObject* pParent, CBaseObject* pChild, int nDir
|
||||
{
|
||||
for (int i = 0; i < pChild->GetChildCount(); i++)
|
||||
{
|
||||
if (pObj = pChild->GetChild(i))
|
||||
pObj = pChild->GetChild(i);
|
||||
if (pObj)
|
||||
{
|
||||
if (!ChildIsValid(pParent, pObj, 2))
|
||||
{
|
||||
|
||||
@@ -192,7 +192,6 @@ void CLogFile::AboutSystem()
|
||||
char szProfileBuffer[128];
|
||||
char szLanguageBuffer[64];
|
||||
//char szCPUModel[64];
|
||||
char* pChar = 0;
|
||||
MEMORYSTATUS MemoryStatus;
|
||||
#endif // defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX)
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace LyViewPane
|
||||
{
|
||||
static const char* const CategoryTools = "Tools";
|
||||
static const char* const CategoryOther = "Other";
|
||||
static const char* const CategoryPlugIns = "Plug-Ins";
|
||||
//----
|
||||
static const char* const CategoryEditor = "Editor";
|
||||
static const char* const CategoryViewport = "Viewport";
|
||||
|
||||
@@ -406,7 +406,7 @@ MainWindow::MainWindow(QWidget* parent)
|
||||
, m_undoStateAdapter(new UndoStackStateAdapter(this))
|
||||
, m_keyboardCustomization(nullptr)
|
||||
, m_activeView(nullptr)
|
||||
, m_settings("amazon", "lumberyard") // TODO_KDAB: Replace with a central settings class
|
||||
, m_settings("amazon", "O3DE") // TODO_KDAB: Replace with a central settings class
|
||||
, m_toolbarManager(new ToolbarManager(m_actionManager, this))
|
||||
, m_assetImporterManager(new AssetImporterManager(this))
|
||||
, m_levelEditorMenuHandler(new LevelEditorMenuHandler(this, m_viewPaneManager, m_settings))
|
||||
@@ -637,8 +637,6 @@ MainWindow* MainWindow::instance()
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
auto cryEdit = CCryEditApp::instance();
|
||||
|
||||
gSettings.Save();
|
||||
|
||||
AzFramework::SystemCursorState currentCursorState;
|
||||
@@ -1375,7 +1373,7 @@ void MainWindow::InitActions()
|
||||
|
||||
am->AddAction(ID_DOCUMENTATION_GLOSSARY, tr("Glossary"))
|
||||
.SetReserved();
|
||||
am->AddAction(ID_DOCUMENTATION_LUMBERYARD, tr("Lumberyard Documentation"))
|
||||
am->AddAction(ID_DOCUMENTATION_O3DE, tr("Open 3D Engine Documentation"))
|
||||
.SetReserved();
|
||||
am->AddAction(ID_DOCUMENTATION_GAMELIFT, tr("GameLift Documentation"))
|
||||
.SetReserved();
|
||||
@@ -1393,11 +1391,11 @@ void MainWindow::InitActions()
|
||||
|
||||
am->AddAction(ID_DOCUMENTATION_FEEDBACK, tr("Give Us Feedback"))
|
||||
.SetReserved();
|
||||
am->AddAction(ID_APP_ABOUT, tr("&About Lumberyard"))
|
||||
am->AddAction(ID_APP_ABOUT, tr("&About Open 3D Engine"))
|
||||
.SetStatusTip(tr("Display program information, version number and copyright"))
|
||||
.SetReserved();
|
||||
am->AddAction(ID_APP_SHOW_WELCOME, tr("&Welcome"))
|
||||
.SetStatusTip(tr("Show the Welcome to Lumberyard dialog box"))
|
||||
.SetStatusTip(tr("Show the Welcome to Open 3D Engine dialog box"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateShowWelcomeScreen);
|
||||
|
||||
// Editors Toolbar actions
|
||||
@@ -1819,7 +1817,6 @@ void MainWindow::OnUpdateSnapToGrid(QAction* action)
|
||||
bool bEnabled = gSettings.pGrid->IsEnabled();
|
||||
action->setChecked(bEnabled);
|
||||
|
||||
float gridSize = gSettings.pGrid->size;
|
||||
action->setText(QObject::tr("Snap To Grid"));
|
||||
}
|
||||
|
||||
@@ -1846,7 +1843,14 @@ void MainWindow::OpenViewPane(QtViewPane* pane)
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO << "Invalid pane" << pane->m_id << pane->m_category << pane->m_name;
|
||||
if (pane)
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO << "Invalid pane" << pane->m_id << pane->m_category << pane->m_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO << "Invalid pane";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<file>res/source_control-warning_v2.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Application">
|
||||
<file>res/lyeditor.ico</file>
|
||||
<file>res/o3de_editor.ico</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Icons">
|
||||
<file alias="Eye.svg">res/Eye.svg</file>
|
||||
|
||||
@@ -131,9 +131,8 @@ void CMatEditPreviewDlg::OnPreviewCustom()
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CMatEditPreviewDlg message handlers
|
||||
|
||||
void CMatEditPreviewDlg::OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event)
|
||||
void CMatEditPreviewDlg::OnDataBaseItemEvent([[maybe_unused]] IDataBaseItem* pItem, EDataBaseItemEvent event)
|
||||
{
|
||||
CMaterial* pMtl = (CMaterial*)pItem;
|
||||
switch (event)
|
||||
{
|
||||
case EDB_ITEM_EVENT_SELECTED:
|
||||
|
||||
@@ -1199,8 +1199,6 @@ bool CMaterial::IsBreakable2D() const
|
||||
return false;
|
||||
}
|
||||
|
||||
int result = 0;
|
||||
|
||||
const QString& surfaceTypeName = GetSurfaceTypeName();
|
||||
if (ISurfaceTypeManager* pSurfaceManager = GetIEditor()->Get3DEngine()->GetMaterialManager()->GetSurfaceTypeManager())
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ MaterialBrowserWidget::MaterialBrowserWidget(QWidget* parent)
|
||||
connect(m_ui->treeView, &QWidget::customContextMenuRequested, this, [=](const QPoint& point)
|
||||
{
|
||||
CMaterialBrowserRecord record;
|
||||
bool found = TryGetSelectedRecord(record);
|
||||
TryGetSelectedRecord(record);
|
||||
ShowContextMenu(record, point);
|
||||
});
|
||||
|
||||
@@ -417,8 +417,6 @@ void MaterialBrowserWidget::SelectItem(IDataBaseItem* pItem, [[maybe_unused]] ID
|
||||
return;
|
||||
}
|
||||
|
||||
bool bFound = false;
|
||||
|
||||
_smart_ptr<CMaterial> material = static_cast<CMaterial*>(pItem);
|
||||
SetSelectedItem(material, 0, true);
|
||||
}
|
||||
|
||||
@@ -1934,7 +1934,6 @@ void CMaterialDialog::OnUpdateProperties(IVariable* var)
|
||||
}
|
||||
|
||||
bool bMtlLayersChanged = false;
|
||||
SMaterialLayerResources* pMtlLayerResources = mtl->GetMtlLayerResources();
|
||||
int nCurrLayer = -1;
|
||||
|
||||
// Check for shader changes
|
||||
|
||||
@@ -537,7 +537,7 @@ void CMaterialManager::ReloadDirtyMaterials()
|
||||
|
||||
allMaterials.reserve(mtlCount);
|
||||
|
||||
uint32 mtlCountPrev = mtlCount;
|
||||
[[maybe_unused]] uint32 mtlCountPrev = mtlCount;
|
||||
runtimeMaterialManager->GetLoadedMaterials(&allMaterials, mtlCount);
|
||||
AZ_Assert(mtlCountPrev == mtlCount && mtlCount == allMaterials.size(), "It appears GetLoadedMaterials was not used correctly.");
|
||||
|
||||
@@ -665,7 +665,7 @@ void CMaterialManager::AddSourceFileOpeners(const char* fullSourceFileName, [[ma
|
||||
}
|
||||
};
|
||||
|
||||
openers.push_back({ "Lumberyard_MaterialEditor", "Open In Material Editor...", QIcon(), materialCallback });
|
||||
openers.push_back({ "O3DE_MaterialEditor", "Open In Material Editor...", QIcon(), materialCallback });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -393,8 +393,6 @@ namespace
|
||||
return EFTT_SPECULAR_2;
|
||||
}
|
||||
throw std::runtime_error("Invalid texture name.");
|
||||
|
||||
return EFTT_MAX;
|
||||
}
|
||||
|
||||
template<typename STRING>
|
||||
@@ -1353,9 +1351,9 @@ namespace
|
||||
}
|
||||
else
|
||||
{
|
||||
uint16 nSlot = aznumeric_cast<uint16>(TryConvertingCStringToEEfResTextures(subCategoryName));
|
||||
AZ_Warning("ShadersSystem", false, "PyGetProperty - Error: empty 'subCategoryName' texture slot [%d] for material %s",
|
||||
nSlot, pMaterial->GetName().toStdString().c_str());
|
||||
aznumeric_cast<uint16>(TryConvertingCStringToEEfResTextures(subCategoryName)),
|
||||
pMaterial->GetName().toStdString().c_str());
|
||||
}
|
||||
}
|
||||
// ########## Texture Maps / [Tiling | Rotator | Oscillator] ##########
|
||||
@@ -1485,9 +1483,9 @@ namespace
|
||||
}
|
||||
else
|
||||
{
|
||||
uint16 nSlot = aznumeric_cast<uint16>(TryConvertingCStringToEEfResTextures(subSubCategoryName));
|
||||
AZ_Warning("ShadersSystem", false, "PyGetProperty - Error: empty 'subSubCategoryName' texture slot [%d] for material %s",
|
||||
nSlot, pMaterial->GetName().toStdString().c_str());
|
||||
aznumeric_cast<uint16>(TryConvertingCStringToEEfResTextures(subSubCategoryName)),
|
||||
pMaterial->GetName().toStdString().c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -273,14 +273,11 @@ void CModelViewport::RestoreDebugOptions()
|
||||
for (auto g : m_settingsPath.split('\\'))
|
||||
settings.beginGroup(g);
|
||||
|
||||
f32 floatValue = .0f;
|
||||
UINT byteNum = sizeof(f32);
|
||||
QString strRead = "";
|
||||
int32 iRead = 0;
|
||||
BOOL bRead = FALSE;
|
||||
f32 fRead = .0f;
|
||||
QByteArray pbtData;
|
||||
UINT bytes = 0;
|
||||
|
||||
CVarBlock* vb = m_vars.GetVarBlock();
|
||||
int32 vbCount = vb->GetNumVariables();
|
||||
@@ -289,7 +286,6 @@ void CModelViewport::RestoreDebugOptions()
|
||||
for (int32 i = 0; i < vbCount; ++i)
|
||||
{
|
||||
IVariable* var = vb->GetVariable(i);
|
||||
IVariable::EType vType = var->GetType();
|
||||
sprintf_s(keyType, "DebugOption_%s_type", var->GetName().toUtf8().data());
|
||||
|
||||
int32 iType = settings.value(keyType, 0).toInt();
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ModernViewportCameraController.h"
|
||||
|
||||
#include <Atom/RPI.Public/ViewportContext.h>
|
||||
#include <Atom/RPI.Public/ViewportContextBus.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzFramework/Viewport/ScreenGeometry.h>
|
||||
#include <AzFramework/Windowing/WindowBus.h>
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
static AZ::RPI::ViewportContextPtr RetrieveViewportContext(const AzFramework::ViewportId viewportId)
|
||||
{
|
||||
auto viewportContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
|
||||
if (!viewportContextManager)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto viewportContext = viewportContextManager->GetViewportContextById(viewportId);
|
||||
if (!viewportContext)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return viewportContext;
|
||||
}
|
||||
|
||||
ModernViewportCameraControllerInstance::ModernViewportCameraControllerInstance(const AzFramework::ViewportId viewportId)
|
||||
: MultiViewportControllerInstanceInterface(viewportId)
|
||||
{
|
||||
// LYN-2315 TODO - move setup out of constructor, pass cameras in
|
||||
auto firstPersonRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::InputDeviceMouse::Button::Right);
|
||||
auto firstPersonPanCamera = AZStd::make_shared<AzFramework::PanCameraInput>(AzFramework::LookPan);
|
||||
auto firstPersonTranslateCamera = AZStd::make_shared<AzFramework::TranslateCameraInput>(AzFramework::LookTranslation);
|
||||
auto firstPersonWheelCamera = AZStd::make_shared<AzFramework::ScrollTranslationCameraInput>();
|
||||
|
||||
auto orbitCamera = AZStd::make_shared<AzFramework::OrbitCameraInput>();
|
||||
auto orbitRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::InputDeviceMouse::Button::Left);
|
||||
auto orbitTranslateCamera = AZStd::make_shared<AzFramework::TranslateCameraInput>(AzFramework::OrbitTranslation);
|
||||
auto orbitDollyWheelCamera = AZStd::make_shared<AzFramework::OrbitDollyScrollCameraInput>();
|
||||
auto orbitDollyMoveCamera = AZStd::make_shared<AzFramework::OrbitDollyCursorMoveCameraInput>();
|
||||
auto orbitPanCamera = AZStd::make_shared<AzFramework::PanCameraInput>(AzFramework::OrbitPan);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitRotateCamera);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitTranslateCamera);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitDollyWheelCamera);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitDollyMoveCamera);
|
||||
orbitCamera->m_orbitCameras.AddCamera(orbitPanCamera);
|
||||
|
||||
m_cameraSystem.m_cameras.AddCamera(firstPersonRotateCamera);
|
||||
m_cameraSystem.m_cameras.AddCamera(firstPersonPanCamera);
|
||||
m_cameraSystem.m_cameras.AddCamera(firstPersonTranslateCamera);
|
||||
m_cameraSystem.m_cameras.AddCamera(firstPersonWheelCamera);
|
||||
m_cameraSystem.m_cameras.AddCamera(orbitCamera);
|
||||
|
||||
if (const auto viewportContext = RetrieveViewportContext(viewportId))
|
||||
{
|
||||
// set position but not orientation
|
||||
m_targetCamera.m_lookAt = viewportContext->GetCameraTransform().GetTranslation();
|
||||
|
||||
// LYN-2315 TODO https://www.geometrictools.com/Documentation/EulerAngles.pdf
|
||||
|
||||
m_camera = m_targetCamera;
|
||||
}
|
||||
}
|
||||
|
||||
bool ModernViewportCameraControllerInstance::HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event)
|
||||
{
|
||||
AzFramework::WindowSize windowSize;
|
||||
AzFramework::WindowRequestBus::EventResult(
|
||||
windowSize, event.m_windowHandle, &AzFramework::WindowRequestBus::Events::GetClientAreaSize);
|
||||
m_cameraSystem.HandleEvents(AzFramework::BuildInputEvent(event.m_inputChannel, windowSize));
|
||||
return true; // consume event
|
||||
}
|
||||
|
||||
void ModernViewportCameraControllerInstance::UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event)
|
||||
{
|
||||
if (auto viewportContext = RetrieveViewportContext(GetViewportId()))
|
||||
{
|
||||
m_targetCamera = m_cameraSystem.StepCamera(m_targetCamera, event.m_deltaTime.count());
|
||||
m_camera = AzFramework::SmoothCamera(m_camera, m_targetCamera, m_smoothProps, event.m_deltaTime.count());
|
||||
|
||||
viewportContext->SetCameraTransform(m_camera.Transform());
|
||||
}
|
||||
}
|
||||
} // namespace SandboxEditor
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzFramework/Viewport/CameraInput.h>
|
||||
#include <AzFramework/Viewport/MultiViewportController.h>
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
class ModernViewportCameraControllerInstance final : public AzFramework::MultiViewportControllerInstanceInterface
|
||||
{
|
||||
public:
|
||||
explicit ModernViewportCameraControllerInstance(AzFramework::ViewportId viewportId);
|
||||
|
||||
// MultiViewportControllerInstanceInterface overrides ...
|
||||
bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override;
|
||||
void UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) override;
|
||||
|
||||
private:
|
||||
AzFramework::Camera m_camera;
|
||||
AzFramework::Camera m_targetCamera;
|
||||
AzFramework::SmoothProps m_smoothProps;
|
||||
AzFramework::CameraSystem m_cameraSystem;
|
||||
};
|
||||
|
||||
using ModernViewportCameraController = AzFramework::MultiViewportController<ModernViewportCameraControllerInstance>;
|
||||
} // namespace SandboxEditor
|
||||
@@ -165,7 +165,6 @@ private:
|
||||
{
|
||||
CObjectManager* pObjectManager = static_cast<CObjectManager*>(GetIEditor()->GetObjectManager());
|
||||
CBaseObject* pObject = pObjectManager->FindObject(m_attachedObjectGUID);
|
||||
CBaseObject* pParentObject = pObjectManager->FindObject(m_parentObjectGUID);
|
||||
|
||||
if (pObject)
|
||||
{
|
||||
@@ -2818,7 +2817,6 @@ void CBaseObject::SetWorldTM(const Matrix34& tm, int flags)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CBaseObject::UpdateVisibility(bool bVisible)
|
||||
{
|
||||
bool bVisibleWithSpec = bVisible && !IsHiddenBySpec();
|
||||
if (bVisible == CheckFlags(OBJFLAG_INVISIBLE))
|
||||
{
|
||||
if (IObjectManager* objectManager = GetObjectManager())
|
||||
@@ -3180,8 +3178,6 @@ bool CBaseObject::IntersectRayMesh(const Vec3& raySrc, const Vec3& rayDir, SRayH
|
||||
return false;
|
||||
}
|
||||
|
||||
int cntSlots = pRenderNode->GetSlotCount();
|
||||
|
||||
Matrix34A worldTM;
|
||||
IStatObj* pStatObj = pRenderNode->GetEntityStatObj(0, 0, &worldTM);
|
||||
if (!pStatObj)
|
||||
|
||||
@@ -539,7 +539,6 @@ void DisplayContext::DrawHalfDottedCircle(const Vec3& pos, float radius, const V
|
||||
void DisplayContext::DrawDottedCircle(const Vec3& pos, float radius, const Vec3& nUnchangedAxis, int numberOfArrows /*=0*/, float stepDegree /*= 1*/)
|
||||
{
|
||||
float startAngleRadians = 0;
|
||||
float sweepAngleRadians = 2 * gf_PI;
|
||||
|
||||
Vec3 a;
|
||||
Vec3 b;
|
||||
@@ -892,8 +891,8 @@ void DisplayContext::DrawDottedLine(const Vec3& p1, const Vec3& p2, [[maybe_unus
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void DisplayContext::PushMatrix(const Matrix34& tm)
|
||||
{
|
||||
assert(m_currentMatrix < 32);
|
||||
if (m_currentMatrix < 32)
|
||||
assert(m_currentMatrix < 31);
|
||||
if (m_currentMatrix < 31)
|
||||
{
|
||||
m_currentMatrix++;
|
||||
m_matrixStack[m_currentMatrix] = m_matrixStack[m_currentMatrix - 1] * tm;
|
||||
|
||||
@@ -1881,7 +1881,6 @@ CMaterial* CEntityObject::GetRenderMaterial() const
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CEntityObject::SetHelperScale(float scale)
|
||||
{
|
||||
bool bChanged = m_helperScale != scale;
|
||||
m_helperScale = scale;
|
||||
}
|
||||
|
||||
@@ -2034,8 +2033,6 @@ void CEntityObject::ApplyOptics(const QString& opticsFullName, IOpticsElementBas
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CEntityObject::SetOpticsName(const QString& opticsFullName)
|
||||
{
|
||||
bool bUpdateOpticsProperty = true;
|
||||
|
||||
if (opticsFullName.isEmpty())
|
||||
{
|
||||
CDLight* pLight = GetLightProperty();
|
||||
|
||||
@@ -411,9 +411,6 @@ void CObjectManager::DeleteObject(CBaseObject* obj)
|
||||
obj->GetBoundBox(objAAB);
|
||||
GetIEditor()->GetGameEngine()->OnAreaModified(objAAB);
|
||||
|
||||
// Release game resources.
|
||||
CBaseObject* pParent = obj->GetParent();
|
||||
|
||||
obj->Done();
|
||||
|
||||
NotifyObjectListeners(obj, CBaseObject::ON_DELETE);
|
||||
|
||||
@@ -159,8 +159,6 @@ void CStatObjValidator::Validate(IStatObj* statObj, CMaterial* editorMaterial)
|
||||
}
|
||||
}
|
||||
|
||||
const char* errorText = 0;
|
||||
const char* nodeName = 0;
|
||||
if (statObj && editorMaterial)
|
||||
{
|
||||
std::vector<SMeshMaterialIssue> issues;
|
||||
|
||||
@@ -71,8 +71,6 @@ void CTrackGizmo::Display(DisplayContext& dc)
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 hideMask = gSettings.objectHideMask;
|
||||
|
||||
CAnimationContext* ac = GetIEditor()->GetAnimation();
|
||||
|
||||
// Should have animation sequence.
|
||||
@@ -236,7 +234,6 @@ void CTrackGizmo::DrawKeys(DisplayContext& dc, CTrackViewTrack* pTrack, CTrackVi
|
||||
|
||||
float zOffset = TRACK_DRAW_Z_OFFSET;
|
||||
|
||||
float sz = 0.2f;
|
||||
int nkeys = pKeysTrack->GetKeyCount();
|
||||
for (int i = 0; i < nkeys; i++)
|
||||
{
|
||||
|
||||
@@ -184,7 +184,7 @@ bool CPluginManager::LoadPlugins(const char* pPathWithMask)
|
||||
continue;
|
||||
}
|
||||
|
||||
// Lumberyard:
|
||||
// Open 3D Engine:
|
||||
// Query the plugin settings, check for manual load...
|
||||
TPfnQueryPluginSettings pfnQuerySettings = reinterpret_cast<TPfnQueryPluginSettings>(hPlugin->resolve("QueryPluginSettings"));
|
||||
|
||||
|
||||
@@ -465,8 +465,6 @@ void DockWidget::RestoreState(bool forceDefault)
|
||||
|
||||
QRect DockWidget::ProperGeometry() const
|
||||
{
|
||||
Qt::DockWidgetArea area = isFloating() ? Qt::NoDockWidgetArea : m_mainWindow->dockWidgetArea(const_cast<DockWidget*>(this));
|
||||
|
||||
QRect myGeom(pos(), size());
|
||||
|
||||
// we need this state in global coordinates, but if we're parented to one of those group dock windows, there is a problem, it will be local coords.
|
||||
@@ -1366,7 +1364,7 @@ bool QtViewPaneManager::RestoreLayout(QString layoutName)
|
||||
|
||||
for (const QString& paneName : state.viewPanes)
|
||||
{
|
||||
const QtViewPane* pane = OpenPane(paneName, QtViewPane::OpenMode::OnlyOpen);
|
||||
OpenPane(paneName, QtViewPane::OpenMode::OnlyOpen);
|
||||
}
|
||||
|
||||
// must do this after opening all of the panes!
|
||||
|
||||
@@ -1546,7 +1546,6 @@ void CRenderViewport::OnEditorNotifyEvent(EEditorNotifyEvent event)
|
||||
m_previousContext = SetCurrentContext();
|
||||
}
|
||||
SetCurrentCursor(STD_CURSOR_GAME);
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1554,7 +1553,6 @@ void CRenderViewport::OnEditorNotifyEvent(EEditorNotifyEvent event)
|
||||
case eNotify_OnEndGameMode:
|
||||
if (GetIEditor()->GetViewManager()->GetGameViewport() == this)
|
||||
{
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect();
|
||||
SetCurrentCursor(STD_CURSOR_DEFAULT);
|
||||
if (m_renderer->GetCurrentContextHWND() != renderOverlayHWND())
|
||||
{
|
||||
@@ -2412,9 +2410,7 @@ void CRenderViewport::SetWindowTitle(const AZStd::string& title)
|
||||
|
||||
AzFramework::WindowSize CRenderViewport::GetClientAreaSize() const
|
||||
{
|
||||
const QWidget* window = this->window();
|
||||
QSize windowSize = window->size();
|
||||
return AzFramework::WindowSize(windowSize.width(), windowSize.height());
|
||||
return AzFramework::WindowSize(m_rcClient.width(), m_rcClient.height());
|
||||
}
|
||||
|
||||
|
||||
@@ -2452,10 +2448,14 @@ void CRenderViewport::ConnectViewportInteractionRequestBus()
|
||||
AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusConnect(GetViewportId());
|
||||
AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusConnect(GetViewportId());
|
||||
m_viewportUi.ConnectViewportUiBus(GetViewportId());
|
||||
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
void CRenderViewport::DisconnectViewportInteractionRequestBus()
|
||||
{
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect();
|
||||
|
||||
m_viewportUi.DisconnectViewportUiBus();
|
||||
AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusDisconnect();
|
||||
@@ -4607,6 +4607,22 @@ void CRenderViewport::BuildDragDropContext(AzQtComponents::ViewportDragContext&
|
||||
QtViewport::BuildDragDropContext(context, scaledPoint);
|
||||
}
|
||||
|
||||
void* CRenderViewport::GetSystemCursorConstraintWindow() const
|
||||
{
|
||||
AzFramework::SystemCursorState systemCursorState = AzFramework::SystemCursorState::Unknown;
|
||||
|
||||
AzFramework::InputSystemCursorRequestBus::EventResult(
|
||||
systemCursorState,
|
||||
AzFramework::InputDeviceMouse::Id,
|
||||
&AzFramework::InputSystemCursorRequests::GetSystemCursorState);
|
||||
|
||||
const bool systemCursorConstrained =
|
||||
(systemCursorState == AzFramework::SystemCursorState::ConstrainedAndHidden ||
|
||||
systemCursorState == AzFramework::SystemCursorState::ConstrainedAndVisible);
|
||||
|
||||
return systemCursorConstrained ? renderOverlayHWND() : nullptr;
|
||||
}
|
||||
|
||||
void CRenderViewport::RestoreViewportAfterGameMode()
|
||||
{
|
||||
Matrix34 preGameModeViewTM = m_preGameModeViewTM;
|
||||
|
||||
@@ -597,7 +597,7 @@ protected:
|
||||
bool CheckRespondToInput() const;
|
||||
|
||||
// AzFramework::InputSystemCursorConstraintRequestBus
|
||||
void* GetSystemCursorConstraintWindow() const override { return renderOverlayHWND(); }
|
||||
void* GetSystemCursorConstraintWindow() const override;
|
||||
|
||||
void BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt) override;
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
#define ID_DOCUMENTATION_GETTINGSTARTEDGUIDE 36023
|
||||
#define ID_DOCUMENTATION_TUTORIALS 36024
|
||||
#define ID_DOCUMENTATION_GLOSSARY 36025
|
||||
#define ID_DOCUMENTATION_LUMBERYARD 36026
|
||||
#define ID_DOCUMENTATION_O3DE 36026
|
||||
#define ID_DOCUMENTATION_GAMELIFT 36027
|
||||
#define ID_DOCUMENTATION_RELEASENOTES 36028
|
||||
#define ID_DOCUMENTATION_GAMEDEVBLOG 36029
|
||||
|
||||
@@ -222,7 +222,6 @@ void CRotateTool::DrawAngleDecorator(DisplayContext& dc)
|
||||
Vec3 cameraViewDir = dc.camera->GetViewMatrix().GetColumn1().GetNormalized(); //Get the viewDir from the camera instead of from the view
|
||||
// FIXME: The angle and sweep calculation here is incorrect.
|
||||
float cameraAngle = atan2f(cameraViewDir.y, -cameraViewDir.x);
|
||||
float angle = m_initialViewAxisAngleRadians - cameraAngle - (g_PI / 2);
|
||||
float angleDelta = (m_angleToCursor - g_PI2 * floor(m_initialViewAxisAngleRadians / g_PI2)) - (m_initialViewAxisAngleRadians - (cameraAngle - (g_PI / 2)));
|
||||
|
||||
RotationDrawHelper::AngleDecorator::Draw(dc, m_object->GetWorldPos(), cameraViewDir, m_initialViewAxisAngleRadians, angleDelta, m_arcRotationStepRadians, m_viewAxisRadius, GetScreenScale(dc.view, dc.camera));
|
||||
|
||||
@@ -250,7 +250,6 @@ bool CVariableIArchive::SerializeResourceSelector(const Serialization::SStruct&
|
||||
bool CVariableIArchive::SerializeStringListStaticValue(const Serialization::SStruct& ser, const char* name, [[maybe_unused]] const char* label)
|
||||
{
|
||||
StringListStaticValue* const pStringListStaticValue = reinterpret_cast< StringListStaticValue* >(ser.pointer());
|
||||
const StringListStatic& stringListStatic = pStringListStaticValue->stringList();
|
||||
|
||||
_smart_ptr< IVariable > pChild = VarUtil::FindChildVariable(m_pVariable, m_childIndexOverride, name);
|
||||
if (pChild)
|
||||
|
||||
@@ -91,7 +91,6 @@ Vec3 CSetVectorDlg::GetVectorFromEditor()
|
||||
Vec3 v;
|
||||
int emode = GetIEditor()->GetEditMode();
|
||||
CBaseObject* obj = GetIEditor()->GetSelectedObject();
|
||||
RefCoordSys coordSys = GetIEditor()->GetReferenceCoordSys();
|
||||
bool bWorldSpace = GetIEditor()->GetReferenceCoordSys() == COORDS_WORLD;
|
||||
|
||||
if (obj)
|
||||
|
||||
@@ -703,6 +703,10 @@ void SEditorSettings::Save()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void SEditorSettings::Load()
|
||||
{
|
||||
// Load from Settings Registry
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
prefabSystem, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
|
||||
const int settingsVersion = s_editorSettings()->value(QStringLiteral("Settings/EditorSettingsVersion"), 0).toInt();
|
||||
|
||||
if (settingsVersion != EditorSettingsVersion)
|
||||
@@ -942,11 +946,6 @@ void SEditorSettings::Load()
|
||||
searchPaths[id].push_back(path);
|
||||
}
|
||||
}
|
||||
|
||||
// Load from Settings Registry
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
prefabSystem, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -1091,7 +1090,7 @@ void SEditorSettings::ConvertPath(const AZStd::string_view sourcePath, AZStd::st
|
||||
{
|
||||
// This API accepts pipe-separated paths like "Category1|Category2|AttributeName"
|
||||
// But the SettingsManager requires 2 arguments, a Category like "Category1\Category2" and an attribute "AttributeName"
|
||||
// The reason for the difference is to have this API be consistent with the path syntax in Lumberyard Python APIs.
|
||||
// The reason for the difference is to have this API be consistent with the path syntax in Open 3D Engine Python APIs.
|
||||
|
||||
// Find the last pipe separator ("|") in the path
|
||||
int lastSeparator = sourcePath.find_last_of("|");
|
||||
|
||||
@@ -63,7 +63,6 @@ bool CLevelShaderCache::Load(const char* filename)
|
||||
bool CLevelShaderCache::LoadBuffer(const QString& textBuffer, bool bClearOld)
|
||||
{
|
||||
const char* separators = "\r\n,";
|
||||
int curPos = 0;
|
||||
|
||||
int nNumLines = 0;
|
||||
if (bClearOld)
|
||||
|
||||
@@ -53,8 +53,6 @@ int CShaderEnum::EnumShaders()
|
||||
|
||||
m_bEnumerated = true;
|
||||
|
||||
int numShaders = 0;
|
||||
|
||||
m_shaders.clear();
|
||||
m_shaders.reserve(100);
|
||||
//! Enumerate Shaders.
|
||||
|
||||
@@ -442,7 +442,8 @@ bool ShortcutDispatcher::shortcutFilter(QObject* obj, QShortcutEvent* shortcutEv
|
||||
|
||||
QWidget* correctedTopLevel = nullptr;
|
||||
QWidget* p = currentFocusWidget;
|
||||
while (correctedTopLevel = FindParentScopeRoot(p))
|
||||
correctedTopLevel = FindParentScopeRoot(p);
|
||||
while (correctedTopLevel)
|
||||
{
|
||||
if (FindCandidateActionAndFire(correctedTopLevel, shortcutEvent, candidates, previouslyVisited))
|
||||
{
|
||||
@@ -450,6 +451,7 @@ bool ShortcutDispatcher::shortcutFilter(QObject* obj, QShortcutEvent* shortcutEv
|
||||
}
|
||||
|
||||
p = correctedTopLevel;
|
||||
correctedTopLevel = FindParentScopeRoot(p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ class QKeyEvent;
|
||||
More documentation on Qt shortcuts
|
||||
-------------------------------------------
|
||||
|
||||
Here's some more detailed info regarding shortcuts in Qt. Not specific Lumberyard but
|
||||
Here's some more detailed info regarding shortcuts in Qt. Not specific Open 3D Engine but
|
||||
useful as not explained in Qt docs much.
|
||||
|
||||
P.S.: The following text details the strategy used in an earlier Lumberyard version. Not sure which
|
||||
P.S.: The following text details the strategy used in an earlier Open 3D Engine version. Not sure which
|
||||
shortcut context type it uses nowadays, but eitherway, the following text is educational,
|
||||
and all the traps still exist in current Qt (5.11).
|
||||
|
||||
|
||||
@@ -48,14 +48,14 @@ CStartupLogoDialog::CStartupLogoDialog(QString versionText, QString richTextCopy
|
||||
QImage backgroundImage(QStringLiteral(":/StartupLogoDialog/splashscreen_1_27.png"));
|
||||
m_backgroundImage = QPixmap::fromImage(backgroundImage.scaled(m_enforcedWidth, m_enforcedHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
|
||||
// Draw the Lumberyard logo from svg
|
||||
// Draw the Open 3D Engine logo from svg
|
||||
m_ui->m_logo->load(QStringLiteral(":/StartupLogoDialog/lumberyard_logo.svg"));
|
||||
|
||||
m_ui->m_TransparentConfidential->setObjectName("copyrightNotice");
|
||||
m_ui->m_TransparentConfidential->setTextFormat(Qt::RichText);
|
||||
m_ui->m_TransparentConfidential->setText(richTextCopyrightNotice);
|
||||
|
||||
setWindowTitle(tr("Starting Lumberyard Editor"));
|
||||
setWindowTitle(tr("Starting Open 3D Engine Editor"));
|
||||
|
||||
setStyleSheet( "CStartupLogoDialog > QLabel { background: transparent; color: 'white' }\
|
||||
CStartupLogoDialog > QLabel#copyrightNotice { color: #AAAAAA; font-size: 9px; } ");
|
||||
|
||||
@@ -193,45 +193,6 @@ void CThumbnailGenerator::GenerateForDirectory(const QString& path)
|
||||
//GetIEditor()->ShowConsole( false );
|
||||
}
|
||||
|
||||
void CThumbnailGenerator::GenerateForFile(const QString& fileName)
|
||||
void CThumbnailGenerator::GenerateForFile([[maybe_unused]] const QString& fileName)
|
||||
{
|
||||
return;
|
||||
|
||||
I3DEngine* engine = GetIEditor()->Get3DEngine();
|
||||
|
||||
int thumbSize = 128;
|
||||
CImageEx image;
|
||||
image.Allocate(thumbSize, thumbSize);
|
||||
|
||||
char drive[_MAX_DRIVE];
|
||||
char fdir[_MAX_DIR];
|
||||
char fname[_MAX_FNAME];
|
||||
char fext[_MAX_EXT];
|
||||
char bmpFile[1024];
|
||||
|
||||
_splitpath_s(fileName.toUtf8().data(), drive, fdir, fname, fext);
|
||||
|
||||
_makepath_s(bmpFile, drive, fdir, fname, ".tmb");
|
||||
FileTimeType ft1, ft2;
|
||||
GetThumbFileTime(fileName.toUtf8().data(), ft1);
|
||||
GetThumbFileTime(bmpFile, ft2);
|
||||
// Both cgf and bmp have same time stamp.
|
||||
if (ThumbFileTimeIsEqual(ft1, ft2))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_smart_ptr<IStatObj> obj = engine->LoadStatObjAutoRef(fileName.toUtf8().data(), NULL, NULL, false);
|
||||
if (obj)
|
||||
{
|
||||
assert(!"IStatObj::MakeObjectPicture does not exist anymore");
|
||||
// obj->MakeObjectPicture( (unsigned char*)image.GetData(),thumbSize );
|
||||
|
||||
CImageUtil::SaveBitmap(bmpFile, image);
|
||||
SetThumbFileTime(bmpFile, ft1);
|
||||
#if defined(AZ_PLATFORM_WINDOWS)
|
||||
SetFileAttributes(bmpFile, FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
|
||||
#endif
|
||||
obj->Release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,17 +100,17 @@ namespace TimeOfDayDetails
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef VERIFY
|
||||
#define VERIFY(EXPRESSION) { auto e = EXPRESSION; assert(e); }
|
||||
#endif
|
||||
|
||||
CHDRPane::CHDRPane(CTimeOfDayDialog* pTODDlg)
|
||||
: QWidget(pTODDlg)
|
||||
, m_pTODDlg(pTODDlg)
|
||||
, m_pVars(new CVarBlock)
|
||||
{
|
||||
assert(m_pTODDlg);
|
||||
VERIFY(Init());
|
||||
#if !defined(NDEBUG)
|
||||
bool ok =
|
||||
#endif
|
||||
Init();
|
||||
assert(ok);
|
||||
}
|
||||
|
||||
bool CHDRPane::Init()
|
||||
@@ -207,7 +207,10 @@ static float EvalFilmCurve(float x, float ss, float ms, float ts)
|
||||
void CHDRPane::UpdateFilmCurve()
|
||||
{
|
||||
float shoulderScale = 0, midScale = 0, toeScale = 0, whitePoint = 0;
|
||||
bool ok = GetFilmCurveParams(shoulderScale, midScale, toeScale, whitePoint);
|
||||
#if !defined(NDEBUG)
|
||||
bool ok =
|
||||
#endif
|
||||
GetFilmCurveParams(shoulderScale, midScale, toeScale, whitePoint);
|
||||
assert(ok);
|
||||
const float minX = -4.0f, minY = 0.0f, maxX = 4.0f;
|
||||
float maxY = 1.0f, stepY = 0.1f;
|
||||
|
||||
@@ -270,7 +270,7 @@ void ToolbarCustomizationDialog::NewToolbar(const QString &initialName)
|
||||
QString name = QInputDialog::getText(this, tr("New Toolbar"), tr("Toolbar name:"), QLineEdit::Normal, initialName);
|
||||
for (const AmazonToolbar &t : m_toolbarManager->GetToolbars()) {
|
||||
if (name == t.GetTranslatedName()) {
|
||||
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Warning"),
|
||||
QMessageBox::warning(this, tr("Warning"),
|
||||
tr("A toolbar with this name already exists. Please choose a different name."),
|
||||
QMessageBox::Ok);
|
||||
NewToolbar(name);
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
ToolbarManager::ToolbarManager(ActionManager* actionManager, MainWindow* mainWindow)
|
||||
: m_mainWindow(mainWindow)
|
||||
, m_actionManager(actionManager)
|
||||
, m_settings("amazon", "lumberyard")
|
||||
, m_settings("amazon", "O3DE")
|
||||
, m_expanderWatcher(new AmazonToolBarExpanderWatcher())
|
||||
{
|
||||
// Note that we don't actually save/load from AmazonToolbar::List
|
||||
@@ -705,25 +705,33 @@ void ToolbarManager::RestoreToolbarDefaults(const QString& toolbarName)
|
||||
const AmazonToolbar* defaultToolbar = FindDefaultToolbar(toolbarName);
|
||||
AmazonToolbar* existingToolbar = FindToolbar(toolbarName);
|
||||
Q_ASSERT(existingToolbar != nullptr);
|
||||
const bool isInstantiated = existingToolbar->IsInstantiated();
|
||||
|
||||
if (isInstantiated)
|
||||
if (existingToolbar != nullptr)
|
||||
{
|
||||
// We have a QToolBar instance, updated it too
|
||||
for (QAction* action : existingToolbar->Toolbar()->actions())
|
||||
const bool isInstantiated = existingToolbar->IsInstantiated();
|
||||
|
||||
if (isInstantiated)
|
||||
{
|
||||
existingToolbar->Toolbar()->removeAction(action);
|
||||
// We have a QToolBar instance, updated it too
|
||||
for (QAction* action : existingToolbar->Toolbar()->actions())
|
||||
{
|
||||
existingToolbar->Toolbar()->removeAction(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
existingToolbar->CopyActions(*defaultToolbar);
|
||||
Q_ASSERT(defaultToolbar != nullptr);
|
||||
if (defaultToolbar != nullptr)
|
||||
{
|
||||
existingToolbar->CopyActions(*defaultToolbar);
|
||||
}
|
||||
|
||||
if (isInstantiated)
|
||||
{
|
||||
existingToolbar->SetActionsOnInternalToolbar(m_actionManager);
|
||||
existingToolbar->UpdateAllowedAreas();
|
||||
if (isInstantiated)
|
||||
{
|
||||
existingToolbar->SetActionsOnInternalToolbar(m_actionManager);
|
||||
existingToolbar->UpdateAllowedAreas();
|
||||
}
|
||||
SaveToolbars();
|
||||
}
|
||||
SaveToolbars();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1166,7 +1174,7 @@ bool EditableQToolBar::eventFilter(QObject* obj, QEvent* ev)
|
||||
mimeData->setText(action->text());
|
||||
drag->setMimeData(mimeData);
|
||||
|
||||
Qt::DropAction dropAction = drag->exec();
|
||||
drag->exec();
|
||||
m_dndIndicator->setLastDragPos(QPoint());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -102,8 +102,6 @@ bool CSelectKeyUIControls::OnKeySelectionChange(CTrackViewKeyBundle& selectedKey
|
||||
ResetCameraEntries();
|
||||
|
||||
// Get All cameras.
|
||||
CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence();
|
||||
|
||||
mv_camera.SetEnumList(NULL);
|
||||
|
||||
mv_camera->AddEnumItem(QObject::tr("<None>"), QString::number(static_cast<AZ::u64>(AZ::EntityId::InvalidEntityId)));
|
||||
@@ -223,7 +221,6 @@ void CSelectKeyUIControls::OnCameraRemoved(const AZ::EntityId & cameraId)
|
||||
// We can't iterate or remove an item from the enum list, and Camera::CameraRequests::GetCameras
|
||||
// still includes the deleted camera at this point. Reset the list anyway and filter out the
|
||||
// deleted camera.
|
||||
IVarEnumList* oldList = mv_camera->GetEnumList();
|
||||
mv_camera->SetEnumList(NULL);
|
||||
mv_camera->AddEnumItem(QObject::tr("<None>"), QString::number(static_cast<AZ::u64>(AZ::EntityId::InvalidEntityId)));
|
||||
|
||||
|
||||
@@ -239,8 +239,6 @@ CTVEventsDialog::~CTVEventsDialog()
|
||||
|
||||
void CTVEventsDialog::OnBnClickedButtonAddEvent()
|
||||
{
|
||||
CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence();
|
||||
|
||||
const QString add = QInputDialog::getText(this, tr("Track Event Name"), QString());
|
||||
if (!add.isEmpty() && static_cast<TVEventsModel*>(m_ui->m_List->model())->addRow(add))
|
||||
{
|
||||
@@ -252,8 +250,6 @@ void CTVEventsDialog::OnBnClickedButtonAddEvent()
|
||||
|
||||
void CTVEventsDialog::OnBnClickedButtonRemoveEvent()
|
||||
{
|
||||
CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence();
|
||||
|
||||
QList<QPersistentModelIndex> indexes;
|
||||
for (auto index : m_ui->m_List->selectionModel()->selectedRows())
|
||||
{
|
||||
@@ -304,8 +300,7 @@ void CTVEventsDialog::OnInitDialog()
|
||||
m_ui->m_List->setModel(new TVEventsModel(this));
|
||||
m_ui->m_List->header()->resizeSections(QHeaderView::ResizeToContents);
|
||||
|
||||
CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence();
|
||||
assert(sequence);
|
||||
assert(GetIEditor()->GetAnimation()->GetSequence());
|
||||
|
||||
UpdateButtons();
|
||||
}
|
||||
|
||||
@@ -1870,7 +1870,7 @@ void CTrackViewDialog::ReadMiscSettings()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewDialog::SaveLayouts()
|
||||
{
|
||||
QSettings settings("Amazon", "Lumberyard");
|
||||
QSettings settings("Amazon", "O3DE");
|
||||
settings.beginGroup("TrackView");
|
||||
QByteArray stateData = this->saveState();
|
||||
settings.setValue("layout", stateData);
|
||||
@@ -1886,7 +1886,7 @@ void CTrackViewDialog::SaveLayouts()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewDialog::ReadLayouts()
|
||||
{
|
||||
QSettings settings("Amazon", "Lumberyard");
|
||||
QSettings settings("Amazon", "O3DE");
|
||||
settings.beginGroup("TrackView");
|
||||
|
||||
setViewMode(static_cast<ViewMode>(settings.value("lastViewMode").toInt()));
|
||||
|
||||
@@ -1405,7 +1405,6 @@ void CTrackViewDopeSheetBase::ShowKeyTooltip(CTrackViewKeyHandle& keyHandle, con
|
||||
|
||||
const float time = keyHandle.GetTime();
|
||||
const char* desc = keyHandle.GetDescription();
|
||||
float duration = keyHandle.GetDuration();
|
||||
|
||||
QString tipText;
|
||||
if (GetTickDisplayMode() == eTVTickMode_InSeconds)
|
||||
@@ -1848,8 +1847,6 @@ void CTrackViewDopeSheetBase::SetScrollOffset(int hpos)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewDopeSheetBase::LButtonDownOnTimeAdjustBar([[maybe_unused]] const QPoint& point, CTrackViewKeyHandle& keyHandle, bool bStart)
|
||||
{
|
||||
CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence();
|
||||
|
||||
m_keyTimeOffset = 0;
|
||||
m_keyForTimeAdjust = keyHandle;
|
||||
|
||||
@@ -2568,9 +2565,6 @@ void CTrackViewDopeSheetBase::DrawTrack(CTrackViewTrack* pTrack, QPainter* paint
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewDopeSheetBase::DrawSelectTrack(const Range& timeRange, QPainter* painter, CTrackViewTrack* pTrack, const QRect& rc)
|
||||
{
|
||||
int x0 = TimeToClient(timeRange.start);
|
||||
float t0 = timeRange.start;
|
||||
|
||||
const QBrush prevBrush = painter->brush();
|
||||
painter->setBrush(m_selectTrackBrush);
|
||||
|
||||
@@ -2682,9 +2676,6 @@ void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* pa
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewDopeSheetBase::DrawSequenceTrack(const Range& timeRange, QPainter* painter, CTrackViewTrack* pTrack, const QRect& rc)
|
||||
{
|
||||
int x0 = TimeToClient(timeRange.start);
|
||||
float t0 = timeRange.start;
|
||||
|
||||
const QBrush prevBrush = painter->brush();
|
||||
painter->setBrush(m_selectTrackBrush);
|
||||
|
||||
@@ -3386,7 +3377,6 @@ void CTrackViewDopeSheetBase::DrawTimeline(QPainter* painter, const QRect& rcUpd
|
||||
const QPen black(textCol);
|
||||
const QPen redpen(lineCol);
|
||||
// Draw time ticks every tick step seconds.
|
||||
const Range& timeRange = m_timeRange;
|
||||
|
||||
painter->setPen(dkgray);
|
||||
|
||||
|
||||
@@ -631,8 +631,6 @@ CTrackViewNodesCtrl::CRecord* CTrackViewNodesCtrl::AddAnimNodeRecord(CRecord* pP
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CTrackViewNodesCtrl::CRecord* CTrackViewNodesCtrl::AddTrackRecord(CRecord* pParentRecord, CTrackViewTrack* pTrack)
|
||||
{
|
||||
const CTrackViewAnimNode* animNode = pTrack->GetAnimNode();
|
||||
|
||||
CRecord* pNewTrackRecord = new CRecord(pTrack);
|
||||
pNewTrackRecord->setSizeHint(0, QSize(30, 18));
|
||||
pNewTrackRecord->setText(0, pTrack->GetName());
|
||||
@@ -785,7 +783,6 @@ void CTrackViewNodesCtrl::UpdateAnimNodeRecord(CRecord* record, CTrackViewAnimNo
|
||||
if (nodeType == AnimNodeType::Component)
|
||||
{
|
||||
// get the component icon from cached component icons
|
||||
bool searchCompleted = false;
|
||||
|
||||
AZ::Entity* azEntity = nullptr;
|
||||
AZ::ComponentApplicationBus::BroadcastResult(azEntity, &AZ::ComponentApplicationBus::Events::FindEntity,
|
||||
@@ -1526,7 +1523,7 @@ void CTrackViewNodesCtrl::OnNMRclick(QPoint point)
|
||||
if (animNode)
|
||||
{
|
||||
QString matName;
|
||||
int subMtlIndex = GetMatNameAndSubMtlIndexFromName(matName, animNode->GetName());
|
||||
GetMatNameAndSubMtlIndexFromName(matName, animNode->GetName());
|
||||
QString newMatName;
|
||||
newMatName = tr("%1.[%2]").arg(matName).arg(cmd - eMI_SelectSubmaterialBase + 1);
|
||||
CUndo undo("Rename TrackView node");
|
||||
@@ -1671,7 +1668,6 @@ void CTrackViewNodesCtrl::ImportFromFBX()
|
||||
|
||||
for (unsigned int trackID = 0; trackID < numTracks; ++trackID)
|
||||
{
|
||||
CTrackViewTrack* pTrack = tracks.GetTrack(trackID);
|
||||
undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId());
|
||||
}
|
||||
|
||||
@@ -2275,7 +2271,6 @@ int CTrackViewNodesCtrl::ShowPopupMenuMultiSelection(SContextMenu& contextMenu)
|
||||
for (int currentNode = 0; currentNode < records.size(); ++currentNode)
|
||||
{
|
||||
CRecord* pItemInfo = (CRecord*)records[currentNode];
|
||||
ETrackViewNodeType type = pItemInfo->GetNode()->GetNodeType();
|
||||
|
||||
if (pItemInfo->GetNode()->GetNodeType() == eTVNT_AnimNode)
|
||||
{
|
||||
@@ -2622,7 +2617,8 @@ void CTrackViewNodesCtrl::ShowNextResult()
|
||||
|
||||
if (!items.empty())
|
||||
{
|
||||
m_currentMatchIndex = ++m_currentMatchIndex % m_matchCount;
|
||||
++m_currentMatchIndex;
|
||||
m_currentMatchIndex = m_currentMatchIndex % m_matchCount;
|
||||
ui->treeWidget->selectionModel()->clear();
|
||||
items[m_currentMatchIndex]->setSelected(true);
|
||||
}
|
||||
@@ -2812,8 +2808,7 @@ CTrackViewNodesCtrl::CRecord* CTrackViewNodesCtrl::GetNodeRecord(const CTrackVie
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CRecord* record = findIter->second;
|
||||
assert (record->GetNode() == pNode);
|
||||
assert (findIter->second->GetNode() == pNode);
|
||||
return findIter->second;
|
||||
}
|
||||
|
||||
|
||||
@@ -481,8 +481,6 @@ namespace
|
||||
default:
|
||||
throw std::runtime_error("Unsupported key type");
|
||||
}
|
||||
|
||||
return AZStd::any();
|
||||
}
|
||||
|
||||
AZStd::any PyTrackViewGetKeyValue(const char* paramName, int trackIndex, int keyIndex, const char* nodeName, const char* parentDirectorName)
|
||||
|
||||
@@ -1273,7 +1273,6 @@ void CTrackViewSequence::OffsetSelectedKeys(const float timeOffset)
|
||||
// may become invalid after sorted with a new time.
|
||||
bool notifyListeners = false;
|
||||
|
||||
const CTrackViewTrack* pTrack = nullptr;
|
||||
for (int k = 0; k < (int)selectedKeys.GetKeyCount(); ++k)
|
||||
{
|
||||
CTrackViewKeyHandle skey = selectedKeys.GetKey(k);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user