Merge branch 'main' into scripting/scriptevent_spec_6430
This commit is contained in:
@@ -170,6 +170,15 @@ namespace AzToolsFramework
|
||||
return m_filter;
|
||||
}
|
||||
|
||||
QSharedPointer<CompositeFilter> SearchWidget::GetStringFilter() const
|
||||
{
|
||||
return m_stringFilter;
|
||||
}
|
||||
|
||||
QSharedPointer<CompositeFilter> SearchWidget::GetTypesFilter() const
|
||||
{
|
||||
return m_typesFilter;
|
||||
}
|
||||
} // namespace AssetBrowser
|
||||
} // namespace AzToolsFramework
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@ namespace AzToolsFramework
|
||||
|
||||
QSharedPointer<CompositeFilter> GetFilter() const;
|
||||
|
||||
QSharedPointer<CompositeFilter> GetStringFilter() const;
|
||||
|
||||
QSharedPointer<CompositeFilter> GetTypesFilter() const;
|
||||
|
||||
QString GetFilterString() const { return textFilter(); }
|
||||
void ClearStringFilter() { ClearTextFilter(); }
|
||||
|
||||
|
||||
@@ -79,7 +79,9 @@ namespace AzToolsFramework
|
||||
int realHeight = qMin(aznumeric_cast<int>(originalWidth /aspectRatio), originalHeight);
|
||||
int realWidth = aznumeric_cast<int>(realHeight * aspectRatio);
|
||||
int x = (originalWidth - realWidth) / 2;
|
||||
painter.drawPixmap(QRect(x, 0, realHeight, realWidth), pixmap);
|
||||
// pixmap needs to be manually scaled to produce smoother result and avoid looking pixelated
|
||||
// using painter.setRenderHint(QPainter::SmoothPixmapTransform); does not seem to work
|
||||
painter.drawPixmap(QPoint(x, 0), pixmap.scaled(realWidth, realHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
}
|
||||
QWidget::paintEvent(event);
|
||||
}
|
||||
|
||||
+3
-2
@@ -1344,14 +1344,15 @@ namespace AzToolsFramework
|
||||
emit EnableSelectionUpdates(false);
|
||||
auto parentIndex = GetIndexFromEntity(parentId);
|
||||
auto childIndex = GetIndexFromEntity(childId);
|
||||
beginRemoveRows(parentIndex, childIndex.row(), childIndex.row());
|
||||
beginResetModel();
|
||||
}
|
||||
|
||||
void EntityOutlinerListModel::OnEntityInfoUpdatedRemoveChildEnd(AZ::EntityId parentId, AZ::EntityId childId)
|
||||
{
|
||||
(void)childId;
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
endRemoveRows();
|
||||
|
||||
endResetModel();
|
||||
|
||||
//must refresh partial lock/visibility of parents
|
||||
m_isFilterDirty = true;
|
||||
|
||||
@@ -1,142 +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.
|
||||
|
||||
#include "EditorDefs.h"
|
||||
|
||||
#include "AlignTool.h"
|
||||
|
||||
// Editor
|
||||
#include "Objects/BaseObject.h"
|
||||
#include "Objects/SelectionGroup.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CAlignPickCallback::m_bActive = false;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Called when object picked.
|
||||
void CAlignPickCallback::OnPick(CBaseObject* picked)
|
||||
{
|
||||
Matrix34 pickedTM(picked->GetWorldTM());
|
||||
|
||||
AABB pickedAABB;
|
||||
picked->GetBoundBox(pickedAABB);
|
||||
pickedAABB.Move(-pickedTM.GetTranslation());
|
||||
Vec3 pickedPivot = pickedAABB.GetCenter();
|
||||
|
||||
AABB pickedLocalAABB;
|
||||
picked->GetLocalBounds(pickedLocalAABB);
|
||||
|
||||
const Quat& pickedRot = picked->GetRotation();
|
||||
const Vec3& pickedScale = picked->GetScale();
|
||||
const Vec3& pickedPos = picked->GetPos();
|
||||
|
||||
bool bKeepScale = CheckVirtualKey(Qt::Key_Shift);
|
||||
bool bKeepRotation = CheckVirtualKey(Qt::Key_Alt);
|
||||
bool bAlignToBoundBox = CheckVirtualKey(Qt::Key_Control);
|
||||
bool bApplyTransform = !bKeepScale && !bKeepRotation && !bAlignToBoundBox;
|
||||
|
||||
{
|
||||
bool bUndo = !CUndo::IsRecording();
|
||||
if (bUndo)
|
||||
{
|
||||
GetIEditor()->BeginUndo();
|
||||
}
|
||||
|
||||
CSelectionGroup* selGroup = GetIEditor()->GetSelection();
|
||||
selGroup->FilterParents();
|
||||
|
||||
for (int i = 0; i < selGroup->GetFilteredCount(); i++)
|
||||
{
|
||||
CBaseObject* pMovedObj = selGroup->GetFilteredObject(i);
|
||||
|
||||
if (bKeepScale || bKeepRotation || bApplyTransform)
|
||||
{
|
||||
if (bKeepScale && bKeepRotation) // Keep scale and rotation of a moved object
|
||||
{
|
||||
pMovedObj->SetWorldTM(Matrix34::Create(pMovedObj->GetScale(), pMovedObj->GetRotation(), pickedPos), eObjectUpdateFlags_UserInput);
|
||||
}
|
||||
else if (bKeepScale) // Keep only scale of a moved object
|
||||
{
|
||||
pMovedObj->SetWorldTM(Matrix34::Create(pMovedObj->GetScale(), pickedRot, pickedPos), eObjectUpdateFlags_UserInput);
|
||||
}
|
||||
else if (bKeepRotation) // Keep only rotation of a moved object
|
||||
{
|
||||
pMovedObj->SetWorldTM(Matrix34::Create(pickedScale, pMovedObj->GetRotation(), pickedPos), eObjectUpdateFlags_UserInput);
|
||||
}
|
||||
else // Scale, Rotation and Position of a picked object are applied to a moved object.
|
||||
{
|
||||
pMovedObj->SetWorldTM(pickedTM, eObjectUpdateFlags_UserInput);
|
||||
}
|
||||
}
|
||||
else if (bAlignToBoundBox) // align to the bounding box.
|
||||
{
|
||||
if (pickedLocalAABB.GetVolume() == 0.0f)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
AABB movedLocalAABB;
|
||||
pMovedObj->GetLocalBounds(movedLocalAABB);
|
||||
if (fabs(movedLocalAABB.max.x - movedLocalAABB.min.x) < VEC_EPSILON &&
|
||||
fabs(movedLocalAABB.max.y - movedLocalAABB.min.y) < VEC_EPSILON &&
|
||||
fabs(movedLocalAABB.max.z - movedLocalAABB.min.z) < VEC_EPSILON)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const Vec3& movedScale(pMovedObj->GetScale());
|
||||
Matrix34 movedScaleTM = Matrix34::CreateScale(movedScale);
|
||||
AABB movedLocalScaledAABB;
|
||||
movedLocalScaledAABB.min = movedScaleTM.TransformVector(movedLocalAABB.min);
|
||||
movedLocalScaledAABB.max = movedScaleTM.TransformVector(movedLocalAABB.max);
|
||||
|
||||
float fMovedWidth = movedLocalScaledAABB.max.x - movedLocalScaledAABB.min.x;
|
||||
float fMovedHeight = movedLocalScaledAABB.max.z - movedLocalScaledAABB.min.z;
|
||||
float fMovedLength = movedLocalScaledAABB.max.y - movedLocalScaledAABB.min.y;
|
||||
|
||||
Matrix34 pickedScaleTM = Matrix34::CreateScale(picked->GetScale());
|
||||
AABB pickedLocalScaledAABB;
|
||||
pickedLocalScaledAABB.min = pickedScaleTM.TransformVector(pickedLocalAABB.min);
|
||||
pickedLocalScaledAABB.max = pickedScaleTM.TransformVector(pickedLocalAABB.max);
|
||||
float fScaledPickedtWidth = pickedLocalScaledAABB.max.x - pickedLocalScaledAABB.min.x;
|
||||
float fScaledPickedHeight = pickedLocalScaledAABB.max.z - pickedLocalScaledAABB.min.z;
|
||||
float fScaledPickedLength = pickedLocalScaledAABB.max.y - pickedLocalScaledAABB.min.y;
|
||||
|
||||
Vec3 scale((fScaledPickedtWidth / fMovedWidth) * movedScale.x, (fScaledPickedLength / fMovedLength) * movedScale.y, (fScaledPickedHeight / fMovedHeight) * movedScale.z);
|
||||
Matrix34 scaleRotTM = Matrix34::Create(scale, pickedRot, Vec3(0, 0, 0));
|
||||
Vec3 movedPivot = scaleRotTM.TransformVector(movedLocalAABB.GetCenter());
|
||||
|
||||
pMovedObj->SetWorldTM(Matrix34::Create(scale, pickedRot, Vec3(pickedPos + (pickedPivot - movedPivot))), eObjectUpdateFlags_UserInput);
|
||||
}
|
||||
}
|
||||
m_bActive = false;
|
||||
if (bUndo)
|
||||
{
|
||||
GetIEditor()->AcceptUndo("Align To Object");
|
||||
}
|
||||
}
|
||||
delete this;
|
||||
}
|
||||
|
||||
//! Called when pick mode cancelled.
|
||||
void CAlignPickCallback::OnCancelPick()
|
||||
{
|
||||
m_bActive = false;
|
||||
delete this;
|
||||
}
|
||||
|
||||
//! Return true if specified object is pickable.
|
||||
bool CAlignPickCallback::OnPickFilter([[maybe_unused]] CBaseObject* filterObject)
|
||||
{
|
||||
return true;
|
||||
};
|
||||
@@ -1,40 +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.
|
||||
|
||||
#ifndef CRYINCLUDE_EDITOR_ALIGNTOOL_H
|
||||
#define CRYINCLUDE_EDITOR_ALIGNTOOL_H
|
||||
|
||||
#pragma once
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
class CAlignPickCallback
|
||||
: public IPickObjectCallback
|
||||
{
|
||||
public:
|
||||
CAlignPickCallback() { m_bActive = true; };
|
||||
//! Called when object picked.
|
||||
virtual void OnPick(CBaseObject* picked);
|
||||
//! Called when pick mode cancelled.
|
||||
virtual void OnCancelPick();
|
||||
//! Return true if specified object is pickable.
|
||||
virtual bool OnPickFilter(CBaseObject* filterObject);
|
||||
|
||||
static bool IsActive() { return m_bActive; }
|
||||
|
||||
virtual bool IsNeedSpecificBehaviorForSpaceAcce() { return true; }
|
||||
private:
|
||||
static bool m_bActive;
|
||||
};
|
||||
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_ALIGNTOOL_H
|
||||
@@ -580,7 +580,6 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe
|
||||
|
||||
auto alignMenu = modifyMenu.AddMenu(tr("Align"));
|
||||
alignMenu.AddAction(ID_OBJECTMODIFY_ALIGNTOGRID);
|
||||
alignMenu.AddAction(ID_OBJECTMODIFY_ALIGN);
|
||||
alignMenu.AddAction(ID_MODIFY_ALIGNOBJTOSURF);
|
||||
|
||||
auto constrainMenu = modifyMenu.AddMenu(tr("Constrain"));
|
||||
|
||||
@@ -95,8 +95,6 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
#include "Core/QtEditorApplication.h"
|
||||
#include "StringDlg.h"
|
||||
#include "LinkTool.h"
|
||||
#include "AlignTool.h"
|
||||
#include "VoxelAligningTool.h"
|
||||
#include "NewLevelDialog.h"
|
||||
#include "GridSettingsDialog.h"
|
||||
@@ -126,7 +124,6 @@ AZ_POP_DISABLE_WARNING
|
||||
#include "EditorPreferencesDialog.h"
|
||||
#include "GraphicsSettingsDialog.h"
|
||||
#include "FeedbackDialog/FeedbackDialog.h"
|
||||
#include "MatEditMainDlg.h"
|
||||
#include "AnimationContext.h"
|
||||
|
||||
#include "GotoPositionDlg.h"
|
||||
@@ -401,8 +398,6 @@ void CCryEditApp::RegisterActionHandlers()
|
||||
ON_COMMAND(ID_EDITMODE_MOVE, OnEditmodeMove)
|
||||
ON_COMMAND(ID_EDITMODE_ROTATE, OnEditmodeRotate)
|
||||
ON_COMMAND(ID_EDITMODE_SCALE, OnEditmodeScale)
|
||||
ON_COMMAND(ID_EDITTOOL_LINK, OnEditToolLink)
|
||||
ON_COMMAND(ID_EDITTOOL_UNLINK, OnEditToolUnlink)
|
||||
ON_COMMAND(ID_EDITMODE_SELECT, OnEditmodeSelect)
|
||||
ON_COMMAND(ID_EDIT_ESCAPE, OnEditEscape)
|
||||
ON_COMMAND(ID_OBJECTMODIFY_SETAREA, OnObjectSetArea)
|
||||
@@ -422,7 +417,6 @@ void CCryEditApp::RegisterActionHandlers()
|
||||
ON_COMMAND(ID_SELECTION_SAVE, OnSelectionSave)
|
||||
ON_COMMAND(ID_IMPORT_ASSET, OnOpenAssetImporter)
|
||||
ON_COMMAND(ID_SELECTION_LOAD, OnSelectionLoad)
|
||||
ON_COMMAND(ID_OBJECTMODIFY_ALIGN, OnAlignObject)
|
||||
ON_COMMAND(ID_MODIFY_ALIGNOBJTOSURF, OnAlignToVoxel)
|
||||
ON_COMMAND(ID_OBJECTMODIFY_ALIGNTOGRID, OnAlignToGrid)
|
||||
ON_COMMAND(ID_LOCK_SELECTION, OnLockSelection)
|
||||
@@ -1898,14 +1892,6 @@ BOOL CCryEditApp::InitInstance()
|
||||
CWipFeatureManager::Init();
|
||||
#endif
|
||||
|
||||
if (GetIEditor()->IsInMatEditMode())
|
||||
{
|
||||
m_pMatEditDlg = new CMatEditMainDlg(QStringLiteral("Material Editor"));
|
||||
m_pEditor->InitFinished();
|
||||
m_pMatEditDlg->show();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!m_bConsoleMode && !m_bPreviewMode)
|
||||
{
|
||||
GetIEditor()->UpdateViews();
|
||||
@@ -2905,51 +2891,6 @@ void CCryEditApp::OnEditmodeScale()
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnEditToolLink()
|
||||
{
|
||||
// TODO: Add your command handler code here
|
||||
if (qobject_cast<CLinkTool*>(GetIEditor()->GetEditTool()))
|
||||
{
|
||||
GetIEditor()->SetEditTool(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetIEditor()->SetEditTool(new CLinkTool());
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnUpdateEditToolLink(QAction* action)
|
||||
{
|
||||
if (!GetIEditor()->GetDocument())
|
||||
{
|
||||
action->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
action->setEnabled(GetIEditor()->GetDocument()->IsDocumentReady());
|
||||
CEditTool* pEditTool = GetIEditor()->GetEditTool();
|
||||
action->setChecked(qobject_cast<CLinkTool*>(pEditTool) != nullptr);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnEditToolUnlink()
|
||||
{
|
||||
CUndo undo("Unlink Object(s)");
|
||||
CSelectionGroup* pSelection = GetIEditor()->GetObjectManager()->GetSelection();
|
||||
for (int i = 0; i < pSelection->GetCount(); i++)
|
||||
{
|
||||
CBaseObject* pBaseObj = pSelection->GetObject(i);
|
||||
pBaseObj->DetachThis();
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnUpdateEditToolUnlink(QAction* action)
|
||||
{
|
||||
action->setEnabled(false);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnEditmodeSelect()
|
||||
{
|
||||
@@ -3519,14 +3460,6 @@ void CCryEditApp::OnUpdateSelected(QAction* action)
|
||||
action->setEnabled(!GetIEditor()->GetSelection()->IsEmpty());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnAlignObject()
|
||||
{
|
||||
// Align pick callback will release itself.
|
||||
CAlignPickCallback* alignCallback = new CAlignPickCallback;
|
||||
GetIEditor()->PickObject(alignCallback, 0, "Align to Object");
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnAlignToGrid()
|
||||
{
|
||||
@@ -3547,15 +3480,6 @@ void CCryEditApp::OnAlignToGrid()
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnUpdateAlignObject(QAction* action)
|
||||
{
|
||||
Q_ASSERT(action->isCheckable());
|
||||
action->setChecked(CAlignPickCallback::IsActive());
|
||||
|
||||
action->setEnabled(!GetIEditor()->GetSelection()->IsEmpty());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnAlignToVoxel()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
class CCryDocManager;
|
||||
class CQuickAccessBar;
|
||||
class CMatEditMainDlg;
|
||||
class CCryEditDoc;
|
||||
class CEditCommandLineInfo;
|
||||
class CMainFrame;
|
||||
@@ -225,10 +224,6 @@ public:
|
||||
void OnEditmodeMove();
|
||||
void OnEditmodeRotate();
|
||||
void OnEditmodeScale();
|
||||
void OnEditToolLink();
|
||||
void OnUpdateEditToolLink(QAction* action);
|
||||
void OnEditToolUnlink();
|
||||
void OnUpdateEditToolUnlink(QAction* action);
|
||||
void OnEditmodeSelect();
|
||||
void OnEditEscape();
|
||||
void OnObjectSetArea();
|
||||
@@ -257,10 +252,8 @@ public:
|
||||
void OnOpenAssetImporter();
|
||||
void OnSelectionLoad();
|
||||
void OnUpdateSelected(QAction* action);
|
||||
void OnAlignObject();
|
||||
void OnAlignToVoxel();
|
||||
void OnAlignToGrid();
|
||||
void OnUpdateAlignObject(QAction* action);
|
||||
void OnUpdateAlignToVoxel(QAction* action);
|
||||
void OnLockSelection();
|
||||
void OnEditLevelData();
|
||||
@@ -367,7 +360,6 @@ private:
|
||||
//! Autotest mode: Special mode meant for automated testing, things like blocking dialogs or error report windows won't appear
|
||||
bool m_bAutotestMode = false;
|
||||
|
||||
CMatEditMainDlg* m_pMatEditDlg = nullptr;
|
||||
CConsoleDialog* m_pConsoleDialog = nullptr;
|
||||
|
||||
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
|
||||
@@ -276,9 +276,6 @@ void EditorViewportWidget::paintEvent([[maybe_unused]] QPaintEvent* event)
|
||||
if ((ge && ge->IsLevelLoaded()) || (GetType() != ET_ViewportCamera))
|
||||
{
|
||||
setRenderOverlayVisible(true);
|
||||
m_isOnPaint = true;
|
||||
Update();
|
||||
m_isOnPaint = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -809,6 +806,10 @@ void EditorViewportWidget::OnBeginPrepareRender()
|
||||
return;
|
||||
}
|
||||
|
||||
m_isOnPaint = true;
|
||||
Update();
|
||||
m_isOnPaint = false;
|
||||
|
||||
float fNearZ = GetIEditor()->GetConsoleVar("cl_DefaultNearPlane");
|
||||
float fFarZ = m_Camera.GetFarPlane();
|
||||
|
||||
@@ -880,6 +881,11 @@ void EditorViewportWidget::OnBeginPrepareRender()
|
||||
|
||||
GetIEditor()->GetSystem()->SetViewCamera(m_Camera);
|
||||
|
||||
if (GetIEditor()->IsInGameMode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PreWidgetRendering();
|
||||
|
||||
RenderAll();
|
||||
@@ -905,11 +911,6 @@ void EditorViewportWidget::OnBeginPrepareRender()
|
||||
m_debugDisplay->DepthTestOn();
|
||||
|
||||
PostWidgetRendering();
|
||||
|
||||
if (!m_renderer->IsStereoEnabled())
|
||||
{
|
||||
GetIEditor()->GetSystem()->RenderStatistics();
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -391,21 +391,6 @@ enum EModifiedModule
|
||||
eModifiedAll = -1
|
||||
};
|
||||
|
||||
//! Callback class passed to PickObject.
|
||||
struct IPickObjectCallback
|
||||
{
|
||||
virtual ~IPickObjectCallback() = default;
|
||||
|
||||
//! Called when object picked.
|
||||
virtual void OnPick(CBaseObject* picked) = 0;
|
||||
//! Called when pick mode cancelled.
|
||||
virtual void OnCancelPick() = 0;
|
||||
//! Return true if specified object is pickable.
|
||||
virtual bool OnPickFilter([[maybe_unused]] CBaseObject* filterObject) { return true; };
|
||||
//! If need a specific behavior when holding space, return true or if not, return false.
|
||||
virtual bool IsNeedSpecificBehaviorForSpaceAcce() { return false; }
|
||||
};
|
||||
|
||||
//! Class provided by editor for various registration functions.
|
||||
struct CRegistrationContext
|
||||
{
|
||||
@@ -570,20 +555,6 @@ struct IEditor
|
||||
//! Get access to object manager.
|
||||
virtual struct IObjectManager* GetObjectManager() = 0;
|
||||
virtual CSettingsManager* GetSettingsManager() = 0;
|
||||
//! Set pick object mode.
|
||||
//! When object picked callback will be called, with OnPick
|
||||
//! If pick operation is canceled Cancel will be called
|
||||
//! @param targetClass specifies objects of which class are supposed to be picked
|
||||
//! @param bMultipick if true pick tool will pick multiple object
|
||||
virtual void PickObject(
|
||||
IPickObjectCallback* callback,
|
||||
const QMetaObject* targetClass = 0,
|
||||
const char* statusText = 0,
|
||||
bool bMultipick = false) = 0;
|
||||
//! Cancel current pick operation
|
||||
virtual void CancelPick() = 0;
|
||||
//! Return true if editor now in object picking mode
|
||||
virtual bool IsPicking() = 0;
|
||||
//! Get DB manager that own items of specified type.
|
||||
virtual IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) = 0;
|
||||
//! Get Manager of Materials.
|
||||
|
||||
@@ -65,7 +65,6 @@ AZ_POP_DISABLE_WARNING
|
||||
#include "UIEnumsDatabase.h"
|
||||
#include "Util/Ruler.h"
|
||||
#include "RenderHelpers/AxisHelper.h"
|
||||
#include "PickObjectTool.h"
|
||||
#include "Settings.h"
|
||||
#include "Include/IObjectManager.h"
|
||||
#include "Include/ISourceControl.h"
|
||||
@@ -170,7 +169,6 @@ CEditorImpl::CEditorImpl()
|
||||
, m_pShaderEnum(nullptr)
|
||||
, m_pIconManager(nullptr)
|
||||
, m_bSelectionLocked(true)
|
||||
, m_pPickTool(nullptr)
|
||||
, m_pAxisGizmo(nullptr)
|
||||
, m_pGameEngine(nullptr)
|
||||
, m_pAnimationContext(nullptr)
|
||||
@@ -794,11 +792,6 @@ void CEditorImpl::SetEditTool(CEditTool* tool, bool bStopCurrentTool)
|
||||
m_pEditTool->BeginEditParams(this, 0);
|
||||
}
|
||||
|
||||
// Make sure pick is aborted.
|
||||
if (tool != m_pPickTool)
|
||||
{
|
||||
m_pPickTool = nullptr;
|
||||
}
|
||||
Notify(eNotify_OnEditToolChange);
|
||||
}
|
||||
|
||||
@@ -1069,34 +1062,6 @@ bool CEditorImpl::IsSelectionLocked()
|
||||
return m_bSelectionLocked;
|
||||
}
|
||||
|
||||
void CEditorImpl::PickObject(IPickObjectCallback* callback, const QMetaObject* targetClass, const char* statusText, bool bMultipick)
|
||||
{
|
||||
m_pPickTool = new CPickObjectTool(callback, targetClass);
|
||||
|
||||
static_cast<CPickObjectTool*>(m_pPickTool.get())->SetMultiplePicks(bMultipick);
|
||||
if (statusText)
|
||||
{
|
||||
m_pPickTool.get()->SetStatusText(statusText);
|
||||
}
|
||||
|
||||
SetEditTool(m_pPickTool);
|
||||
}
|
||||
|
||||
void CEditorImpl::CancelPick()
|
||||
{
|
||||
SetEditTool(0);
|
||||
m_pPickTool = 0;
|
||||
}
|
||||
|
||||
bool CEditorImpl::IsPicking()
|
||||
{
|
||||
if (GetEditTool() == m_pPickTool && m_pPickTool != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
CViewManager* CEditorImpl::GetViewManager()
|
||||
{
|
||||
return m_pViewManager;
|
||||
|
||||
@@ -181,10 +181,7 @@ public:
|
||||
void SelectObject(CBaseObject* obj);
|
||||
void LockSelection(bool bLock);
|
||||
bool IsSelectionLocked();
|
||||
void PickObject(IPickObjectCallback* callback, const QMetaObject* targetClass = 0, const char* statusText = 0, bool bMultipick = false);
|
||||
|
||||
void CancelPick();
|
||||
bool IsPicking();
|
||||
IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType);
|
||||
CMaterialManager* GetMaterialManager() { return m_pMaterialManager; }
|
||||
CMusicManager* GetMusicManager() { return m_pMusicManager; };
|
||||
@@ -409,7 +406,6 @@ protected:
|
||||
QString m_primaryCDFolder;
|
||||
QString m_userFolder;
|
||||
bool m_bSelectionLocked;
|
||||
_smart_ptr<CEditTool> m_pPickTool;
|
||||
class CAxisGizmo* m_pAxisGizmo;
|
||||
CGameEngine* m_pGameEngine;
|
||||
CAnimationContext* m_pAnimationContext;
|
||||
|
||||
@@ -418,8 +418,11 @@ void CLayoutWnd::CreateLayout(EViewLayout layout, bool bBindViewports, EViewport
|
||||
QRect rcView = rect();
|
||||
rcView.setBottom(rcView.bottom() - m_infoBar->height());
|
||||
|
||||
// Ensure we delete our old view immediately so it can relinquish its backing ViewportContext
|
||||
if (m_maximizedView)
|
||||
m_maximizedView->deleteLater();
|
||||
{
|
||||
delete m_maximizedView;
|
||||
}
|
||||
|
||||
m_maximizedView = new CLayoutViewPane(this);
|
||||
m_maximizedView->SetId(0);
|
||||
|
||||
@@ -90,9 +90,6 @@ public:
|
||||
MOCK_METHOD0(IsSelectionLocked, bool());
|
||||
MOCK_METHOD0(GetObjectManager, struct IObjectManager* ());
|
||||
MOCK_METHOD0(GetSettingsManager, CSettingsManager* ());
|
||||
MOCK_METHOD4(PickObject, void(IPickObjectCallback*,const QMetaObject*,const char* ,bool bMultipick));
|
||||
MOCK_METHOD0(CancelPick, void());
|
||||
MOCK_METHOD0(IsPicking, bool());
|
||||
MOCK_METHOD1(GetDBItemManager, IDataBaseManager* (EDataBaseItemType));
|
||||
MOCK_METHOD0(GetMaterialManager, CMaterialManager* ());
|
||||
MOCK_METHOD0(GetMaterialManagerLibrary, IBaseLibraryManager* ());
|
||||
|
||||
@@ -1,286 +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.
|
||||
|
||||
#include "EditorDefs.h"
|
||||
|
||||
#include "LinkTool.h"
|
||||
|
||||
// Editor
|
||||
#include "Viewport.h"
|
||||
#include "Objects/EntityObject.h"
|
||||
#include "Objects/SelectionGroup.h"
|
||||
#include <Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h>
|
||||
|
||||
// AzCore
|
||||
#include <AzCore/Component/Entity.h>
|
||||
|
||||
#ifdef LoadCursor
|
||||
#undef LoadCursor
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
const float kGeomCacheNodePivotSizeScale = 0.0025f;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CLinkTool::CLinkTool()
|
||||
: m_nodeName(nullptr)
|
||||
, m_pGeomCacheRenderNode(nullptr)
|
||||
{
|
||||
m_pChild = NULL;
|
||||
SetStatusText("Click on object and drag a link to a new parent");
|
||||
|
||||
m_hLinkCursor = CMFCUtils::LoadCursor(IDC_POINTER_LINK);
|
||||
m_hLinkNowCursor = CMFCUtils::LoadCursor(IDC_POINTER_LINKNOW);
|
||||
m_hCurrCursor = &m_hLinkCursor;
|
||||
AZ::EntitySystemBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CLinkTool::~CLinkTool()
|
||||
{
|
||||
AZ::EntitySystemBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CLinkTool::LinkObject(CBaseObject* pChild, CBaseObject* pParent)
|
||||
{
|
||||
if (pChild == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (ChildIsValid(pParent, pChild))
|
||||
{
|
||||
CUndo undo("Link Object");
|
||||
|
||||
if (qobject_cast<CEntityObject*>(pChild))
|
||||
{
|
||||
static_cast<CEntityObject*>(pChild)->SetAttachTarget("");
|
||||
static_cast<CEntityObject*>(pChild)->SetAttachType(CEntityObject::eAT_Pivot);
|
||||
}
|
||||
|
||||
pParent->AttachChild(pChild, true);
|
||||
|
||||
QString str;
|
||||
str = tr("%1 attached to %2").arg(pChild->GetName(), pParent->GetName());
|
||||
SetStatusText(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetStatusText("Error: Cyclic linking or already linked.");
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CLinkTool::LinkSelectedToParent(CBaseObject* pParent)
|
||||
{
|
||||
if (pParent)
|
||||
{
|
||||
if (IsRelevant(pParent))
|
||||
{
|
||||
CSelectionGroup* pSel = GetIEditor()->GetSelection();
|
||||
if (!pSel->GetCount())
|
||||
{
|
||||
return;
|
||||
}
|
||||
CUndo undo("Link Object(s)");
|
||||
for (int i = 0; i < pSel->GetCount(); i++)
|
||||
{
|
||||
CBaseObject* pChild = pSel->GetObject(i);
|
||||
if (pChild == pParent)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
LinkObject(pChild, pParent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CLinkTool::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, [[maybe_unused]] int flags)
|
||||
{
|
||||
view->SetCursorString("");
|
||||
|
||||
m_hCurrCursor = &m_hLinkCursor;
|
||||
if (event == eMouseLDown)
|
||||
{
|
||||
HitContext hitInfo;
|
||||
view->HitTest(point, hitInfo);
|
||||
CBaseObject* obj = hitInfo.object;
|
||||
if (obj)
|
||||
{
|
||||
if (IsRelevant(obj))
|
||||
{
|
||||
m_StartDrag = obj->GetWorldPos();
|
||||
m_pChild = obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event == eMouseLUp)
|
||||
{
|
||||
HitContext hitInfo;
|
||||
view->HitTest(point, hitInfo);
|
||||
CBaseObject* obj = hitInfo.object;
|
||||
if (obj)
|
||||
{
|
||||
if (IsRelevant(obj))
|
||||
{
|
||||
CSelectionGroup* pSelectionGroup = GetIEditor()->GetSelection();
|
||||
int nGroupCount = pSelectionGroup->GetCount();
|
||||
if (pSelectionGroup && nGroupCount > 1)
|
||||
{
|
||||
LinkSelectedToParent(obj);
|
||||
}
|
||||
if (!pSelectionGroup || nGroupCount <= 1 || !pSelectionGroup->IsContainObject(m_pChild))
|
||||
{
|
||||
LinkObject(m_pChild, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
m_pChild = NULL;
|
||||
}
|
||||
else if (event == eMouseMove)
|
||||
{
|
||||
m_EndDrag = view->ViewToWorld(point);
|
||||
m_nodeName = nullptr;
|
||||
m_pGeomCacheRenderNode = nullptr;
|
||||
|
||||
HitContext hitInfo;
|
||||
if (view->HitTest(point, hitInfo))
|
||||
{
|
||||
m_EndDrag = hitInfo.raySrc + hitInfo.rayDir * hitInfo.dist;
|
||||
}
|
||||
|
||||
CBaseObject* obj = hitInfo.object;
|
||||
if (obj)
|
||||
{
|
||||
if (IsRelevant(obj))
|
||||
{
|
||||
QString name = obj->GetName();
|
||||
if (hitInfo.name)
|
||||
{
|
||||
name += QString("\n ") + hitInfo.name;
|
||||
}
|
||||
|
||||
// Set Cursors.
|
||||
view->SetCursorString(name);
|
||||
if (m_pChild)
|
||||
{
|
||||
if (ChildIsValid(obj, m_pChild))
|
||||
{
|
||||
m_hCurrCursor = &m_hLinkNowCursor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CLinkTool::OnKeyDown([[maybe_unused]] CViewport* view, uint32 nChar, [[maybe_unused]] uint32 nRepCnt, [[maybe_unused]] uint32 nFlags)
|
||||
{
|
||||
if (nChar == VK_ESCAPE)
|
||||
{
|
||||
// Cancel selection.
|
||||
GetIEditor()->SetEditTool(nullptr);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CLinkTool::Display(DisplayContext& dc)
|
||||
{
|
||||
if (m_pChild && m_EndDrag != Vec3(ZERO))
|
||||
{
|
||||
ColorF lineColor = (m_hCurrCursor == &m_hLinkNowCursor) ? ColorF(0, 1, 0) : ColorF(1, 0, 0);
|
||||
dc.DrawLine(m_StartDrag, m_EndDrag, lineColor, lineColor);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CLinkTool::OnEntityDestruction(const AZ::EntityId& entityId)
|
||||
{
|
||||
if (m_pChild && (m_pChild->GetType() == OBJTYPE_AZENTITY))
|
||||
{
|
||||
CComponentEntityObject* childComponentEntity = static_cast<CComponentEntityObject*>(m_pChild);
|
||||
AZ::EntityId childEntityId = childComponentEntity->GetAssociatedEntityId();
|
||||
if(entityId == childEntityId)
|
||||
{
|
||||
GetIEditor()->SetEditTool(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CLinkTool::ChildIsValid(CBaseObject* pParent, CBaseObject* pChild, int nDir)
|
||||
{
|
||||
if (!pParent)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!pChild)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (pParent == pChild)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Legacy entities and AZ entities shouldn't be linked.
|
||||
if ((pParent->GetType() == OBJTYPE_AZENTITY) != (pChild->GetType() == OBJTYPE_AZENTITY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
CBaseObject* pObj;
|
||||
if (nDir & 1)
|
||||
{
|
||||
pObj = pChild->GetParent();
|
||||
if (pObj)
|
||||
{
|
||||
if (!ChildIsValid(pParent, pObj, 1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nDir & 2)
|
||||
{
|
||||
for (int i = 0; i < pChild->GetChildCount(); i++)
|
||||
{
|
||||
pObj = pChild->GetChild(i);
|
||||
if (pObj)
|
||||
{
|
||||
if (!ChildIsValid(pParent, pObj, 2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CLinkTool::OnSetCursor(CViewport* vp)
|
||||
{
|
||||
vp->SetCursor(*m_hCurrCursor);
|
||||
return true;
|
||||
}
|
||||
|
||||
#include <moc_LinkTool.cpp>
|
||||
@@ -1,85 +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 : Definition of CLinkTool, tool used to link objects.
|
||||
|
||||
|
||||
#ifndef CRYINCLUDE_EDITOR_LINKTOOL_H
|
||||
#define CRYINCLUDE_EDITOR_LINKTOOL_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <AzCore/Component/EntityBus.h>
|
||||
#include "EditTool.h"
|
||||
#include "Include/IObjectManager.h"
|
||||
#endif
|
||||
|
||||
class CEntityObject;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
class CLinkTool
|
||||
: public CEditTool
|
||||
, public IObjectSelectCallback
|
||||
, private AZ::EntitySystemBus::Handler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Q_INVOKABLE CLinkTool(); // IPickObjectCallback *callback,CRuntimeClass *targetClass=NULL );
|
||||
|
||||
// Ovverides from CEditTool
|
||||
bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags);
|
||||
|
||||
virtual void BeginEditParams([[maybe_unused]] IEditor* ie, [[maybe_unused]] int flags) {};
|
||||
virtual void EndEditParams() {};
|
||||
|
||||
virtual void Display(DisplayContext& dc);
|
||||
virtual bool OnKeyDown(CViewport* view, uint32 nChar, uint32 nRepCnt, uint32 nFlags);
|
||||
virtual bool OnKeyUp([[maybe_unused]] CViewport* view, [[maybe_unused]] uint32 nChar, [[maybe_unused]] uint32 nRepCnt, [[maybe_unused]] uint32 nFlags) { return false; };
|
||||
|
||||
virtual bool OnSelectObject([[maybe_unused]] CBaseObject* obj) {return false; }
|
||||
virtual bool CanSelectObject([[maybe_unused]] CBaseObject* obj) { return true; };
|
||||
|
||||
virtual bool OnSetCursor(CViewport* vp);
|
||||
|
||||
void LinkSelectedToParent(CBaseObject* pParent);
|
||||
|
||||
protected:
|
||||
virtual ~CLinkTool();
|
||||
// Delete itself.
|
||||
void DeleteThis() { delete this; };
|
||||
|
||||
private:
|
||||
bool IsRelevant([[maybe_unused]] CBaseObject* obj) { return true; }
|
||||
bool ChildIsValid(CBaseObject* pParent, CBaseObject* pChild, int nDir = 3);
|
||||
void LinkObject(CBaseObject* pChild, CBaseObject* pParent);
|
||||
void LinkToNode(CEntityObject* pChild, CEntityObject* pParent, const char* nodeName);
|
||||
|
||||
// AZ::EntitySystemBus::Handler
|
||||
void OnEntityDestruction(const AZ::EntityId& entityId) override;
|
||||
|
||||
|
||||
CBaseObject* m_pChild;
|
||||
Vec3 m_StartDrag;
|
||||
Vec3 m_EndDrag;
|
||||
|
||||
QCursor m_hLinkCursor;
|
||||
QCursor m_hLinkNowCursor;
|
||||
QCursor* m_hCurrCursor;
|
||||
|
||||
const char* m_nodeName;
|
||||
IGeomCacheRenderNode* m_pGeomCacheRenderNode;
|
||||
};
|
||||
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_LINKTOOL_H
|
||||
@@ -92,7 +92,6 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
#include "TrackView/TrackViewDialog.h"
|
||||
#include "ErrorReportDialog.h"
|
||||
#include "Material/MaterialDialog.h"
|
||||
#include "LensFlareEditor/LensFlareEditor.h"
|
||||
#include "TimeOfDayDialog.h"
|
||||
|
||||
@@ -1105,15 +1104,6 @@ void MainWindow::InitActions()
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelected)
|
||||
.SetIcon(Style::icon("Align_to_grid"))
|
||||
.SetApplyHoverEffect();
|
||||
am->AddAction(ID_OBJECTMODIFY_ALIGN, tr("Align to object")).SetCheckable(true)
|
||||
#if AZ_TRAIT_OS_PLATFORM_APPLE
|
||||
.SetStatusTip(tr(u8"\u2318: Align an object to a bounding box, \u2325 : Keep Rotation of the moved object, Shift : Keep Scale of the moved object"))
|
||||
#else
|
||||
.SetStatusTip(tr("Ctrl: Align an object to a bounding box, Alt : Keep Rotation of the moved object, Shift : Keep Scale of the moved object"))
|
||||
#endif
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateAlignObject)
|
||||
.SetIcon(Style::icon("Align_to_Object"))
|
||||
.SetApplyHoverEffect();
|
||||
am->AddAction(ID_MODIFY_ALIGNOBJTOSURF, tr("Align object to surface (Hold CTRL)")).SetCheckable(true)
|
||||
.SetToolTip(tr("Align object to surface (Hold CTRL)"))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateAlignToVoxel)
|
||||
@@ -1450,15 +1440,6 @@ void MainWindow::InitActions()
|
||||
.SetApplyHoverEffect();
|
||||
|
||||
// Edit Mode Toolbar Actions
|
||||
am->AddAction(ID_EDITTOOL_LINK, tr("Link an object to parent"))
|
||||
.SetIcon(Style::icon("add_link"))
|
||||
.SetApplyHoverEffect()
|
||||
.SetCheckable(true)
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditToolLink);
|
||||
am->AddAction(ID_EDITTOOL_UNLINK, tr("Unlink all selected objects"))
|
||||
.SetIcon(Style::icon("remove_link"))
|
||||
.SetApplyHoverEffect()
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateEditToolUnlink);
|
||||
am->AddAction(IDC_SELECTION_MASK, tr("Selected Object Types"));
|
||||
am->AddAction(ID_REF_COORDS_SYS, tr("Reference coordinate system"))
|
||||
.SetShortcut(tr("Ctrl+W"))
|
||||
@@ -1974,7 +1955,6 @@ void MainWindow::RegisterStdViewClasses()
|
||||
|
||||
if (!AZ::Interface<AzFramework::AtomActiveInterface>::Get())
|
||||
{
|
||||
CMaterialDialog::RegisterViewClass();
|
||||
CLensFlareEditor::RegisterViewClass();
|
||||
CTimeOfDayDialog::RegisterViewClass();
|
||||
}
|
||||
|
||||
@@ -1,110 +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 : implementation file
|
||||
|
||||
#include "EditorDefs.h"
|
||||
|
||||
#include "MatEditMainDlg.h"
|
||||
|
||||
// Qt
|
||||
#include <QVBoxLayout>
|
||||
#include <QAbstractEventDispatcher>
|
||||
|
||||
// Editor
|
||||
#include "Material/MaterialDialog.h"
|
||||
#include "Material/MaterialManager.h"
|
||||
#include "MaterialSender.h"
|
||||
|
||||
|
||||
CMatEditMainDlg::CMatEditMainDlg(const QString& title, QWidget* pParent /*=NULL*/)
|
||||
: QWidget(pParent)
|
||||
{
|
||||
resize(1000, 600);
|
||||
|
||||
setWindowTitle(title);
|
||||
|
||||
QTimer* t = new QTimer(this);
|
||||
connect(t, &QTimer::timeout, this, &CMatEditMainDlg::OnKickIdle);
|
||||
t->start(250);
|
||||
|
||||
m_materialDialog = new CMaterialDialog(); // must be created after the timer
|
||||
auto layout = new QVBoxLayout(this);
|
||||
layout->addWidget(m_materialDialog);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (auto aed = QAbstractEventDispatcher::instance())
|
||||
{
|
||||
aed->installNativeEventFilter(this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
CMatEditMainDlg::~CMatEditMainDlg()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
if (auto aed = QAbstractEventDispatcher::instance())
|
||||
{
|
||||
aed->removeNativeEventFilter(this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CMatEditMainDlg message handlers
|
||||
|
||||
void CMatEditMainDlg::showEvent(QShowEvent*)
|
||||
{
|
||||
if (QWindow *win = window()->windowHandle())
|
||||
{
|
||||
// Make sure our top-level window decorator wrapper set this exact title
|
||||
// 3ds Max Exporter will use ::FindWindow with this name
|
||||
win->setTitle("Material Editor");
|
||||
}
|
||||
}
|
||||
|
||||
bool CMatEditMainDlg::nativeEventFilter(const QByteArray&, void* message, long*)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
// WM_MATEDITSEND is Windows only. Used by 3ds Max exporter.
|
||||
MSG* msg = static_cast<MSG*>(message);
|
||||
if (msg->message == WM_MATEDITSEND)
|
||||
{
|
||||
OnMatEditSend(msg->wParam);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CMatEditMainDlg::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
QWidget::closeEvent(event);
|
||||
qApp->quit();
|
||||
}
|
||||
|
||||
void CMatEditMainDlg::OnKickIdle()
|
||||
{
|
||||
GetIEditor()->Notify(eNotify_OnIdleUpdate);
|
||||
}
|
||||
|
||||
void CMatEditMainDlg::OnMatEditSend(int param)
|
||||
{
|
||||
if (param != eMSM_Init)
|
||||
{
|
||||
GetIEditor()->GetMaterialManager()->SyncMaterialEditor();
|
||||
}
|
||||
}
|
||||
|
||||
#include <moc_MatEditMainDlg.cpp>
|
||||
@@ -1,48 +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.
|
||||
|
||||
#ifndef CRYINCLUDE_EDITOR_MATEDITMAINDLG_H
|
||||
#define CRYINCLUDE_EDITOR_MATEDITMAINDLG_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QWidget>
|
||||
#include <QString>
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#endif
|
||||
|
||||
class CMaterialDialog;
|
||||
|
||||
class CMatEditMainDlg
|
||||
: public QWidget
|
||||
, public QAbstractNativeEventFilter
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CMatEditMainDlg(const QString& title = QString(), QWidget* parent = nullptr);
|
||||
~CMatEditMainDlg();
|
||||
|
||||
bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override;
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
|
||||
private:
|
||||
void OnKickIdle();
|
||||
void OnMatEditSend(int param);
|
||||
CMaterialDialog* m_materialDialog = nullptr;
|
||||
};
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_MATEDITMAINDLG_H
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,176 +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.
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include "MaterialBrowser.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QPointer>
|
||||
#include <QScopedPointer>
|
||||
#endif
|
||||
|
||||
static const char* MATERIAL_EDITOR_NAME = "Material Editor";
|
||||
static const char* MATERIAL_EDITOR_VER = "1.00";
|
||||
|
||||
|
||||
class QComboBox;
|
||||
class QLabel;
|
||||
|
||||
class CMaterial;
|
||||
class CMaterialManager;
|
||||
class CMatEditPreviewDlg;
|
||||
class CMaterialSender;
|
||||
class CMaterialImageListCtrl;
|
||||
class QMaterialImageListModel;
|
||||
class TwoColumnPropertyControl;
|
||||
|
||||
/** Dialog which hosts entity prototype library.
|
||||
*/
|
||||
|
||||
|
||||
struct SMaterialExcludedVars
|
||||
{
|
||||
CMaterial* pMaterial;
|
||||
CVarBlock vars;
|
||||
|
||||
SMaterialExcludedVars()
|
||||
: pMaterial(nullptr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class CMaterialDialog
|
||||
: public QMainWindow
|
||||
, public IMaterialBrowserListener
|
||||
, public IDataBaseManagerListener
|
||||
, public IEditorNotifyListener
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CMaterialDialog(QWidget* parent = 0);
|
||||
~CMaterialDialog();
|
||||
|
||||
static void RegisterViewClass();
|
||||
static const GUID& GetClassID();
|
||||
|
||||
public slots:
|
||||
void OnAssignMaterialToSelection();
|
||||
void OnResetMaterialOnSelection();
|
||||
void OnGetMaterialFromSelection();
|
||||
|
||||
protected:
|
||||
BOOL OnInitDialog();
|
||||
void closeEvent(QCloseEvent *ev) override;
|
||||
|
||||
protected slots:
|
||||
void OnAddItem();
|
||||
void OnDeleteItem();
|
||||
void OnSaveItem();
|
||||
void OnPickMtl();
|
||||
void OnCopy();
|
||||
void OnPaste();
|
||||
void OnMaterialPreview();
|
||||
void OnSelectAssignedObjects();
|
||||
void OnChangedBrowserListType(int);
|
||||
void OnResetMaterialViewport();
|
||||
|
||||
void UpdateActions();
|
||||
|
||||
protected:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Some functions can be overriden to modify standart functionality.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void InitToolbar(UINT nToolbarResID);
|
||||
|
||||
virtual void SelectItem(CBaseLibraryItem* item, bool bForceReload = false);
|
||||
virtual void DeleteItem(CBaseLibraryItem* pItem);
|
||||
virtual bool SetItemName(CBaseLibraryItem* item, const QString& groupName, const QString& itemName);
|
||||
virtual void ReloadItems();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// IMaterialBrowserListener implementation.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void OnBrowserSelectItem(IDataBaseItem* pItem, bool bForce);
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// IDataBaseManagerListener implementation.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event);
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// IEditorNotifyListener implementation.
|
||||
virtual void OnEditorNotifyEvent(EEditorNotifyEvent event);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CMaterial* GetSelectedMaterial();
|
||||
void OnUpdateProperties(IVariable* var);
|
||||
void OnUndo(IVariable* pVar);
|
||||
|
||||
void UpdateShaderParamsUI(CMaterial* pMtl);
|
||||
|
||||
void UpdatePreview();
|
||||
|
||||
//void SetTextureVars( CVariableArray *texVar,CMaterial *mtl,int id,const CString &name );
|
||||
void SetMaterialVars(CMaterial* mtl);
|
||||
|
||||
MaterialBrowserWidget* m_wndMtlBrowser;
|
||||
|
||||
QStatusBar* m_statusBar;
|
||||
//CXTCaption m_wndCaption;
|
||||
|
||||
TwoColumnPropertyControl* m_propsCtrl;
|
||||
bool m_bForceReloadPropsCtrl;
|
||||
|
||||
QLabel* m_placeHolderLabel;
|
||||
|
||||
CBaseLibraryItem* m_pPrevSelectedItem;
|
||||
|
||||
// Material manager.
|
||||
CMaterialManager* m_pMatManager;
|
||||
|
||||
CVarBlockPtr m_vars;
|
||||
CVarBlockPtr m_publicVars;
|
||||
|
||||
// collection of excluded vars from m_publicVars for remembering values
|
||||
// when updating shader params
|
||||
SMaterialExcludedVars m_excludedPublicVars;
|
||||
|
||||
CVarBlockPtr m_shaderGenParamsVars;
|
||||
CVarBlockPtr m_textureSlots;
|
||||
|
||||
class CMaterialUI* m_pMaterialUI;
|
||||
|
||||
QPointer<CMatEditPreviewDlg> m_pPreviewDlg;
|
||||
|
||||
QScopedPointer<CMaterialImageListCtrl> m_pMaterialImageListCtrl;
|
||||
QScopedPointer<QMaterialImageListModel> m_pMaterialImageListModel;
|
||||
|
||||
QToolBar* m_toolbar;
|
||||
QComboBox* m_filterTypeSelection;
|
||||
QAction* m_addAction;
|
||||
QAction* m_assignToSelectionAction;
|
||||
QAction* m_copyAction;
|
||||
QAction* m_getFromSelectionAction;
|
||||
QAction* m_pasteAction;
|
||||
QAction* m_pickAction;
|
||||
QAction* m_previewAction;
|
||||
QAction* m_removeAction;
|
||||
QAction* m_resetAction;
|
||||
QAction* m_saveAction;
|
||||
QAction* m_resetViewporAction;
|
||||
};
|
||||
|
||||
@@ -1,39 +1,4 @@
|
||||
<RCC>
|
||||
<qresource prefix="/MaterialDialog/ToolBar">
|
||||
<file>images/materialdialog_add_disabled.png</file>
|
||||
<file>images/materialdialog_copy_disabled.png</file>
|
||||
<file>images/materialdialog_paste_disabled.png</file>
|
||||
<file>images/materialdialog_preview_disabled.png</file>
|
||||
<file>images/materialdialog_remove_disabled.png</file>
|
||||
<file>images/materialdialog_save_disabled.png</file>
|
||||
<file>images/materialdialog_assignselection_disabled.png</file>
|
||||
<file>images/materialdialog_getfromselection_disabled.png</file>
|
||||
<file>images/materialdialog_pick_disabled.png</file>
|
||||
<file>images/materialdialog_reset_disabled.png</file>
|
||||
<file>images/materialdialog_assignselection_active.png</file>
|
||||
<file>images/materialdialog_assignselection_normal.png</file>
|
||||
<file>images/materialdialog_add_active.png</file>
|
||||
<file>images/materialdialog_add_normal.png</file>
|
||||
<file>images/materialdialog_copy_active.png</file>
|
||||
<file>images/materialdialog_copy_normal.png</file>
|
||||
<file>images/materialdialog_getfromselection_active.png</file>
|
||||
<file>images/materialdialog_getfromselection_normal.png</file>
|
||||
<file>images/materialdialog_paste_active.png</file>
|
||||
<file>images/materialdialog_paste_normal.png</file>
|
||||
<file>images/materialdialog_pick_active.png</file>
|
||||
<file>images/materialdialog_pick_normal.png</file>
|
||||
<file>images/materialdialog_preview_active.png</file>
|
||||
<file>images/materialdialog_preview_normal.png</file>
|
||||
<file>images/materialdialog_remove_active.png</file>
|
||||
<file>images/materialdialog_remove_normal.png</file>
|
||||
<file>images/materialdialog_reset_active.png</file>
|
||||
<file>images/materialdialog_reset_normal.png</file>
|
||||
<file>images/materialdialog_save_active.png</file>
|
||||
<file>images/materialdialog_save_normal.png</file>
|
||||
<file>images/materialdialog_reset_viewport_active.png</file>
|
||||
<file>images/materialdialog_reset_viewport_disabled.png</file>
|
||||
<file>images/materialdialog_reset_viewport_normal.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/MaterialBrowser">
|
||||
<file>images/material_browser_00.png</file>
|
||||
<file>images/material_browser_01.png</file>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:703f6875258486629bc1db68ce80fe1653f0d2876cd1252d03f72f6eae04dd84
|
||||
size 392
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3f3c05f8425956e9c1e380fde9a65df8f0d341868900a3589d9f629f34a0ddf6
|
||||
size 251
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:25554e93a4f0d9b904a2a3628c315ee55c0ad8831bb5891a9d7e27e5cb9a5416
|
||||
size 261
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b2ee886c6e487a6490361609fdd44c64438e40c7e5a4c40fda866ec399ec4727
|
||||
size 256
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:943ff19774cbe8d47c1e8001a48e6d137fdac2c0af63c9092911c37be0d6d6a8
|
||||
size 471
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:400d669d7a658968549f6ee776ee415b871b207c444d8797a404b76d536131b1
|
||||
size 325
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:02bdc8aad92bb75b118c4a703a3e5b1369376620b3836a125faedc7f6b42b49b
|
||||
size 330
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:38097d3041defeec0179390a73bb463e54e7f4c1f0b1a20e77ab3f69ea9cf13c
|
||||
size 332
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e1d9fe8e97655bf776b20e242d66900980721ba2f3ee93c02cd4062a8b872eed
|
||||
size 433
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:468b68c44d8ef183b292c1bc6ca4dc583357f693db9ea2cd198fb2af22537be1
|
||||
size 249
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b27a1346f2edebe34ee06d7892a467bfc67952d0f8e4458e09a74a6dbf62fe98
|
||||
size 336
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c3f40524a96689b8c8549bc662415df654494baeeda6eed47e66b455ac902eeb
|
||||
size 254
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cebe97de0d879d239fcd61595fd28b73760aa6452dcf4dabc54bfe034e2e33c1
|
||||
size 476
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:699ee40aeedfc50b7766e94ef66e645762eb183ddd6ce134b4bdab01c3957ab9
|
||||
size 327
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5f1fd8a7cecb22901c6d73f2e6129f3bada0f94cf73d9a8fd2676a972faa5719
|
||||
size 348
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d432de9e921d23fbbf3c1b805f644b9554aa206011a87c063d167c30c7c4579e
|
||||
size 335
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c006e70efd8bdb1dd5aac867db9d97de587e8d518ba0693d19c319e34a74c7d0
|
||||
size 501
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:00c291361664d357502f5267fccd0a6fff0c3f2e906c0402d57ad9fa5ca7f023
|
||||
size 255
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d68fc8604a23eb3bcc0cac9bb6e83dd4dc4cdab70b0bdaec3c456559727c6b5b
|
||||
size 354
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4055c7f029d7711e5c32f3f74901bf1dcc1540fd2c0f3f30dc74743d7f2cc042
|
||||
size 355
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:99e2c0378137bef94eb6f281e0168852540bf1ca823b9bcd4365ef2849db9956
|
||||
size 420
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:34075016c93f1914fe4d12ead7c5ee322a18466f08a476eff7c127e4e1429224
|
||||
size 290
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dc289621f8a9d3e714cd985651d7d6f20495fb7be46e1f60c283d8920c730d0b
|
||||
size 307
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7e9d5c878acf9fee4252cb854f192690d3f50d46dc4e5f5b1b5812b79fc2cdf7
|
||||
size 296
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e2e912c40f07ca3d2a9b2aa1c5caf3acc181436b6a1b560fc021450701331b4c
|
||||
size 403
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:00663e473803ba6c2798c494676b0a65fd62d7484f6d7b51d9fc8955ad586477
|
||||
size 273
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:34b7d5520cfc8f00ff580558db4f0ec4297458d310321471204daa8678db5fc1
|
||||
size 298
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7bca1a8811739949aa2e87486f8697dfae5bc5238894dd1b95ae80aa6f80d517
|
||||
size 279
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:db86d857b651a2fec80418f8b251447bb3fcf4c0cf64bdee12c3b656adbde29a
|
||||
size 422
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fef72444f077879d5c0186c9583f67aa45aafc23214d9e7de90a7c595609270f
|
||||
size 258
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d2117fda3ed6a28032ae8f03ed7f9a7a0960f4691e49903c63b2150027dfe1ea
|
||||
size 302
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:06b384ecc11ed2547a9bf466f585889d647c29a4883840070e444a382e80c41c
|
||||
size 266
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4b9ee01e7fe2f19b0e736efe09c2b81d3243e369375b4f26346e6abd499e54a6
|
||||
size 476
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:935a041332be1fe11ed01c09a3cd367fb9ede7e7eb04909614943f80e741d35f
|
||||
size 334
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2b343233ab25a73fcdb4fff5509011497814fc4cb591065bdb3043a0f1092577
|
||||
size 342
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1cc0183d7f57f15c4efeffb32795921f2f4e9c7965955fd0a392f826d5f6b6c8
|
||||
size 337
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9a8467c1dcc343f637e0f7f5071a20b8881a43d567fb32fd96f5383f7b69bbb6
|
||||
size 430
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0fd5ec79fc2c679f99ac5eb63d725f2cc815b09286bd0f3b5d2921eeb2e1e8cc
|
||||
size 406
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3e19713b6586581d2336e833d8ecbd78b4b8f15b1c49a29d80acbf05e8aae3df
|
||||
size 418
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4de0f4a102e5c4990d5d23e22b5cdd16532192f3a125758b608cd8c731278898
|
||||
size 355
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d0b6f7c69112d124eac1123ffa840268c16148fef9ded3a67f84d3ad8d73eb96
|
||||
size 212
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b795fb88a6f301d7ecc9ce75141bdcf9e6dca25043730661aa4d1f09b055d6f
|
||||
size 222
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:88fbce753cdd9381a814e3b2ec5d16df7cc26f2a37ad30b7010be71ae9183510
|
||||
size 214
|
||||
@@ -1,173 +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.
|
||||
|
||||
#include "EditorDefs.h"
|
||||
|
||||
#include "PickObjectTool.h"
|
||||
|
||||
// Editor
|
||||
#include "Viewport.h"
|
||||
#include "Include/HitContext.h"
|
||||
#include "Objects/BaseObject.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CPickObjectTool::CPickObjectTool(IPickObjectCallback* callback, const QMetaObject* targetClass)
|
||||
{
|
||||
assert(callback != 0);
|
||||
m_callback = callback;
|
||||
m_targetClass = targetClass;
|
||||
m_bMultiPick = false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CPickObjectTool::~CPickObjectTool()
|
||||
{
|
||||
GetIEditor()->GetObjectManager()->SetSelectCallback(0);
|
||||
//m_prevSelectCallback = 0;
|
||||
if (m_callback)
|
||||
{
|
||||
m_callback->OnCancelPick();
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CPickObjectTool::BeginEditParams([[maybe_unused]] IEditor* ie, [[maybe_unused]] int flags)
|
||||
{
|
||||
QString str = "Pick object";
|
||||
if (m_targetClass)
|
||||
{
|
||||
str = tr("Pick %1 object").arg(m_targetClass->className());
|
||||
}
|
||||
SetStatusText(str);
|
||||
|
||||
//m_prevSelectCallback =
|
||||
GetIEditor()->GetObjectManager()->SetSelectCallback(this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CPickObjectTool::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, [[maybe_unused]] int flags)
|
||||
{
|
||||
if (event == eMouseLDown)
|
||||
{
|
||||
HitContext hitInfo;
|
||||
view->HitTest(point, hitInfo);
|
||||
CBaseObject* obj = hitInfo.object;
|
||||
if (obj)
|
||||
{
|
||||
if (IsRelevant(obj))
|
||||
{
|
||||
if (m_callback)
|
||||
{
|
||||
// Can pick this one.
|
||||
m_callback->OnPick(obj);
|
||||
}
|
||||
if (!m_bMultiPick)
|
||||
{
|
||||
m_callback = 0;
|
||||
GetIEditor()->SetEditTool(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event == eMouseMove)
|
||||
{
|
||||
HitContext hitInfo;
|
||||
view->HitTest(point, hitInfo);
|
||||
CBaseObject* obj = hitInfo.object;
|
||||
if (obj)
|
||||
{
|
||||
if (IsRelevant(obj))
|
||||
{
|
||||
// Set Cursors.
|
||||
view->SetCurrentCursor(STD_CURSOR_HIT, obj->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CPickObjectTool::OnSelectObject(CBaseObject* obj)
|
||||
{
|
||||
if (IsRelevant(obj))
|
||||
{
|
||||
// Can pick this one.
|
||||
if (m_callback)
|
||||
{
|
||||
m_callback->OnPick(obj);
|
||||
m_callback = 0;
|
||||
}
|
||||
if (!m_bMultiPick)
|
||||
{
|
||||
GetIEditor()->SetEditTool(0);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CPickObjectTool::CanSelectObject(CBaseObject* obj)
|
||||
{
|
||||
return IsRelevant(obj);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CPickObjectTool::OnKeyDown([[maybe_unused]] CViewport* view, uint32 nChar, [[maybe_unused]] uint32 nRepCnt, [[maybe_unused]] uint32 nFlags)
|
||||
{
|
||||
if (nChar == VK_ESCAPE)
|
||||
{
|
||||
// Cancel selection.
|
||||
GetIEditor()->SetEditTool(0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CPickObjectTool::IsRelevant(CBaseObject* obj)
|
||||
{
|
||||
assert(obj != 0);
|
||||
if (obj == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!m_callback)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_targetClass)
|
||||
{
|
||||
return m_callback->OnPickFilter(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (obj->metaObject() == m_targetClass || m_targetClass->cast(obj))
|
||||
{
|
||||
return m_callback->OnPickFilter(obj);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CPickObjectTool::IsNeedSpecificBehaviorForSpaceAcce()
|
||||
{
|
||||
if (m_callback && m_callback->IsNeedSpecificBehaviorForSpaceAcce())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#include <moc_PickObjectTool.cpp>
|
||||
@@ -1,76 +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 : Definition of PickObjectTool, tool used to pick objects.
|
||||
|
||||
|
||||
#ifndef CRYINCLUDE_EDITOR_PICKOBJECTTOOL_H
|
||||
#define CRYINCLUDE_EDITOR_PICKOBJECTTOOL_H
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include "EditTool.h"
|
||||
#include "IObjectManager.h"
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
class CPickObjectTool
|
||||
: public CEditTool
|
||||
, public IObjectSelectCallback
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CPickObjectTool(IPickObjectCallback* callback, const QMetaObject* targetClass = NULL);
|
||||
|
||||
//! If set to true, pick tool will not stop picking after first pick.
|
||||
void SetMultiplePicks(bool bEnable) { m_bMultiPick = bEnable; };
|
||||
|
||||
// Ovverides from CEditTool
|
||||
bool MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags);
|
||||
|
||||
virtual void BeginEditParams(IEditor* ie, int flags);
|
||||
virtual void EndEditParams() {};
|
||||
|
||||
virtual void Display([[maybe_unused]] DisplayContext& dc) {};
|
||||
virtual bool OnKeyDown(CViewport* view, uint32 nChar, uint32 nRepCnt, uint32 nFlags);
|
||||
virtual bool OnKeyUp([[maybe_unused]] CViewport* view, [[maybe_unused]] uint32 nChar, [[maybe_unused]] uint32 nRepCnt, [[maybe_unused]] uint32 nFlags) { return false; };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// IObjectSelectCallback
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual bool OnSelectObject(CBaseObject* obj);
|
||||
virtual bool CanSelectObject(CBaseObject* obj);
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual bool IsNeedSpecificBehaviorForSpaceAcce();
|
||||
|
||||
protected:
|
||||
virtual ~CPickObjectTool();
|
||||
// Delete itself.
|
||||
void DeleteThis() { delete this; };
|
||||
|
||||
private:
|
||||
bool IsRelevant(CBaseObject* obj);
|
||||
|
||||
//! Object that requested pick.
|
||||
IPickObjectCallback* m_callback;
|
||||
|
||||
//! If target class specified, will pick only objects that belongs to that runtime class.
|
||||
const QMetaObject* m_targetClass;
|
||||
|
||||
bool m_bMultiPick;
|
||||
};
|
||||
|
||||
|
||||
#endif // CRYINCLUDE_EDITOR_PICKOBJECTTOOL_H
|
||||
@@ -181,8 +181,6 @@
|
||||
#define ID_TV_STOP 33568
|
||||
#define ID_TV_PAUSE 33569
|
||||
#define ID_ADDNODE 33570
|
||||
#define ID_EDITTOOL_LINK 33571
|
||||
#define ID_EDITTOOL_UNLINK 33572
|
||||
#define ID_ADDSCENETRACK 33573
|
||||
#define ID_FIND 33574
|
||||
#define ID_SNAP_TO_GRID 33575
|
||||
@@ -214,7 +212,6 @@
|
||||
#define ID_TV_JUMPSTART 33601
|
||||
#define ID_TV_PREVKEY 33602
|
||||
#define ID_TV_NEXTKEY 33603
|
||||
#define ID_OBJECTMODIFY_ALIGN 33604
|
||||
#define ID_PLAY_LOOP 33607
|
||||
#define ID_TERRAIN 33611
|
||||
#define ID_OBJECTMODIFY_ALIGNTOGRID 33619
|
||||
|
||||
@@ -585,13 +585,6 @@ AmazonToolbar ToolbarManager::GetEditModeToolbar() const
|
||||
t.AddAction(ID_TOOLBAR_WIDGET_UNDO, ORIGINAL_TOOLBAR_VERSION);
|
||||
t.AddAction(ID_TOOLBAR_WIDGET_REDO, ORIGINAL_TOOLBAR_VERSION);
|
||||
|
||||
if (!GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
{
|
||||
t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION);
|
||||
t.AddAction(ID_EDITTOOL_LINK, ORIGINAL_TOOLBAR_VERSION);
|
||||
t.AddAction(ID_EDITTOOL_UNLINK, ORIGINAL_TOOLBAR_VERSION);
|
||||
}
|
||||
|
||||
t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION);
|
||||
|
||||
if (!GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
@@ -630,7 +623,6 @@ AmazonToolbar ToolbarManager::GetObjectToolbar() const
|
||||
AmazonToolbar t = AmazonToolbar("Object", QObject::tr("Object Toolbar"));
|
||||
t.SetMainToolbar(true);
|
||||
t.AddAction(ID_GOTO_SELECTED, ORIGINAL_TOOLBAR_VERSION);
|
||||
t.AddAction(ID_OBJECTMODIFY_ALIGN, ORIGINAL_TOOLBAR_VERSION);
|
||||
t.AddAction(ID_OBJECTMODIFY_ALIGNTOGRID, ORIGINAL_TOOLBAR_VERSION);
|
||||
t.AddAction(ID_OBJECTMODIFY_SETHEIGHT, ORIGINAL_TOOLBAR_VERSION);
|
||||
t.AddAction(ID_MODIFY_ALIGNOBJTOSURF, ORIGINAL_TOOLBAR_VERSION);
|
||||
|
||||
@@ -95,6 +95,11 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram
|
||||
AZStd::optional<MouseButton> overrideButton;
|
||||
AZStd::optional<MouseEvent> eventType;
|
||||
|
||||
// Because we receive events multiple times at separate priorities for manipulator events and
|
||||
// viewport interaction events, we want to avoid updating our "last tick state" until we're on our last event,
|
||||
// which currently is the low priority Interaction processor.
|
||||
const bool finishedProcessingEvents = event.m_priority == InteractionPriority;
|
||||
|
||||
if (IsMouseMove(event.m_inputChannel))
|
||||
{
|
||||
// Cache the ray trace results when doing manipulator interaction checks, no need to recalculate after
|
||||
@@ -120,10 +125,11 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram
|
||||
}
|
||||
else if (auto mouseButton = GetMouseButton(event.m_inputChannel); mouseButton != MouseButton::None)
|
||||
{
|
||||
const AZ::u32 mouseButtonValue = static_cast<AZ::u32>(mouseButton);
|
||||
overrideButton = mouseButton;
|
||||
if (event.m_inputChannel.GetState() == InputChannel::State::Began)
|
||||
{
|
||||
m_state.m_mouseButtons.m_mouseButtons |= static_cast<AZ::u32>(mouseButton);
|
||||
m_state.m_mouseButtons.m_mouseButtons |= mouseButtonValue;
|
||||
if (IsDoubleClick(mouseButton))
|
||||
{
|
||||
// Only remove the double click flag once we're done processing both Manipulator and Interaction events
|
||||
@@ -135,8 +141,8 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram
|
||||
}
|
||||
else
|
||||
{
|
||||
// Only insert the double click timing once we're done processing both Manipulator and Interaction events, to avoid a false IsDoubleClick positive
|
||||
if (event.m_priority == InteractionPriority)
|
||||
// Only insert the double click timing once we're done processing events, to avoid a false IsDoubleClick positive
|
||||
if (finishedProcessingEvents)
|
||||
{
|
||||
m_pendingDoubleClicks[mouseButton] = m_curTime;
|
||||
}
|
||||
@@ -145,8 +151,18 @@ bool ViewportManipulatorControllerInstance::HandleInputChannelEvent(const AzFram
|
||||
}
|
||||
else if (event.m_inputChannel.GetState() == InputChannel::State::Ended)
|
||||
{
|
||||
m_state.m_mouseButtons.m_mouseButtons &= ~static_cast<AZ::u32>(mouseButton);
|
||||
eventType = MouseEvent::Up;
|
||||
// If we've actually logged a mouse down event, forward a mouse up event.
|
||||
// This prevents corner cases like the context menu thinking it should be opened even though no one clicked in this viewport,
|
||||
// due to RenderViewportWidget ensuring all controllers get InputChannel::State::Ended events.
|
||||
if (m_state.m_mouseButtons.m_mouseButtons & mouseButtonValue)
|
||||
{
|
||||
// Erase the button from our state if we're done processing events.
|
||||
if (event.m_priority == InteractionPriority)
|
||||
{
|
||||
m_state.m_mouseButtons.m_mouseButtons &= ~mouseButtonValue;
|
||||
}
|
||||
eventType = MouseEvent::Up;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (auto keyboardModifier = GetKeyboardModifier(event.m_inputChannel); keyboardModifier != KeyboardModifier::None)
|
||||
|
||||
@@ -316,8 +316,6 @@ set(FILES
|
||||
Material/MaterialHelpers.cpp
|
||||
Material/MaterialHelpers.h
|
||||
Material/MaterialDialog.qrc
|
||||
Material/MaterialDialog.cpp
|
||||
Material/MaterialDialog.h
|
||||
Material/MaterialPreviewModelView.cpp
|
||||
Material/MaterialPreviewModelView.h
|
||||
Material/PreviewModelView.cpp
|
||||
@@ -535,8 +533,6 @@ set(FILES
|
||||
Dialogs/PythonScriptsDialog.ui
|
||||
Dialogs/Generic/UserOptions.cpp
|
||||
Dialogs/Generic/UserOptions.h
|
||||
AlignTool.cpp
|
||||
AlignTool.h
|
||||
ObjectCloneTool.cpp
|
||||
ObjectCloneTool.h
|
||||
EditMode/SubObjectSelectionReferenceFrameCalculator.cpp
|
||||
@@ -547,10 +543,6 @@ set(FILES
|
||||
RotateTool.h
|
||||
EditTool.cpp
|
||||
EditTool.h
|
||||
LinkTool.cpp
|
||||
LinkTool.h
|
||||
PickObjectTool.cpp
|
||||
PickObjectTool.h
|
||||
VoxelAligningTool.cpp
|
||||
VoxelAligningTool.h
|
||||
Export/ExportManager.cpp
|
||||
@@ -632,8 +624,6 @@ set(FILES
|
||||
LensFlareEditor/LensFlareView.h
|
||||
LogFileImpl.cpp
|
||||
LogFileImpl.h
|
||||
MatEditMainDlg.cpp
|
||||
MatEditMainDlg.h
|
||||
MatEditPreviewDlg.cpp
|
||||
MatEditPreviewDlg.h
|
||||
Material/MaterialBrowser.cpp
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace AWSClientAuth
|
||||
m_settingsRegistry = AZStd::make_shared<AZ::SettingsRegistryImpl>();
|
||||
|
||||
AZStd::array<char, AZ::IO::MaxPathLength> resolvedPath{};
|
||||
AZ::IO::FileIOBase::GetInstance()->ResolvePath(settingsRegistryPath.data(), resolvedPath.data(), resolvedPath.size());
|
||||
fileIO->ResolvePath(settingsRegistryPath.data(), resolvedPath.data(), resolvedPath.size());
|
||||
|
||||
|
||||
if (!m_settingsRegistry->MergeSettingsFile(resolvedPath.data(), AZ::SettingsRegistryInterface::Format::JsonMergePatch))
|
||||
|
||||
@@ -407,17 +407,20 @@ namespace AZ
|
||||
const auto& jobParameters = request.m_jobDescription.m_jobParameters;
|
||||
if (jobParameters.find(ShaderVariantLoadErrorParam) != jobParameters.end())
|
||||
{
|
||||
if (jobParameters.find(ShouldExitEarlyFromProcessJobParam) != jobParameters.end())
|
||||
{
|
||||
AZ_TracePrintf(ShaderVariantAssetBuilderName, "Doing nothing on behalf of [%s] because it's been overriden by game project.", jobParameters.at(ShaderVariantLoadErrorParam).c_str());
|
||||
response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success;
|
||||
return;
|
||||
}
|
||||
AZ_Error(ShaderVariantAssetBuilderName, false, "Error during CreateJobs: %s", jobParameters.at(ShaderVariantLoadErrorParam).c_str());
|
||||
response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed;
|
||||
return;
|
||||
}
|
||||
|
||||
if (jobParameters.find(ShouldExitEarlyFromProcessJobParam) != jobParameters.end())
|
||||
{
|
||||
AZ_TracePrintf(
|
||||
ShaderVariantAssetBuilderName, "Doing nothing on behalf of [%s] because it's been overriden by game project.",
|
||||
jobParameters.at(ShaderVariantLoadErrorParam).c_str());
|
||||
response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success;
|
||||
return;
|
||||
}
|
||||
|
||||
AssetBuilderSDK::JobCancelListener jobCancelListener(request.m_jobId);
|
||||
if (jobCancelListener.IsCancelled())
|
||||
{
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace AZ
|
||||
MaterialPropertyValue(const Vector4& value) : m_value(value) {}
|
||||
MaterialPropertyValue(const Color& value) : m_value(value) {}
|
||||
MaterialPropertyValue(const Data::Asset<ImageAsset>& value) : m_value(value) {}
|
||||
MaterialPropertyValue(const Data::Instance<Image>& value) : m_value(value) {}
|
||||
MaterialPropertyValue(const AZStd::string& value) : m_value(value) {}
|
||||
|
||||
//! Copy constructor
|
||||
|
||||
@@ -74,7 +74,8 @@ namespace AZ
|
||||
|
||||
const RHI::BufferView* Buffer::GetBufferView() const
|
||||
{
|
||||
if(RHI::CheckBitsAny(m_rhiBuffer->GetDescriptor().m_bindFlags, RHI::BufferBindFlags::InputAssembly | RHI::BufferBindFlags::DynamicInputAssembly))
|
||||
if (m_rhiBuffer->GetDescriptor().m_bindFlags == RHI::BufferBindFlags::InputAssembly ||
|
||||
m_rhiBuffer->GetDescriptor().m_bindFlags == RHI::BufferBindFlags::DynamicInputAssembly)
|
||||
{
|
||||
|
||||
AZ_Assert(false, "Input assembly buffer doesn't need a regular buffer view, it requires a stream or index buffer view.");
|
||||
|
||||
@@ -164,6 +164,8 @@ namespace AtomToolsFramework
|
||||
|
||||
bool RenderViewportWidget::OnInputChannelEventFiltered(const AzFramework::InputChannel& inputChannel)
|
||||
{
|
||||
bool shouldConsumeEvent = true;
|
||||
|
||||
// Grab keyboard focus if we've been clicked on.
|
||||
// Qt normally handles this for us, but we're filtering native events before they get
|
||||
// synthesized into QMouseEvents.
|
||||
@@ -175,9 +177,18 @@ namespace AtomToolsFramework
|
||||
// Don't consume new input events if we don't currently have focus.
|
||||
// We do forward Ended events, as they may be relevant to our current state
|
||||
// (e.g. a key gets released after we lose focus, it shouldn't remain "stuck").
|
||||
if (!hasFocus() && inputChannel.GetState() != AzFramework::InputChannel::State::Ended)
|
||||
if (!hasFocus())
|
||||
{
|
||||
return false;
|
||||
if (inputChannel.GetState() == AzFramework::InputChannel::State::Ended)
|
||||
{
|
||||
// Forward the input ended event to our controllers, but don't prevent other viewports from receiving it.
|
||||
shouldConsumeEvent = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not an event we should listen to, abort.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// If we receive a mouse button event from outside of our viewport, ignore it even if we have focus.
|
||||
@@ -196,7 +207,9 @@ namespace AtomToolsFramework
|
||||
}
|
||||
|
||||
AzFramework::NativeWindowHandle windowId = reinterpret_cast<AzFramework::NativeWindowHandle>(winId());
|
||||
return m_controllerList->HandleInputChannelEvent({GetId(), windowId, inputChannel});
|
||||
const bool eventHandled = m_controllerList->HandleInputChannelEvent({GetId(), windowId, inputChannel});
|
||||
// If our controllers handled the event and it's one we can safely consume (i.e. it's not an Ended event that other viewports might need), consume it.
|
||||
return eventHandled && shouldConsumeEvent;
|
||||
}
|
||||
|
||||
void RenderViewportWidget::OnTick([[maybe_unused]]float deltaTime, AZ::ScriptTimePoint time)
|
||||
|
||||
+7
-2
@@ -26,8 +26,14 @@
|
||||
namespace MaterialEditor
|
||||
{
|
||||
CreateMaterialDialog::CreateMaterialDialog(QWidget* parent)
|
||||
: CreateMaterialDialog(QString(AZ::IO::FileIOBase::GetInstance()->GetAlias("@devassets@")) + AZ_CORRECT_FILESYSTEM_SEPARATOR + "Materials", parent)
|
||||
{
|
||||
}
|
||||
|
||||
CreateMaterialDialog::CreateMaterialDialog(const QString& path, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, m_ui(new Ui::CreateMaterialDialog)
|
||||
, m_path(path)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -77,8 +83,7 @@ namespace MaterialEditor
|
||||
{
|
||||
//Select a default location and unique name for the new material
|
||||
m_materialFileInfo = AtomToolsFramework::GetUniqueFileInfo(
|
||||
QString(AZ::IO::FileIOBase::GetInstance()->GetAlias("@devassets@")) +
|
||||
AZ_CORRECT_FILESYSTEM_SEPARATOR + "Materials" +
|
||||
m_path +
|
||||
AZ_CORRECT_FILESYSTEM_SEPARATOR + "untitled." +
|
||||
AZ::RPI::MaterialSourceData::Extension).absoluteFilePath();
|
||||
|
||||
|
||||
+3
@@ -27,6 +27,7 @@ namespace MaterialEditor
|
||||
Q_OBJECT
|
||||
public:
|
||||
CreateMaterialDialog(QWidget* parent = nullptr);
|
||||
CreateMaterialDialog(const QString& path, QWidget* parent = nullptr);
|
||||
~CreateMaterialDialog() = default;
|
||||
|
||||
QFileInfo m_materialFileInfo;
|
||||
@@ -34,6 +35,8 @@ namespace MaterialEditor
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CreateMaterialDialog> m_ui;
|
||||
QString m_path;
|
||||
|
||||
void InitMaterialTypeSelection();
|
||||
void InitMaterialFileSelection();
|
||||
void UpdateMaterialTypeSelection();
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <Atom/Document/MaterialDocumentSystemRequestBus.h>
|
||||
|
||||
#include <Source/Window/MaterialBrowserInteractions.h>
|
||||
#include <Window/CreateMaterialDialog/CreateMaterialDialog.h>
|
||||
|
||||
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialSourceData.h>
|
||||
@@ -246,6 +247,24 @@ namespace MaterialEditor
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
QAction* createMaterialAction = menu->addAction(QObject::tr("Create Material..."));
|
||||
QObject::connect(createMaterialAction, &QAction::triggered, caller, [caller, entry]()
|
||||
{
|
||||
CreateMaterialDialog createDialog(entry->GetFullPath().c_str(), caller);
|
||||
createDialog.adjustSize();
|
||||
|
||||
if (createDialog.exec() == QDialog::Accepted &&
|
||||
!createDialog.m_materialFileInfo.absoluteFilePath().isEmpty() &&
|
||||
!createDialog.m_materialTypeFileInfo.absoluteFilePath().isEmpty())
|
||||
{
|
||||
MaterialDocumentSystemRequestBus::Broadcast(&MaterialDocumentSystemRequestBus::Events::CreateDocumentFromFile,
|
||||
createDialog.m_materialTypeFileInfo.absoluteFilePath().toUtf8().constData(),
|
||||
createDialog.m_materialFileInfo.absoluteFilePath().toUtf8().constData());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void MaterialBrowserInteractions::AddPerforceMenuActions([[maybe_unused]] QWidget* caller, QMenu* menu, const AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry)
|
||||
|
||||
@@ -10,36 +10,32 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzQtComponents/Utilities/DesktopUtilities.h>
|
||||
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserModel.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.h>
|
||||
#include <AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
|
||||
#include <AzToolsFramework/AssetBrowser/Search/Filter.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetSelectionModel.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
|
||||
|
||||
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
|
||||
#include <Atom/RPI.Reflect/Image/StreamingImageAsset.h>
|
||||
|
||||
#include <Atom/Document/MaterialDocumentSystemRequestBus.h>
|
||||
#include <Atom/Document/MaterialDocumentRequestBus.h>
|
||||
#include <Atom/Document/MaterialDocumentSystemRequestBus.h>
|
||||
#include <Atom/RPI.Reflect/Image/StreamingImageAsset.h>
|
||||
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
|
||||
#include <AzQtComponents/Utilities/DesktopUtilities.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserModel.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetSelectionModel.h>
|
||||
#include <AzToolsFramework/AssetBrowser/Search/Filter.h>
|
||||
#include <AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.h>
|
||||
|
||||
#include <Source/Window/MaterialBrowserWidget.h>
|
||||
|
||||
#include <Source/Window/ui_MaterialBrowserWidget.h>
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QMessageBox>
|
||||
#include <QMenu>
|
||||
#include <QAction>
|
||||
#include <QCursor>
|
||||
#include <QPushButton>
|
||||
#include <QList>
|
||||
#include <QByteArray>
|
||||
#include <QCursor>
|
||||
#include <QDesktopServices>
|
||||
#include <QList>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QUrl>
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
namespace MaterialEditor
|
||||
@@ -99,7 +95,6 @@ namespace MaterialEditor
|
||||
}
|
||||
});
|
||||
|
||||
AssetBrowserModelNotificationBus::Handler::BusConnect();
|
||||
MaterialDocumentNotificationBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
@@ -108,26 +103,37 @@ namespace MaterialEditor
|
||||
// Maintains the tree expansion state between runs
|
||||
m_ui->m_assetBrowserTreeViewWidget->SaveState();
|
||||
MaterialDocumentNotificationBus::Handler::BusDisconnect();
|
||||
AssetBrowserModelNotificationBus::Handler::BusDisconnect();
|
||||
AZ::TickBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
AzToolsFramework::AssetBrowser::FilterConstType MaterialBrowserWidget::CreateFilter() const
|
||||
{
|
||||
using namespace AzToolsFramework::AssetBrowser;
|
||||
|
||||
// Material Browser uses the following filters:
|
||||
// 1. [All source files (no products) that contain products matching the assetType specified by searchWidget (default is materials and textures)]
|
||||
// 2. [All folders (including empty folders)]
|
||||
// 3. [All Sources and folders matching the search text typed in search widget]
|
||||
// Final filter = ((1 OR 2) AND 3)
|
||||
|
||||
QSharedPointer<EntryTypeFilter> sourceFilter(new EntryTypeFilter);
|
||||
sourceFilter->SetEntryType(AssetBrowserEntry::AssetEntryType::Source);
|
||||
|
||||
QSharedPointer<CompositeFilter> assetTypeFilter(new CompositeFilter(CompositeFilter::LogicOperatorType::AND));
|
||||
assetTypeFilter->AddFilter(sourceFilter);
|
||||
assetTypeFilter->AddFilter(m_ui->m_searchWidget->GetTypesFilter());
|
||||
|
||||
QSharedPointer<EntryTypeFilter> folderFilter(new EntryTypeFilter);
|
||||
folderFilter->SetEntryType(AssetBrowserEntry::AssetEntryType::Folder);
|
||||
|
||||
QSharedPointer<CompositeFilter> sourceOrFolderFilter(new CompositeFilter(CompositeFilter::LogicOperatorType::OR));
|
||||
sourceOrFolderFilter->AddFilter(sourceFilter);
|
||||
sourceOrFolderFilter->AddFilter(assetTypeFilter);
|
||||
sourceOrFolderFilter->AddFilter(folderFilter);
|
||||
|
||||
QSharedPointer<CompositeFilter> finalFilter(new CompositeFilter(CompositeFilter::LogicOperatorType::AND));
|
||||
finalFilter->AddFilter(sourceOrFolderFilter);
|
||||
finalFilter->AddFilter(m_ui->m_searchWidget->GetFilter());
|
||||
finalFilter->AddFilter(m_ui->m_searchWidget->GetStringFilter());
|
||||
finalFilter->SetFilterPropagation(AssetBrowserEntryFilter::PropagateDirection::Down);
|
||||
|
||||
return finalFilter;
|
||||
}
|
||||
@@ -151,72 +157,65 @@ namespace MaterialEditor
|
||||
|
||||
for (const AssetBrowserEntry* entry : entries)
|
||||
{
|
||||
const SourceAssetBrowserEntry* sourceEntry = azrtti_cast<const SourceAssetBrowserEntry*>(entry);
|
||||
if (!sourceEntry)
|
||||
if (entry)
|
||||
{
|
||||
const ProductAssetBrowserEntry* productEntry = azrtti_cast<const ProductAssetBrowserEntry*>(entry);
|
||||
if (productEntry)
|
||||
if (AzFramework::StringFunc::Path::IsExtension(entry->GetFullPath().c_str(), MaterialExtension))
|
||||
{
|
||||
sourceEntry = azrtti_cast<const SourceAssetBrowserEntry*>(productEntry->GetParent());
|
||||
MaterialDocumentSystemRequestBus::Broadcast(&MaterialDocumentSystemRequestBus::Events::OpenDocument, entry->GetFullPath());
|
||||
}
|
||||
}
|
||||
|
||||
if (sourceEntry)
|
||||
{
|
||||
if (AzFramework::StringFunc::Path::IsExtension(sourceEntry->GetFullPath().c_str(), MaterialExtension))
|
||||
{
|
||||
MaterialDocumentSystemRequestBus::Broadcast(&MaterialDocumentSystemRequestBus::Events::OpenDocument, sourceEntry->GetFullPath());
|
||||
}
|
||||
else if (AzFramework::StringFunc::Path::IsExtension(sourceEntry->GetFullPath().c_str(), MaterialTypeExtension))
|
||||
else if (AzFramework::StringFunc::Path::IsExtension(entry->GetFullPath().c_str(), MaterialTypeExtension))
|
||||
{
|
||||
//ignore MaterialTypeExtension
|
||||
}
|
||||
else
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(sourceEntry->GetFullPath().c_str()));
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(entry->GetFullPath().c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialBrowserWidget::EntryAdded(const AssetBrowserEntry* entry)
|
||||
{
|
||||
if (m_pathToSelect.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const SourceAssetBrowserEntry* sourceEntry = azrtti_cast<const SourceAssetBrowserEntry*>(entry);
|
||||
if (!sourceEntry)
|
||||
{
|
||||
const ProductAssetBrowserEntry* productEntry = azrtti_cast<const ProductAssetBrowserEntry*>(entry);
|
||||
if (productEntry)
|
||||
{
|
||||
sourceEntry = azrtti_cast<const SourceAssetBrowserEntry*>(productEntry->GetParent());
|
||||
}
|
||||
}
|
||||
|
||||
if (sourceEntry)
|
||||
{
|
||||
AZStd::string sourcePath = sourceEntry->GetFullPath();
|
||||
AzFramework::StringFunc::Path::Normalize(sourcePath);
|
||||
if (m_pathToSelect == sourcePath)
|
||||
{
|
||||
m_ui->m_assetBrowserTreeViewWidget->SelectFileAtPath(m_pathToSelect);
|
||||
m_pathToSelect.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialBrowserWidget::OnDocumentOpened(const AZ::Uuid& documentId)
|
||||
{
|
||||
AZStd::string absolutePath;
|
||||
MaterialDocumentRequestBus::EventResult(absolutePath, documentId, &MaterialDocumentRequestBus::Events::GetAbsolutePath);
|
||||
if (!absolutePath.empty())
|
||||
{
|
||||
// Selecting a new asset in the browser is not guaranteed to happen immediately.
|
||||
// The asset browser model notifications are sent before the model is updated.
|
||||
// Instead of relying on the notifications, queue the selection and process it on tick until this change occurs.
|
||||
m_pathToSelect = absolutePath;
|
||||
AzFramework::StringFunc::Path::Normalize(m_pathToSelect);
|
||||
m_ui->m_assetBrowserTreeViewWidget->SelectFileAtPath(m_pathToSelect);
|
||||
AZ::TickBus::Handler::BusConnect();
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialBrowserWidget::OnTick(float deltaTime, AZ::ScriptTimePoint time)
|
||||
{
|
||||
AZ_UNUSED(time);
|
||||
AZ_UNUSED(deltaTime);
|
||||
|
||||
if (!m_pathToSelect.empty())
|
||||
{
|
||||
// Attempt to select the new path
|
||||
AzToolsFramework::AssetBrowser::AssetBrowserViewRequestBus::Broadcast(
|
||||
&AzToolsFramework::AssetBrowser::AssetBrowserViewRequestBus::Events::SelectFileAtPath, m_pathToSelect);
|
||||
|
||||
// Iterate over the selected entries to verify if the selection was made
|
||||
for (const AssetBrowserEntry* entry : m_ui->m_assetBrowserTreeViewWidget->GetSelectedAssets())
|
||||
{
|
||||
if (entry)
|
||||
{
|
||||
AZStd::string sourcePath = entry->GetFullPath();
|
||||
AzFramework::StringFunc::Path::Normalize(sourcePath);
|
||||
if (m_pathToSelect == sourcePath)
|
||||
{
|
||||
// Once the selection is confirmed, cancel the operation and disconnect
|
||||
AZ::TickBus::Handler::BusDisconnect();
|
||||
m_pathToSelect.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <Atom/Document/MaterialDocumentNotificationBus.h>
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
|
||||
#include <AzToolsFramework/AssetBrowser/Search/Filter.h>
|
||||
#include <AzToolsFramework/AssetBrowser/Entries/AssetBrowserEntry.h>
|
||||
#include <AzToolsFramework/AssetBrowser/Search/Filter.h>
|
||||
#include <Atom/Document/MaterialDocumentNotificationBus.h>
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
||||
#include <QWidget>
|
||||
@@ -26,8 +26,6 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
namespace AssetBrowser
|
||||
@@ -50,8 +48,8 @@ namespace MaterialEditor
|
||||
//! Provides a tree view of all available materials and other assets exposed by the MaterialEditor.
|
||||
class MaterialBrowserWidget
|
||||
: public QWidget
|
||||
, public AzToolsFramework::AssetBrowser::AssetBrowserModelNotificationBus::Handler
|
||||
, public MaterialDocumentNotificationBus::Handler
|
||||
, protected AZ::TickBus::Handler
|
||||
, protected MaterialDocumentNotificationBus::Handler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -62,20 +60,20 @@ namespace MaterialEditor
|
||||
AzToolsFramework::AssetBrowser::FilterConstType CreateFilter() const;
|
||||
void OpenSelectedEntries();
|
||||
|
||||
// MaterialDocumentNotificationBus::Handler implementation
|
||||
void OnDocumentOpened(const AZ::Uuid& documentId) override;
|
||||
|
||||
// AZ::TickBus::Handler
|
||||
void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
|
||||
|
||||
void OpenOptionsMenu();
|
||||
|
||||
QScopedPointer<Ui::MaterialBrowserWidget> m_ui;
|
||||
AzToolsFramework::AssetBrowser::AssetBrowserFilterModel* m_filterModel = nullptr;
|
||||
|
||||
//! if new asset is being created with this path it will automatically be selected
|
||||
AZStd::string m_pathToSelect;
|
||||
|
||||
// AssetBrowserModelNotificationBus::Handler implementation
|
||||
void EntryAdded(const AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry) override;
|
||||
|
||||
// MaterialDocumentNotificationBus::Handler implementation
|
||||
void OnDocumentOpened(const AZ::Uuid& documentId) override;
|
||||
|
||||
void OpenOptionsMenu();
|
||||
|
||||
QByteArray m_materialBrowserState;
|
||||
};
|
||||
} // namespace MaterialEditor
|
||||
|
||||
@@ -277,11 +277,11 @@ namespace AZ
|
||||
|
||||
void ScaleCoord(const RHI::Viewport& viewport, float& x, float& y) const;
|
||||
|
||||
void InitDefaultWindowContext();
|
||||
void InitDefaultViewportContext();
|
||||
|
||||
void OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) override;
|
||||
|
||||
RPI::WindowContextSharedPtr GetDefaultWindowContext() const;
|
||||
RPI::ViewportContextPtr GetDefaultViewportContext() const;
|
||||
|
||||
private:
|
||||
static constexpr uint32_t NumBuffers = 2;
|
||||
static constexpr float WindowScaleWidth = 800.0f;
|
||||
@@ -294,9 +294,6 @@ namespace AZ
|
||||
size_t m_fontBufferSize = 0;
|
||||
unsigned char* m_fontBuffer = nullptr;
|
||||
|
||||
AZStd::shared_ptr<RPI::WindowContext> m_defaultWindowContext;
|
||||
AZStd::shared_ptr<AZ::RPI::ViewportContext> m_defaultViewportContext;
|
||||
|
||||
AZ::Data::Instance<AZ::RPI::StreamingImage> m_fontStreamingImage;
|
||||
AZ::RHI::Ptr<AZ::RHI::Image> m_fontImage;
|
||||
uint32_t m_fontImageVersion = 0;
|
||||
@@ -304,7 +301,13 @@ namespace AZ
|
||||
AtomFont* m_atomFont = nullptr;
|
||||
|
||||
bool m_fontTexDirty = false;
|
||||
bool m_fontInitialized = false;
|
||||
enum class InitializationState : AZ::u8
|
||||
{
|
||||
Uninitialized,
|
||||
Initializing,
|
||||
Initialized
|
||||
};
|
||||
AZStd::atomic<InitializationState> m_fontInitializationState = InitializationState::Uninitialized;
|
||||
|
||||
FontEffects m_effects;
|
||||
|
||||
@@ -345,26 +348,4 @@ namespace AZ
|
||||
}
|
||||
}
|
||||
|
||||
inline void AZ::FFont::InitDefaultWindowContext()
|
||||
{
|
||||
if (!m_defaultWindowContext)
|
||||
{
|
||||
// font is created before window & viewport in the editor so need to do late init
|
||||
// TODO need to deal with multiple windows, such as the editor
|
||||
AZ::Render::Bootstrap::DefaultWindowBus::BroadcastResult(m_defaultWindowContext, &AZ::Render::Bootstrap::DefaultWindowInterface::GetDefaultWindowContext);
|
||||
AZ_Assert(m_defaultWindowContext, "Unable to get the main window context");
|
||||
}
|
||||
}
|
||||
|
||||
inline void AZ::FFont::InitDefaultViewportContext()
|
||||
{
|
||||
if (!m_defaultViewportContext)
|
||||
{
|
||||
// font is created before window & viewport in the editor so need to do late init
|
||||
auto viewContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
|
||||
m_defaultViewportContext = viewContextManager->GetViewportContextByName(viewContextManager->GetDefaultViewportContextName());
|
||||
AZ_Assert(m_defaultViewportContext, "Unable to get the viewport context");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -84,19 +84,35 @@ AZ::FFont::FFont(AtomFont* atomFont, const char* fontName)
|
||||
AZ::Render::Bootstrap::NotificationBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
AZ::RPI::ViewportContextPtr AZ::FFont::GetDefaultViewportContext() const
|
||||
{
|
||||
auto viewContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
|
||||
return viewContextManager->GetDefaultViewportContext();
|
||||
}
|
||||
|
||||
AZ::RPI::WindowContextSharedPtr AZ::FFont::GetDefaultWindowContext() const
|
||||
{
|
||||
if (auto defaultViewportContext = GetDefaultViewportContext())
|
||||
{
|
||||
return defaultViewportContext->GetWindowContext();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
bool AZ::FFont::InitFont()
|
||||
{
|
||||
if (m_fontInitialized)
|
||||
auto initializationState = InitializationState::Uninitialized;
|
||||
// Do an atomic transition to Initializing if we're in the Uninitialized state.
|
||||
// Otherwise, check the current state.
|
||||
// If we're Initialized, there's no more work to be done, return true to indicate we're good to go.
|
||||
// If we're Initializing (on another thread), return false to let the consumer know it's not safe for us to be used yet.
|
||||
if (!m_fontInitializationState.compare_exchange_strong(initializationState, InitializationState::Initializing))
|
||||
{
|
||||
return true;
|
||||
return initializationState == InitializationState::Initialized;
|
||||
}
|
||||
|
||||
InitDefaultWindowContext();
|
||||
InitDefaultViewportContext();
|
||||
|
||||
// Create and initialize DynamicDrawContext for font draw
|
||||
AZ::RPI::Ptr<AZ::RPI::DynamicDrawContext> dynamicDraw = m_atomFont->GetOrCreateDynamicDrawForScene(m_defaultViewportContext->GetRenderScene().get());
|
||||
AZ::RPI::Ptr<AZ::RPI::DynamicDrawContext> dynamicDraw = m_atomFont->GetOrCreateDynamicDrawForScene(GetDefaultViewportContext()->GetRenderScene().get());
|
||||
|
||||
// Save draw srg input indices for later use
|
||||
Data::Instance<RPI::ShaderResourceGroup> drawSrg = dynamicDraw->NewDrawSrg();
|
||||
@@ -117,7 +133,7 @@ bool AZ::FFont::InitFont()
|
||||
m_vertexCount = 0;
|
||||
m_indexCount = 0;
|
||||
|
||||
m_fontInitialized = true;
|
||||
m_fontInitializationState = InitializationState::Initialized;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -259,7 +275,7 @@ void AZ::FFont::DrawString(float x, float y, const char* str, const bool asciiMu
|
||||
return;
|
||||
}
|
||||
|
||||
DrawStringUInternal(m_defaultWindowContext->GetViewport(), m_defaultViewportContext.get(), x, y, 1.0f, str, asciiMultiLine, ctx);
|
||||
DrawStringUInternal(GetDefaultWindowContext()->GetViewport(), GetDefaultViewportContext().get(), x, y, 1.0f, str, asciiMultiLine, ctx);
|
||||
}
|
||||
|
||||
void AZ::FFont::DrawString(float x, float y, float z, const char* str, const bool asciiMultiLine, const TextDrawContext& ctx)
|
||||
@@ -269,7 +285,7 @@ void AZ::FFont::DrawString(float x, float y, float z, const char* str, const boo
|
||||
return;
|
||||
}
|
||||
|
||||
DrawStringUInternal(m_defaultWindowContext->GetViewport(), m_defaultViewportContext.get(), x, y, z, str, asciiMultiLine, ctx);
|
||||
DrawStringUInternal(GetDefaultWindowContext()->GetViewport(), GetDefaultViewportContext().get(), x, y, z, str, asciiMultiLine, ctx);
|
||||
}
|
||||
|
||||
void AZ::FFont::DrawStringUInternal(
|
||||
@@ -282,6 +298,12 @@ void AZ::FFont::DrawStringUInternal(
|
||||
const bool asciiMultiLine,
|
||||
const TextDrawContext& ctx)
|
||||
{
|
||||
// Lazily ensure we're initialized before attempting to render.
|
||||
if (!InitFont())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!str
|
||||
|| !m_vertexBuffer // vertex buffer isn't created until BootstrapScene is ready, Editor tries to render text before that.
|
||||
|| !m_fontTexture
|
||||
@@ -400,7 +422,7 @@ Vec2 AZ::FFont::GetTextSize(const char* str, const bool asciiMultiLine, const Te
|
||||
return Vec2(0.0f, 0.0f);
|
||||
}
|
||||
|
||||
return GetTextSizeUInternal(m_defaultWindowContext->GetViewport(), str, asciiMultiLine, ctx);
|
||||
return GetTextSizeUInternal(GetDefaultWindowContext()->GetViewport(), str, asciiMultiLine, ctx);
|
||||
}
|
||||
|
||||
Vec2 AZ::FFont::GetTextSizeUInternal(
|
||||
@@ -746,7 +768,7 @@ uint32_t AZ::FFont::WriteTextQuadsToBuffers(SVF_P2F_C4B_T2F_F4B* verts, uint16_t
|
||||
return true;
|
||||
};
|
||||
|
||||
CreateQuadsForText(m_defaultWindowContext->GetViewport(), x, y, z, str, asciiMultiLine, ctx, AddQuad);
|
||||
CreateQuadsForText(GetDefaultWindowContext()->GetViewport(), x, y, z, str, asciiMultiLine, ctx, AddQuad);
|
||||
|
||||
return numQuadsWritten;
|
||||
}
|
||||
@@ -1438,7 +1460,7 @@ void AZ::FFont::AddCharsToFontTexture(const char* chars, int glyphSizeX, int gly
|
||||
|
||||
Vec2 AZ::FFont::GetKerning(uint32_t leftGlyph, uint32_t rightGlyph, const TextDrawContext& ctx) const
|
||||
{
|
||||
return GetKerningInternal(m_defaultWindowContext->GetViewport(), leftGlyph, rightGlyph, ctx);
|
||||
return GetKerningInternal(GetDefaultWindowContext()->GetViewport(), leftGlyph, rightGlyph, ctx);
|
||||
}
|
||||
|
||||
Vec2 AZ::FFont::GetKerningInternal(const RHI::Viewport& viewport, uint32_t leftGlyph, uint32_t rightGlyph, const TextDrawContext& ctx) const
|
||||
@@ -1454,7 +1476,7 @@ float AZ::FFont::GetAscender(const TextDrawContext& ctx) const
|
||||
|
||||
float AZ::FFont::GetBaseline(const TextDrawContext& ctx) const
|
||||
{
|
||||
return GetBaselineInternal(m_defaultWindowContext->GetViewport(), ctx);
|
||||
return GetBaselineInternal(GetDefaultWindowContext()->GetViewport(), ctx);
|
||||
}
|
||||
|
||||
float AZ::FFont::GetBaselineInternal(const RHI::Viewport& viewport, const TextDrawContext& ctx) const
|
||||
@@ -1496,7 +1518,7 @@ bool AZ::FFont::UpdateTexture()
|
||||
{
|
||||
using namespace AZ;
|
||||
|
||||
if (!m_fontInitialized || !m_fontImage)
|
||||
if (m_fontInitializationState != InitializationState::Initialized || !m_fontImage)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1564,7 +1586,7 @@ void AZ::FFont::Prepare(const char* str, bool updateTexture, const AtomFont::Gly
|
||||
const bool rerenderGlyphs = m_sizeBehavior == SizeBehavior::Rerender;
|
||||
const AtomFont::GlyphSize usedGlyphSize = rerenderGlyphs ? glyphSize : AtomFont::defaultGlyphSize;
|
||||
bool texUpdateNeeded = m_fontTexture->PreCacheString(str, nullptr, m_sizeRatio, usedGlyphSize, m_fontHintParams) == 1 || m_fontTexDirty;
|
||||
if (m_fontInitialized && updateTexture && texUpdateNeeded && m_fontImage)
|
||||
if (m_fontInitializationState == InitializationState::Initialized && updateTexture && texUpdateNeeded && m_fontImage)
|
||||
{
|
||||
UpdateTexture();
|
||||
m_fontTexDirty = false;
|
||||
|
||||
@@ -212,19 +212,26 @@ namespace AZ
|
||||
|
||||
void AtomActorInstance::SetModelAsset([[maybe_unused]] Data::Asset<RPI::ModelAsset> modelAsset)
|
||||
{
|
||||
// Atom Actor Instance is not based on an actual Model Asset yet,
|
||||
// it's created at runtime from an Actor Asset.
|
||||
// Changing model asset is not supported by Atom Actor Instance.
|
||||
// The model asset is obtained from the Actor inside the ActorAsset,
|
||||
// which is passed to the constructor. To set a different model asset
|
||||
// this instance should use a different Actor.
|
||||
AZ_Assert(false, "AtomActorInstance::SetModelAsset not supported");
|
||||
}
|
||||
|
||||
const Data::Asset<RPI::ModelAsset>& AtomActorInstance::GetModelAsset() const
|
||||
{
|
||||
return m_skinnedMeshInstance->m_model->GetModelAsset();
|
||||
AZ_Assert(GetActor(), "Expecting a Atom Actor Instance having a valid Actor.");
|
||||
return GetActor()->GetMeshAsset();
|
||||
}
|
||||
|
||||
void AtomActorInstance::SetModelAssetId([[maybe_unused]] Data::AssetId modelAssetId)
|
||||
{
|
||||
// Atom Actor Instance is not based on an actual Model Asset yet,
|
||||
// it's created at runtime from an Actor Asset.
|
||||
// Changing model asset is not supported by Atom Actor Instance.
|
||||
// The model asset is obtained from the Actor inside the ActorAsset,
|
||||
// which is passed to the constructor. To set a different model asset
|
||||
// this instance should use a different Actor.
|
||||
AZ_Assert(false, "AtomActorInstance::SetModelAssetId not supported");
|
||||
}
|
||||
|
||||
Data::AssetId AtomActorInstance::GetModelAssetId() const
|
||||
@@ -234,8 +241,11 @@ namespace AZ
|
||||
|
||||
void AtomActorInstance::SetModelAssetPath([[maybe_unused]] const AZStd::string& modelAssetPath)
|
||||
{
|
||||
// Atom Actor Instance is not based on an actual Model Asset yet,
|
||||
// it's created at runtime from an Actor Asset.
|
||||
// Changing model asset is not supported by Atom Actor Instance.
|
||||
// The model asset is obtained from the Actor inside the ActorAsset,
|
||||
// which is passed to the constructor. To set a different model asset
|
||||
// this instance should use a different Actor.
|
||||
AZ_Assert(false, "AtomActorInstance::SetModelAssetPath not supported");
|
||||
}
|
||||
|
||||
AZStd::string AtomActorInstance::GetModelAssetPath() const
|
||||
@@ -278,28 +288,6 @@ namespace AZ
|
||||
return IsVisible();
|
||||
}
|
||||
|
||||
void AtomActorInstance::SetMeshAsset(const AZ::Data::AssetId& id)
|
||||
{
|
||||
AZ::Data::Asset<EMotionFX::Integration::ActorAsset> asset =
|
||||
AZ::Data::AssetManager::Instance().GetAsset<EMotionFX::Integration::ActorAsset>(
|
||||
id, m_actorAsset.GetAutoLoadBehavior());
|
||||
if (asset)
|
||||
{
|
||||
m_actorAsset = asset;
|
||||
Create();
|
||||
}
|
||||
}
|
||||
|
||||
AZ::Data::Asset<AZ::Data::AssetData> AtomActorInstance::GetMeshAsset()
|
||||
{
|
||||
return m_actorAsset;
|
||||
}
|
||||
|
||||
bool AtomActorInstance::GetVisibility()
|
||||
{
|
||||
return static_cast<const AtomActorInstance&>(*this).GetVisibility();
|
||||
}
|
||||
|
||||
AZ::u32 AtomActorInstance::GetJointCount()
|
||||
{
|
||||
return m_actorInstance->GetActor()->GetSkeleton()->GetNumNodes();
|
||||
@@ -469,7 +457,6 @@ namespace AZ
|
||||
TransformNotificationBus::Handler::BusConnect(m_entityId);
|
||||
MaterialComponentNotificationBus::Handler::BusConnect(m_entityId);
|
||||
MeshComponentRequestBus::Handler::BusConnect(m_entityId);
|
||||
LmbrCentral::MeshComponentRequestBus::Handler::BusConnect(m_entityId);
|
||||
|
||||
const Data::Instance<RPI::Model> model = m_meshFeatureProcessor->GetModel(*m_meshHandle);
|
||||
MeshComponentNotificationBus::Event(m_entityId, &MeshComponentNotificationBus::Events::OnModelReady, model->GetModelAsset(), model);
|
||||
@@ -479,7 +466,6 @@ namespace AZ
|
||||
{
|
||||
MeshComponentNotificationBus::Event(m_entityId, &MeshComponentNotificationBus::Events::OnModelPreDestroy);
|
||||
|
||||
LmbrCentral::MeshComponentRequestBus::Handler::BusDisconnect();
|
||||
MeshComponentRequestBus::Handler::BusDisconnect();
|
||||
MaterialComponentNotificationBus::Handler::BusDisconnect();
|
||||
TransformNotificationBus::Handler::BusDisconnect();
|
||||
|
||||
@@ -62,7 +62,6 @@ namespace AZ
|
||||
, public AzFramework::BoundsRequestBus::Handler
|
||||
, public AZ::Render::MaterialComponentNotificationBus::Handler
|
||||
, public AZ::Render::MeshComponentRequestBus::Handler
|
||||
, public LmbrCentral::MeshComponentRequestBus::Handler
|
||||
, private AZ::Render::SkinnedMeshFeatureProcessorNotificationBus::Handler
|
||||
, private AZ::Render::SkinnedMeshOutputStreamNotificationBus::Handler
|
||||
, private LmbrCentral::SkeletalHierarchyRequestBus::Handler
|
||||
@@ -143,14 +142,6 @@ namespace AZ
|
||||
bool GetVisibility() const override;
|
||||
// GetWorldBounds/GetLocalBounds already overridden by BoundsRequestBus::Handler
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// LmbrCentral::MeshComponentRequestBus::Handler
|
||||
void SetMeshAsset(const AZ::Data::AssetId& id) override;
|
||||
AZ::Data::Asset<AZ::Data::AssetData> GetMeshAsset() override;
|
||||
bool GetVisibility() override;
|
||||
// SetVisibility already overridden by MeshComponentRequestBus::Handler
|
||||
// GetWorldBounds/GetLocalBounds already overridden by BoundsRequestBus::Handler
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SkeletalHierarchyRequestBus::Handler overrides...
|
||||
AZ::u32 GetJointCount() override;
|
||||
|
||||
@@ -69,4 +69,4 @@ namespace Blast
|
||||
// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
|
||||
// The first parameter should be GemName_GemIdLower
|
||||
// The second should be the fully qualified name of the class above
|
||||
AZ_DECLARE_MODULE_CLASS(Blast_414bd211c99d4f74aef3a266b9ca208c, Blast::BlastModule)
|
||||
AZ_DECLARE_MODULE_CLASS(Gem_Blast, Blast::BlastModule)
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
|
||||
// The first parameter should be GemName_GemIdLower
|
||||
// The second should be the fully qualified name of the class above
|
||||
AZ_DECLARE_MODULE_CLASS(Blast_414bd211c99d4f74aef3a266b9ca208c, AZ::Module)
|
||||
AZ_DECLARE_MODULE_CLASS(Gem_Blast, AZ::Module)
|
||||
|
||||
@@ -1,362 +1,240 @@
|
||||
<ObjectStream version="3">
|
||||
<Class name="SceneManifest" version="1" type="{9274AD17-3212-4651-9F3B-7DCCB080E467}">
|
||||
<Class name="AZStd::vector" field="values" type="{5D6A7C67-11CA-59A4-829B-0B20B781B292}">
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{EB7522F9-0E87-55A9-A191-E924DC5AE867}">
|
||||
<Class name="ActorGroup" field="element" version="4" type="{D1AC3803-8282-46C5-8610-93CD39B0F843}">
|
||||
<Class name="IActorGroup" field="BaseClass1" version="2" type="{C86945A8-AEE8-4CFC-8FBF-A20E9BC71348}">
|
||||
<Class name="ISceneNodeGroup" field="BaseClass1" version="1" type="{1D20FA11-B184-429E-8C86-745852234845}">
|
||||
<Class name="IGroup" field="BaseClass1" version="1" type="{DE008E67-790D-4672-A73A-5CA0F31EDD2D}">
|
||||
<Class name="IManifestObject" field="BaseClass1" type="{3B839407-1884-4FF4-ABEA-CA9D347E83F7}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::string" field="name" value="chicken" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="selectedRootBone" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="SceneNodeSelectionList" field="nodeSelectionList" version="1" type="{D0CE66CE-1BAD-42F5-86ED-3923573B3A02}">
|
||||
<Class name="ISceneNodeSelectionList" field="BaseClass1" version="1" type="{DC3F9996-E550-4780-A03B-80B0DDA1DA45}"/>
|
||||
<Class name="AZStd::vector" field="selectedNodes" type="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}">
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_feet_skin" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_eyes_skin" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_body_skin" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_mohawk" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_feet_skin.SkinWeight_0" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_feet_skin.map1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_feet_skin.chicken_body_mat" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_eyes_skin.SkinWeight_0" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_eyes_skin.uvSet1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_eyes_skin.chicken_eye_mat" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_body_skin.SkinWeight_0" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_body_skin.map1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_body_skin.chicken_body_mat" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_mohawk.SkinWeight_0" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_mohawk.colorSet1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_mohawk.map1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_mohawk.mohawkMat" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
</Class>
|
||||
<Class name="AZStd::vector" field="unselectedNodes" type="{99DAD0BC-740E-5E82-826B-8FC7968CC02C}">
|
||||
<Class name="AZStd::string" field="element" value="RootNode" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.def_l_ball_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.def_r_ball_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.def_c_tail2_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.def_l_wing_end" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.def_r_wing_end" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.def_l_ball_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.def_r_ball_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.def_c_tail2_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.def_l_wing_end.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.def_r_wing_end.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.def_c_mouth_end" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.def_c_mouth_end.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.def_c_waddle_end" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.def_c_feather_end" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.def_c_waddle_end.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="element" value="RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.def_c_feather_end.transform" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZ::Uuid" field="id" value="{C086F309-EE7E-5AFD-A9C2-69DE5BA48461}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
<Class name="RuleContainer" field="rules" version="1" type="{2C20D3DF-57FF-4A31-8680-A4D45302B9CF}">
|
||||
<Class name="AZStd::vector" field="rules" type="{B5BDB053-178F-5D55-8663-70897A71B7C9}">
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{0BB4AFBA-F087-55C7-95DF-01D71F6CB052}">
|
||||
<Class name="CoordinateSystemRule" field="element" version="1" type="{603207E2-4F55-4C33-9AAB-98CA75C1E351}">
|
||||
<Class name="IRule" field="BaseClass1" version="1" type="{81267F8B-3963-423B-9FF7-D276D82CD110}">
|
||||
<Class name="IManifestObject" field="BaseClass1" type="{3B839407-1884-4FF4-ABEA-CA9D347E83F7}"/>
|
||||
</Class>
|
||||
<Class name="int" field="targetCoordinateSystem" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{0BB4AFBA-F087-55C7-95DF-01D71F6CB052}">
|
||||
<Class name="TangentsRule" field="element" version="1" type="{4BD1CE13-D2EB-4CCF-AB21-4877EF69DE7D}">
|
||||
<Class name="IRule" field="BaseClass1" version="1" type="{81267F8B-3963-423B-9FF7-D276D82CD110}">
|
||||
<Class name="IManifestObject" field="BaseClass1" type="{3B839407-1884-4FF4-ABEA-CA9D347E83F7}"/>
|
||||
</Class>
|
||||
<Class name="int" field="tangentSpace" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
|
||||
<Class name="int" field="bitangentMethod" value="1" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
|
||||
<Class name="bool" field="normalize" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="AZ::u64" field="uvSetIndex" value="0" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{0BB4AFBA-F087-55C7-95DF-01D71F6CB052}">
|
||||
<Class name="SkinRule" field="element" version="2" type="{B26E7FC9-86A1-4711-8415-8BE4861C08BA}">
|
||||
<Class name="ISkinRule" field="BaseClass1" version="1" type="{5496ECAF-B096-4455-AE72-D55C5B675443}">
|
||||
<Class name="IRule" field="BaseClass1" version="1" type="{81267F8B-3963-423B-9FF7-D276D82CD110}">
|
||||
<Class name="IManifestObject" field="BaseClass1" type="{3B839407-1884-4FF4-ABEA-CA9D347E83F7}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="unsigned int" field="maxWeightsPerVertex" value="4" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
<Class name="float" field="weightThreshold" value="0.0010000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{0BB4AFBA-F087-55C7-95DF-01D71F6CB052}">
|
||||
<Class name="MeshRule" field="element" version="4" type="{7F115A73-28A2-4E35-8C87-1A1982773034}">
|
||||
<Class name="IMeshRule" field="BaseClass1" version="1" type="{299934A2-22EC-48AF-AB2B-953AFF8E0B19}">
|
||||
<Class name="IRule" field="BaseClass1" version="1" type="{81267F8B-3963-423B-9FF7-D276D82CD110}">
|
||||
<Class name="IManifestObject" field="BaseClass1" type="{3B839407-1884-4FF4-ABEA-CA9D347E83F7}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::string" field="vertexColorStreamName" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="unsigned char" field="vertexColorMode" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{0BB4AFBA-F087-55C7-95DF-01D71F6CB052}">
|
||||
<Class name="ClothRule" field="element" version="2" type="{2F5AC324-314A-4C53-AFFF-DDFA46605DDB}">
|
||||
<Class name="IClothRule" field="BaseClass1" version="1" type="{5185510A-50BF-418A-ACB4-1A9E014C7E43}">
|
||||
<Class name="IRule" field="BaseClass1" version="1" type="{81267F8B-3963-423B-9FF7-D276D82CD110}">
|
||||
<Class name="IManifestObject" field="BaseClass1" type="{3B839407-1884-4FF4-ABEA-CA9D347E83F7}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::string" field="meshNodeName" value="RootNode.chicken_mohawk" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::string" field="inverseMassesStreamName" value="colorSet1" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="unsigned char" field="inverseMassesChannel" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
<Class name="AZStd::string" field="motionConstraintsStreamName" value="Default: 1.0" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="unsigned char" field="motionConstraintsChannel" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
<Class name="AZStd::string" field="backstopStreamName" value="None" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="unsigned char" field="backstopOffsetChannel" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
<Class name="unsigned char" field="backstopRadiusChannel" value="1" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{0BB4AFBA-F087-55C7-95DF-01D71F6CB052}">
|
||||
<Class name="MetaDataRule" field="element" version="2" type="{8D759063-7D2E-4543-8EB3-AB510A5886CF}">
|
||||
<Class name="IManifestObject" field="BaseClass1" type="{3B839407-1884-4FF4-ABEA-CA9D347E83F7}"/>
|
||||
<Class name="AZStd::vector" field="commands" type="{C9984A24-DA9E-518F-9F81-27E51FAEB1F7}"/>
|
||||
<Class name="AZStd::string" field="metaData" value='AdjustActor -actorID $(ACTORID) -name "chicken"
|
||||
ActorSetCollisionMeshes -actorID $(ACTORID) -lod 0 -nodeList ""
|
||||
AdjustActor -actorID $(ACTORID) -nodesExcludedFromBounds "" -nodeAction "select"
|
||||
AdjustActor -actorID $(ACTORID) -nodeAction "replace" -attachmentNodes ""
|
||||
' type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{0BB4AFBA-F087-55C7-95DF-01D71F6CB052}">
|
||||
<Class name="ActorPhysicsSetupRule" field="element" version="1" type="{B18E9412-85DC-442D-9AA3-293B583EC1A6}">
|
||||
<Class name="AZStd::shared_ptr" field="data" type="{40A77278-7D0F-51EB-A537-72AE8478D1C0}">
|
||||
<Class name="PhysicsSetup" field="element" version="4" type="{4749DFCB-5CBE-434D-9551-34F4C0CCA428}">
|
||||
<Class name="AnimationConfiguration" field="config" version="3" type="{6D53168F-470E-4B41-986A-612506F09B40}">
|
||||
<Class name="CharacterColliderConfiguration" field="hitDetectionConfig" version="1" type="{4DFF1434-DF5B-4ED5-BE0F-D3E66F9B331A}">
|
||||
<Class name="AZStd::vector" field="nodes" type="{70C9FE19-65A8-5FA9-A447-7561B0C9FA9A}"/>
|
||||
</Class>
|
||||
<Class name="RagdollConfiguration" field="ragdollConfig" version="2" type="{7C96D332-61D8-4C58-A2BF-707716D38D14}">
|
||||
<Class name="WorldBodyConfiguration" field="BaseClass1" version="1" type="{6EEB377C-DC60-4E10-AF12-9626C0763B2D}">
|
||||
<Class name="AZStd::string" field="name" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
</Class>
|
||||
<Class name="AZStd::vector" field="nodes" type="{023260FD-3D32-570B-A75E-4099359BE960}"/>
|
||||
<Class name="CharacterColliderConfiguration" field="colliders" version="1" type="{4DFF1434-DF5B-4ED5-BE0F-D3E66F9B331A}">
|
||||
<Class name="AZStd::vector" field="nodes" type="{70C9FE19-65A8-5FA9-A447-7561B0C9FA9A}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="CharacterColliderConfiguration" field="clothConfig" version="1" type="{4DFF1434-DF5B-4ED5-BE0F-D3E66F9B331A}">
|
||||
<Class name="AZStd::vector" field="nodes" type="{70C9FE19-65A8-5FA9-A447-7561B0C9FA9A}">
|
||||
<Class name="CharacterColliderNodeConfiguration" field="element" version="1" type="{C16F3301-0979-400C-B734-692D83755C39}">
|
||||
<Class name="AZStd::string" field="name" value="def_c_head_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::vector" field="shapes" type="{EDCE8AC7-3324-5A75-9B44-27983A0CBFDB}">
|
||||
<Class name="AZStd::pair" field="element" type="{9EEDBBE5-F74D-528D-8089-580876B248C5}">
|
||||
<Class name="AZStd::shared_ptr" field="value1" type="{FBE2C86C-C034-57E1-A1A3-9066B3F60C0E}">
|
||||
<Class name="ColliderConfiguration" field="element" version="4" type="{16206828-F867-4DA9-9E4E-549B7B2C6174}">
|
||||
<Class name="CollisionLayer" field="CollisionLayer" version="1" type="{5AA459C8-2D92-46D2-9154-ED49EE4FE70E}">
|
||||
<Class name="unsigned char" field="Index" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
</Class>
|
||||
<Class name="Id" field="CollisionGroupId" version="1" type="{DFED4FE5-2292-4F07-A318-41C68DAEFE9C}">
|
||||
<Class name="AZ::Uuid" field="GroupId" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
</Class>
|
||||
<Class name="bool" field="Visible" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Trigger" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Simulated" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="InSceneQueries" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Exclusive" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="Vector3" field="Position" value="-0.0850560 0.0000000 0.0093709" type="{8379EB7D-01FA-4538-B64B-A6543B4BE73D}"/>
|
||||
<Class name="Quaternion" field="Rotation" value="0.7071437 0.0000000 0.0000000 0.7089844" type="{73103120-3DD3-4873-BAB3-9713FA2804FB}"/>
|
||||
<Class name="MaterialSelection" field="MaterialSelection" version="2" type="{F571AFF4-C4BB-4590-A204-D11D9EEABBC4}">
|
||||
<Class name="Asset" field="Material" value="id={00000000-0000-0000-0000-000000000000}:0,type={9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F},hint={},loadBehavior=2" version="2" type="{77A19D40-8731-4D3C-9041-1B43047366A4}"/>
|
||||
<Class name="AZStd::vector" field="MaterialIds" type="{82111EAD-9C65-57F0-BA72-46D6D931B434}">
|
||||
<Class name="MaterialId" field="element" version="1" type="{744CCE6C-9F69-4E2F-B950-DAB8514F870B}">
|
||||
<Class name="AZ::Uuid" field="MaterialId" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="unsigned char" field="propertyVisibilityFlags" value="248" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
<Class name="AZStd::string" field="ColliderTag" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="float" field="RestOffset" value="0.0000000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
<Class name="float" field="ContactOffset" value="0.0200000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="value2" type="{568500E4-F003-54B8-B728-711DB5DF0AE4}">
|
||||
<Class name="CapsuleShapeConfiguration" field="element" version="1" type="{19C6A07E-5644-46B7-A49E-48703B56ED32}">
|
||||
<Class name="ShapeConfiguration" field="BaseClass1" version="1" type="{1FD56C72-6055-4B35-9253-07D432B94E91}">
|
||||
<Class name="Vector3" field="Scale" value="1.0000000 1.0000000 1.0000000" type="{8379EB7D-01FA-4538-B64B-A6543B4BE73D}"/>
|
||||
</Class>
|
||||
<Class name="float" field="Height" value="0.1912735" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
<Class name="float" field="Radius" value="0.0506367" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="CharacterColliderNodeConfiguration" field="element" version="1" type="{C16F3301-0979-400C-B734-692D83755C39}">
|
||||
<Class name="AZStd::string" field="name" value="def_c_neck_joint" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::vector" field="shapes" type="{EDCE8AC7-3324-5A75-9B44-27983A0CBFDB}">
|
||||
<Class name="AZStd::pair" field="element" type="{9EEDBBE5-F74D-528D-8089-580876B248C5}">
|
||||
<Class name="AZStd::shared_ptr" field="value1" type="{FBE2C86C-C034-57E1-A1A3-9066B3F60C0E}">
|
||||
<Class name="ColliderConfiguration" field="element" version="4" type="{16206828-F867-4DA9-9E4E-549B7B2C6174}">
|
||||
<Class name="CollisionLayer" field="CollisionLayer" version="1" type="{5AA459C8-2D92-46D2-9154-ED49EE4FE70E}">
|
||||
<Class name="unsigned char" field="Index" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
</Class>
|
||||
<Class name="Id" field="CollisionGroupId" version="1" type="{DFED4FE5-2292-4F07-A318-41C68DAEFE9C}">
|
||||
<Class name="AZ::Uuid" field="GroupId" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
</Class>
|
||||
<Class name="bool" field="Visible" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Trigger" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Simulated" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="InSceneQueries" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Exclusive" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="Vector3" field="Position" value="-0.0381019 0.0000000 -0.0313244" type="{8379EB7D-01FA-4538-B64B-A6543B4BE73D}"/>
|
||||
<Class name="Quaternion" field="Rotation" value="0.0000000 0.0000000 0.0000000 1.0000000" type="{73103120-3DD3-4873-BAB3-9713FA2804FB}"/>
|
||||
<Class name="MaterialSelection" field="MaterialSelection" version="2" type="{F571AFF4-C4BB-4590-A204-D11D9EEABBC4}">
|
||||
<Class name="Asset" field="Material" value="id={00000000-0000-0000-0000-000000000000}:0,type={9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F},hint={},loadBehavior=2" version="2" type="{77A19D40-8731-4D3C-9041-1B43047366A4}"/>
|
||||
<Class name="AZStd::vector" field="MaterialIds" type="{82111EAD-9C65-57F0-BA72-46D6D931B434}">
|
||||
<Class name="MaterialId" field="element" version="1" type="{744CCE6C-9F69-4E2F-B950-DAB8514F870B}">
|
||||
<Class name="AZ::Uuid" field="MaterialId" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="unsigned char" field="propertyVisibilityFlags" value="248" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
<Class name="AZStd::string" field="ColliderTag" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="float" field="RestOffset" value="0.0000000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
<Class name="float" field="ContactOffset" value="0.0200000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="value2" type="{568500E4-F003-54B8-B728-711DB5DF0AE4}">
|
||||
<Class name="SphereShapeConfiguration" field="element" version="1" type="{0B9F3D2E-0780-4B0B-BFEE-B41C5FDE774A}">
|
||||
<Class name="ShapeConfiguration" field="BaseClass1" version="1" type="{1FD56C72-6055-4B35-9253-07D432B94E91}">
|
||||
<Class name="Vector3" field="Scale" value="1.0000000 1.0000000 1.0000000" type="{8379EB7D-01FA-4538-B64B-A6543B4BE73D}"/>
|
||||
</Class>
|
||||
<Class name="float" field="Radius" value="0.1606994" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="CharacterColliderNodeConfiguration" field="element" version="1" type="{C16F3301-0979-400C-B734-692D83755C39}">
|
||||
<Class name="AZStd::string" field="name" value="def_c_spine_end" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="AZStd::vector" field="shapes" type="{EDCE8AC7-3324-5A75-9B44-27983A0CBFDB}">
|
||||
<Class name="AZStd::pair" field="element" type="{9EEDBBE5-F74D-528D-8089-580876B248C5}">
|
||||
<Class name="AZStd::shared_ptr" field="value1" type="{FBE2C86C-C034-57E1-A1A3-9066B3F60C0E}">
|
||||
<Class name="ColliderConfiguration" field="element" version="4" type="{16206828-F867-4DA9-9E4E-549B7B2C6174}">
|
||||
<Class name="CollisionLayer" field="CollisionLayer" version="1" type="{5AA459C8-2D92-46D2-9154-ED49EE4FE70E}">
|
||||
<Class name="unsigned char" field="Index" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
</Class>
|
||||
<Class name="Id" field="CollisionGroupId" version="1" type="{DFED4FE5-2292-4F07-A318-41C68DAEFE9C}">
|
||||
<Class name="AZ::Uuid" field="GroupId" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
</Class>
|
||||
<Class name="bool" field="Visible" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Trigger" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Simulated" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="InSceneQueries" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="Exclusive" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="Vector3" field="Position" value="-0.0000002 0.0126462 -0.2410437" type="{8379EB7D-01FA-4538-B64B-A6543B4BE73D}"/>
|
||||
<Class name="Quaternion" field="Rotation" value="0.0000000 0.0000000 0.0000000 1.0000000" type="{73103120-3DD3-4873-BAB3-9713FA2804FB}"/>
|
||||
<Class name="MaterialSelection" field="MaterialSelection" version="2" type="{F571AFF4-C4BB-4590-A204-D11D9EEABBC4}">
|
||||
<Class name="Asset" field="Material" value="id={00000000-0000-0000-0000-000000000000}:0,type={9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F},hint={},loadBehavior=2" version="2" type="{77A19D40-8731-4D3C-9041-1B43047366A4}"/>
|
||||
<Class name="AZStd::vector" field="MaterialIds" type="{82111EAD-9C65-57F0-BA72-46D6D931B434}">
|
||||
<Class name="MaterialId" field="element" version="1" type="{744CCE6C-9F69-4E2F-B950-DAB8514F870B}">
|
||||
<Class name="AZ::Uuid" field="MaterialId" value="{00000000-0000-0000-0000-000000000000}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="unsigned char" field="propertyVisibilityFlags" value="248" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
<Class name="AZStd::string" field="ColliderTag" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="float" field="RestOffset" value="0.0000000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
<Class name="float" field="ContactOffset" value="0.0200000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="value2" type="{568500E4-F003-54B8-B728-711DB5DF0AE4}">
|
||||
<Class name="SphereShapeConfiguration" field="element" version="1" type="{0B9F3D2E-0780-4B0B-BFEE-B41C5FDE774A}">
|
||||
<Class name="ShapeConfiguration" field="BaseClass1" version="1" type="{1FD56C72-6055-4B35-9253-07D432B94E91}">
|
||||
<Class name="Vector3" field="Scale" value="1.0000000 1.0000000 1.0000000" type="{8379EB7D-01FA-4538-B64B-A6543B4BE73D}"/>
|
||||
</Class>
|
||||
<Class name="float" field="Radius" value="0.2487596" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="CharacterColliderConfiguration" field="simulatedObjectColliderConfig" version="1" type="{4DFF1434-DF5B-4ED5-BE0F-D3E66F9B331A}">
|
||||
<Class name="AZStd::vector" field="nodes" type="{70C9FE19-65A8-5FA9-A447-7561B0C9FA9A}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="AZStd::shared_ptr" field="element" type="{0BB4AFBA-F087-55C7-95DF-01D71F6CB052}">
|
||||
<Class name="MaterialRule" field="element" version="2" type="{35620013-A27C-4F6D-87BF-72F11688ACAD}">
|
||||
<Class name="IMaterialRule" field="BaseClass1" version="1" type="{428C9752-6EDF-4FA2-9BDF-DBDFCEB4CC0F}">
|
||||
<Class name="IRule" field="BaseClass1" version="1" type="{81267F8B-3963-423B-9FF7-D276D82CD110}">
|
||||
<Class name="IManifestObject" field="BaseClass1" type="{3B839407-1884-4FF4-ABEA-CA9D347E83F7}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
<Class name="bool" field="updateMaterials" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
<Class name="bool" field="removeMaterials" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</ObjectStream>
|
||||
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"$type": "ActorGroup",
|
||||
"name": "chicken",
|
||||
"id": "{C086F309-EE7E-5AFD-A9C2-69DE5BA48461}",
|
||||
"rules": {
|
||||
"rules": [
|
||||
{
|
||||
"$type": "MetaDataRule",
|
||||
"metaData": "AdjustActor -actorID $(ACTORID) -name \"chicken\"\nActorSetCollisionMeshes -actorID $(ACTORID) -lod 0 -nodeList \"\"\nAdjustActor -actorID $(ACTORID) -nodesExcludedFromBounds \"\" -nodeAction \"select\"\nAdjustActor -actorID $(ACTORID) -nodeAction \"replace\" -attachmentNodes \"\"\nAdjustActor -actorID $(ACTORID) -mirrorSetup \"\"\n"
|
||||
},
|
||||
{
|
||||
"$type": "ActorPhysicsSetupRule",
|
||||
"data": {
|
||||
"config": {
|
||||
"clothConfig": {
|
||||
"nodes": [
|
||||
{
|
||||
"name": "def_c_head_joint",
|
||||
"shapes": [
|
||||
[
|
||||
{
|
||||
"Visible": true,
|
||||
"Position": [
|
||||
-0.08505599945783615,
|
||||
0.0,
|
||||
0.009370899759232998
|
||||
],
|
||||
"Rotation": [
|
||||
0.7071437239646912,
|
||||
0.0,
|
||||
0.0,
|
||||
0.708984375
|
||||
],
|
||||
"propertyVisibilityFlags": 248
|
||||
},
|
||||
{
|
||||
"$type": "CapsuleShapeConfiguration",
|
||||
"Height": 0.191273495554924,
|
||||
"Radius": 0.05063670128583908
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "def_c_neck_joint",
|
||||
"shapes": [
|
||||
[
|
||||
{
|
||||
"Visible": true,
|
||||
"Position": [
|
||||
0.08189810067415238,
|
||||
-2.4586914726398847e-9,
|
||||
-0.4713243842124939
|
||||
],
|
||||
"propertyVisibilityFlags": 248
|
||||
},
|
||||
{
|
||||
"$type": "SphereShapeConfiguration",
|
||||
"Radius": 0.2406993955373764
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "def_c_spine_end",
|
||||
"shapes": [
|
||||
[
|
||||
{
|
||||
"Visible": true,
|
||||
"Position": [
|
||||
-2.0000000233721949e-7,
|
||||
0.012646200135350228,
|
||||
-0.24104370176792146
|
||||
],
|
||||
"propertyVisibilityFlags": 248
|
||||
},
|
||||
{
|
||||
"$type": "SphereShapeConfiguration",
|
||||
"Radius": 0.24875959753990174
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "def_c_feather2_joint",
|
||||
"shapes": [
|
||||
[
|
||||
{
|
||||
"Visible": true,
|
||||
"Position": [
|
||||
0.06151500344276428,
|
||||
0.1300000101327896,
|
||||
7.729977369308472e-8
|
||||
],
|
||||
"Rotation": [
|
||||
0.0,
|
||||
0.7071062922477722,
|
||||
0.0,
|
||||
0.7071072459220886
|
||||
],
|
||||
"propertyVisibilityFlags": 248
|
||||
},
|
||||
{
|
||||
"$type": "CapsuleShapeConfiguration",
|
||||
"Height": 0.5730299949645996,
|
||||
"Radius": 0.06151498109102249
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$type": "{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup",
|
||||
"name": "chicken",
|
||||
"nodeSelectionList": {
|
||||
"selectedNodes": [
|
||||
"RootNode",
|
||||
"RootNode.chicken_skeleton",
|
||||
"RootNode.chicken_feet_skin",
|
||||
"RootNode.chicken_eyes_skin",
|
||||
"RootNode.chicken_body_skin",
|
||||
"RootNode.chicken_mohawk",
|
||||
"RootNode.chicken_skeleton.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint",
|
||||
"RootNode.chicken_feet_skin.SkinWeight_0",
|
||||
"RootNode.chicken_feet_skin.map1",
|
||||
"RootNode.chicken_feet_skin.chicken_body_mat",
|
||||
"RootNode.chicken_eyes_skin.SkinWeight_0",
|
||||
"RootNode.chicken_eyes_skin.uvSet1",
|
||||
"RootNode.chicken_eyes_skin.chicken_eye_mat",
|
||||
"RootNode.chicken_body_skin.SkinWeight_0",
|
||||
"RootNode.chicken_body_skin.map1",
|
||||
"RootNode.chicken_body_skin.chicken_body_mat",
|
||||
"RootNode.chicken_mohawk.SkinWeight_0",
|
||||
"RootNode.chicken_mohawk.colorSet1",
|
||||
"RootNode.chicken_mohawk.map1",
|
||||
"RootNode.chicken_mohawk.mohawkMat",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.def_l_ball_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.def_r_ball_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.def_c_tail2_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.def_l_wing_end",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.def_r_wing_end",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.def_l_ball_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.def_r_ball_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.def_c_tail2_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.def_l_wing_end.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.def_r_wing_end.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.def_c_mouth_end",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.def_c_mouth_end.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.def_c_waddle_end",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.def_c_feather_end",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.def_c_waddle_end.transform",
|
||||
"RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.def_c_feather_end.transform"
|
||||
]
|
||||
},
|
||||
"rules": {
|
||||
"rules": [
|
||||
{
|
||||
"$type": "SkinRule"
|
||||
},
|
||||
{
|
||||
"$type": "StaticMeshAdvancedRule",
|
||||
"vertexColorStreamName": "Disabled"
|
||||
},
|
||||
{
|
||||
"$type": "MaterialRule"
|
||||
},
|
||||
{
|
||||
"$type": "ClothRule",
|
||||
"meshNodeName": "RootNode.chicken_mohawk",
|
||||
"inverseMassesStreamName": "colorSet1",
|
||||
"motionConstraintsStreamName": "Default: 1.0",
|
||||
"backstopStreamName": "None"
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": "{55E26F74-B35F-4BC1-87BB-83E3DE85C346}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -30,8 +30,12 @@ ly_add_target(
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
3rdParty::NvCloth
|
||||
Gem::LmbrCentral
|
||||
Gem::AtomLyIntegration_CommonFeatures.Static
|
||||
# CryCommon required for 'gEnv->IsDedicated()'.
|
||||
# Because of this the module will need CrySystemEventBus to initialize gEnv
|
||||
# and tests targets will need to fake gEnv. To be removed when there is
|
||||
# an AZ replacement for asking if the game is running on a server or not.
|
||||
Legacy::CryCommon
|
||||
Gem::AtomLyIntegration_CommonFeatures.Public
|
||||
PRIVATE
|
||||
Gem::EMotionFXStaticLib
|
||||
)
|
||||
@@ -50,10 +54,9 @@ ly_add_target(
|
||||
PUBLIC
|
||||
AZ::AzCore
|
||||
PRIVATE
|
||||
Legacy::CryCommon
|
||||
Gem::NvCloth.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral
|
||||
Gem::AtomLyIntegration_CommonFeatures
|
||||
)
|
||||
|
||||
if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
@@ -76,8 +79,6 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Gem::NvCloth.Static
|
||||
AZ::AzToolsFramework
|
||||
AZ::SceneCore
|
||||
PRIVATE
|
||||
Gem::EMotionFXStaticLib
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -95,10 +96,9 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
NVCLOTH_EDITOR
|
||||
BUILD_DEPENDENCIES
|
||||
PRIVATE
|
||||
Legacy::CryCommon
|
||||
Gem::NvCloth.Editor.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral.Editor
|
||||
Gem::AtomLyIntegration_CommonFeatures.Editor
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -118,7 +118,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
Source
|
||||
BUILD_DEPENDENCIES
|
||||
PRIVATE
|
||||
Legacy::CryCommon
|
||||
AZ::AzTestShared
|
||||
AZ::AzTest
|
||||
Gem::NvCloth.Static
|
||||
@@ -126,7 +125,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
Gem::EMotionFX.Tests.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::EMotionFX
|
||||
Gem::LmbrCentral
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::NvCloth.Tests
|
||||
@@ -148,7 +146,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
NVCLOTH_EDITOR
|
||||
BUILD_DEPENDENCIES
|
||||
PRIVATE
|
||||
Legacy::CryCommon
|
||||
AZ::AzTestShared
|
||||
AZ::AzTest
|
||||
AZ::AzToolsFrameworkTestCommon
|
||||
@@ -157,7 +154,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
Gem::EMotionFX.Tests.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::EMotionFX.Editor
|
||||
Gem::LmbrCentral.Editor
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::NvCloth.Editor.Tests
|
||||
|
||||
@@ -448,9 +448,18 @@ namespace NvCloth
|
||||
const auto& renderTangents = renderData.m_tangents;
|
||||
const auto& renderBitangents = renderData.m_bitangents;
|
||||
|
||||
AZ::Data::Asset<AZ::RPI::ModelAsset> modelAsset;
|
||||
AZ::Render::MeshComponentRequestBus::EventResult(
|
||||
modelAsset, m_entityId, &AZ::Render::MeshComponentRequestBus::Events::GetModelAsset);
|
||||
// Since Atom has a 1:1 relation with between ModelAsset buffers and Model buffers,
|
||||
// internally it created a new asset for the model instance. So it's important to
|
||||
// get the asset from the model when we want to write to them, instead of getting the
|
||||
// ModelAsset directly from the bus (which returns the original asset shared by all entities).
|
||||
AZ::Data::Instance<AZ::RPI::Model> model;
|
||||
AZ::Render::MeshComponentRequestBus::EventResult(model, m_entityId, &AZ::Render::MeshComponentRequestBus::Events::GetModel);
|
||||
if (!model)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AZ::Data::Asset<AZ::RPI::ModelAsset> modelAsset = model->GetModelAsset();
|
||||
if (!modelAsset.IsReady())
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
|
||||
#include <AzFramework/Viewport/ViewportColors.h>
|
||||
#include <LmbrCentral/Geometry/GeometrySystemComponentBus.h>
|
||||
|
||||
#include <Components/ClothComponentMesh/ClothDebugDisplay.h>
|
||||
#include <Components/ClothComponentMesh/ActorClothColliders.h>
|
||||
@@ -285,29 +284,11 @@ namespace NvCloth
|
||||
AzFramework::DebugDisplayRequests& debugDisplay,
|
||||
float radius, float height,
|
||||
const AZ::Transform& transform,
|
||||
const AZ::Color& color)
|
||||
[[maybe_unused]] const AZ::Color& color)
|
||||
{
|
||||
debugDisplay.PushMatrix(transform);
|
||||
const float heightStraightSection = AZStd::max(AZ::Constants::FloatEpsilon, height - 2.0f * radius);
|
||||
|
||||
AZStd::vector<AZ::Vector3> capsuleVertexBuffer;
|
||||
AZStd::vector<AZ::u32> capsuleIndexBuffer;
|
||||
AZStd::vector<AZ::Vector3> capsuleLineBuffer;
|
||||
const AZ::u32 sides = 16;
|
||||
const AZ::u32 capSegments = 8;
|
||||
|
||||
LmbrCentral::CapsuleGeometrySystemRequestBus::Broadcast(
|
||||
&LmbrCentral::CapsuleGeometrySystemRequestBus::Events::GenerateCapsuleMesh,
|
||||
radius,
|
||||
height,
|
||||
sides, capSegments,
|
||||
capsuleVertexBuffer,
|
||||
capsuleIndexBuffer,
|
||||
capsuleLineBuffer
|
||||
);
|
||||
|
||||
debugDisplay.DrawTrianglesIndexed(capsuleVertexBuffer, capsuleIndexBuffer, color);
|
||||
debugDisplay.DrawLines(capsuleLineBuffer, AzFramework::ViewportColors::WireColor);
|
||||
|
||||
debugDisplay.PopMatrix();
|
||||
debugDisplay.SetColor(AzFramework::ViewportColors::WireColor);
|
||||
debugDisplay.DrawWireCapsule(transform.GetTranslation(), transform.GetBasisZ(), radius, heightStraightSection);
|
||||
}
|
||||
} // namespace NvCloth
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <Editor/EditorSystemComponent.h>
|
||||
#include <Components/EditorClothComponent.h>
|
||||
#include <Pipeline/SceneAPIExt/ClothRuleBehavior.h>
|
||||
#include <Pipeline/RCExt/CgfClothExporter.h>
|
||||
#endif //NVCLOTH_EDITOR
|
||||
|
||||
namespace NvCloth
|
||||
@@ -59,7 +58,6 @@ namespace NvCloth
|
||||
EditorSystemComponent::CreateDescriptor(),
|
||||
EditorClothComponent::CreateDescriptor(),
|
||||
Pipeline::ClothRuleBehavior::CreateDescriptor(),
|
||||
Pipeline::CgfClothExporter::CreateDescriptor(),
|
||||
#endif //NVCLOTH_EDITOR
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,120 +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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzToolsFramework/Debug/TraceContext.h>
|
||||
|
||||
#include <Cry_Geo.h> // Needed for CGFContent.h
|
||||
#include <CGFContent.h>
|
||||
#include <AzCore/Math/MathUtils.h>
|
||||
#include <AzCore/Math/Color.h>
|
||||
|
||||
#include <SceneAPI/SceneCore/Containers/Scene.h>
|
||||
#include <SceneAPI/SceneCore/Utilities/Reporting.h>
|
||||
#include <SceneAPI/SceneCore/DataTypes/GraphData/IMeshVertexColorData.h>
|
||||
#include <SceneAPI/SceneCore/DataTypes/Rules/IClothRule.h>
|
||||
|
||||
#include <RC/ResourceCompilerScene/Common/CommonExportContexts.h>
|
||||
|
||||
#include <Pipeline/RCExt/CgfClothExporter.h>
|
||||
|
||||
namespace NvCloth
|
||||
{
|
||||
namespace Pipeline
|
||||
{
|
||||
namespace
|
||||
{
|
||||
// Index for the Vertex color stream that contains the cloth inverse masses.
|
||||
const int ClothVertexBufferStreamIndex = 1;
|
||||
}
|
||||
|
||||
CgfClothExporter::CgfClothExporter()
|
||||
{
|
||||
// Binding the processing functions so when exporters call
|
||||
// SceneAPI::Events::Process<Context>() these functions will
|
||||
// get called if their Context was used.
|
||||
BindToCall(&CgfClothExporter::ProcessMeshNodeContext);
|
||||
BindToCall(&CgfClothExporter::ProcessContainerContext);
|
||||
}
|
||||
|
||||
void CgfClothExporter::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context);
|
||||
if (serializeContext)
|
||||
{
|
||||
serializeContext->Class<CgfClothExporter, AZ::SceneAPI::SceneCore::RCExportingComponent>()->Version(1);
|
||||
}
|
||||
}
|
||||
|
||||
AZ::SceneAPI::Events::ProcessingResult CgfClothExporter::ProcessContainerContext(AZ::RC::ContainerExportContext& context) const
|
||||
{
|
||||
if (!context.m_group.GetRuleContainerConst().ContainsRuleOfType<AZ::SceneAPI::DataTypes::IClothRule>())
|
||||
{
|
||||
return AZ::SceneAPI::Events::ProcessingResult::Ignored;
|
||||
}
|
||||
|
||||
if (context.m_phase == AZ::RC::Phase::Finalizing)
|
||||
{
|
||||
if (context.m_container.GetExportInfo()->bMergeAllNodes)
|
||||
{
|
||||
AZ_TracePrintf(AZ::SceneAPI::Utilities::ErrorWindow,
|
||||
"Mesh group '%s' has cloth rules and trying to merge all nodes.",
|
||||
context.m_group.GetName().c_str());
|
||||
return AZ::SceneAPI::Events::ProcessingResult::Failure;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the current mesh group contains a cloth rule it should not merge all the nodes.
|
||||
context.m_container.GetExportInfo()->bMergeAllNodes = false;
|
||||
}
|
||||
|
||||
return AZ::SceneAPI::Events::ProcessingResult::Success;
|
||||
}
|
||||
|
||||
AZ::SceneAPI::Events::ProcessingResult CgfClothExporter::ProcessMeshNodeContext(AZ::RC::MeshNodeExportContext& context) const
|
||||
{
|
||||
if (context.m_phase != AZ::RC::Phase::Filling)
|
||||
{
|
||||
return AZ::SceneAPI::Events::ProcessingResult::Ignored;
|
||||
}
|
||||
|
||||
AZStd::vector<AZ::Color> clothData =
|
||||
AZ::SceneAPI::DataTypes::IClothRule::FindClothData(
|
||||
context.m_scene.GetGraph(),
|
||||
context.m_nodeIndex,
|
||||
static_cast<size_t>(context.m_mesh.GetVertexCount()),
|
||||
context.m_group.GetRuleContainerConst());
|
||||
|
||||
if (!clothData.empty())
|
||||
{
|
||||
const int numVertices = context.m_mesh.GetVertexCount();
|
||||
|
||||
// Allocate and get the vertex color stream for cloth
|
||||
context.m_mesh.ReallocStream(CMesh::COLORS, ClothVertexBufferStreamIndex, numVertices);
|
||||
auto meshColorStream = context.m_mesh.GetStreamPtr<SMeshColor>(CMesh::COLORS, ClothVertexBufferStreamIndex);
|
||||
AZ_Assert(meshColorStream, "Mesh color stream is invalid");
|
||||
|
||||
for (int i = 0; i < numVertices; ++i)
|
||||
{
|
||||
const auto& clothVertexData = clothData[i];
|
||||
meshColorStream[i] = SMeshColor(
|
||||
clothVertexData.GetR8(),
|
||||
clothVertexData.GetG8(),
|
||||
clothVertexData.GetB8(),
|
||||
clothVertexData.GetA8());
|
||||
}
|
||||
}
|
||||
|
||||
return AZ::SceneAPI::Events::ProcessingResult::Success;
|
||||
}
|
||||
} // namespace Pipeline
|
||||
} // namespace NvCloth
|
||||
@@ -1,50 +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.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <SceneAPI/SceneCore/Components/RCExportingComponent.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
namespace RC
|
||||
{
|
||||
struct MeshNodeExportContext;
|
||||
struct ContainerExportContext;
|
||||
}
|
||||
}
|
||||
|
||||
namespace NvCloth
|
||||
{
|
||||
namespace Pipeline
|
||||
{
|
||||
//! This class processes the Scene graph to export cloth data into CGF.
|
||||
class CgfClothExporter
|
||||
: public AZ::SceneAPI::SceneCore::RCExportingComponent
|
||||
{
|
||||
public:
|
||||
AZ_COMPONENT(CgfClothExporter, "{3D7287BB-1109-4220-AC44-AEBA59E03FFF}", AZ::SceneAPI::SceneCore::RCExportingComponent);
|
||||
|
||||
CgfClothExporter();
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
//! Process call at CGF Container level.
|
||||
//! This function gets called once per Mesh Group from CGF Group Exporter when it's processing meshes.
|
||||
AZ::SceneAPI::Events::ProcessingResult ProcessContainerContext(AZ::RC::ContainerExportContext& context) const;
|
||||
|
||||
//! Process call at Mesh Node level.
|
||||
//! This function gets called once per Mesh Node inside a Mesh Group from CGF Group Exporter when it's processing meshes.
|
||||
AZ::SceneAPI::Events::ProcessingResult ProcessMeshNodeContext(AZ::RC::MeshNodeExportContext& context) const;
|
||||
};
|
||||
} // namespace Pipeline
|
||||
} // namespace NvCloth
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <SceneAPI/SceneCore/Containers/Utilities/Filters.h>
|
||||
|
||||
#include <SceneAPI/SceneCore/DataTypes/Groups/IMeshGroup.h>
|
||||
#include <EMotionFX/Pipeline/SceneAPIExt/Groups/IActorGroup.h>
|
||||
|
||||
#include <Pipeline/SceneAPIExt/ClothRuleBehavior.h>
|
||||
#include <Pipeline/SceneAPIExt/ClothRule.h>
|
||||
@@ -100,9 +99,8 @@ namespace NvCloth
|
||||
|
||||
bool ClothRuleBehavior::IsValidGroupType(const AZ::SceneAPI::DataTypes::ISceneNodeGroup& group) const
|
||||
{
|
||||
// Cloth rules are available in Mesh and Actor Groups
|
||||
return group.RTTI_IsTypeOf(AZ::SceneAPI::DataTypes::IMeshGroup::TYPEINFO_Uuid())
|
||||
|| group.RTTI_IsTypeOf(EMotionFX::Pipeline::Group::IActorGroup::TYPEINFO_Uuid());
|
||||
// Cloth rules are available in Mesh Groups
|
||||
return group.RTTI_IsTypeOf(AZ::SceneAPI::DataTypes::IMeshGroup::TYPEINFO_Uuid());
|
||||
}
|
||||
|
||||
bool ClothRuleBehavior::UpdateClothRules(AZ::SceneAPI::Containers::Scene& scene)
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ISystem.h>
|
||||
#include <IConsole.h>
|
||||
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
|
||||
@@ -1,229 +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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Integration/ActorComponentBus.h>
|
||||
|
||||
// Needed to access the Mesh information inside Actor.
|
||||
#include <EMotionFX/Source/Node.h>
|
||||
#include <EMotionFX/Source/Mesh.h>
|
||||
#include <EMotionFX/Source/SubMesh.h>
|
||||
#include <EMotionFX/Source/ActorInstance.h>
|
||||
|
||||
#include <Utils/ActorAssetHelper.h>
|
||||
|
||||
namespace NvCloth
|
||||
{
|
||||
ActorAssetHelper::ActorAssetHelper(AZ::EntityId entityId)
|
||||
: AssetHelper(entityId)
|
||||
{
|
||||
}
|
||||
|
||||
void ActorAssetHelper::GatherClothMeshNodes(MeshNodeList& meshNodes)
|
||||
{
|
||||
EMotionFX::ActorInstance* actorInstance = nullptr;
|
||||
EMotionFX::Integration::ActorComponentRequestBus::EventResult(
|
||||
actorInstance, m_entityId, &EMotionFX::Integration::ActorComponentRequestBus::Events::GetActorInstance);
|
||||
if (!actorInstance)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const EMotionFX::Actor* actor = actorInstance->GetActor();
|
||||
if (!actor)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const uint32 numNodes = actor->GetNumNodes();
|
||||
const uint32 numLODs = actor->GetNumLODLevels();
|
||||
|
||||
for (uint32 lodLevel = 0; lodLevel < numLODs; ++lodLevel)
|
||||
{
|
||||
for (uint32 nodeIndex = 0; nodeIndex < numNodes; ++nodeIndex)
|
||||
{
|
||||
const EMotionFX::Mesh* mesh = actor->GetMesh(lodLevel, nodeIndex);
|
||||
if (!mesh)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const bool hasClothData = (mesh->FindOriginalVertexData(EMotionFX::Mesh::ATTRIB_CLOTH_DATA) != nullptr);
|
||||
if (hasClothData)
|
||||
{
|
||||
const EMotionFX::Node* node = actor->GetSkeleton()->GetNode(nodeIndex);
|
||||
AZ_Assert(node, "Invalid node %u in actor '%s'", nodeIndex, actor->GetFileNameString().c_str());
|
||||
meshNodes.push_back(node->GetNameString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ActorAssetHelper::ObtainClothMeshNodeInfo(
|
||||
const AZStd::string& meshNode,
|
||||
MeshNodeInfo& meshNodeInfo,
|
||||
MeshClothInfo& meshClothInfo)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Cloth);
|
||||
|
||||
EMotionFX::ActorInstance* actorInstance = nullptr;
|
||||
EMotionFX::Integration::ActorComponentRequestBus::EventResult(
|
||||
actorInstance, m_entityId, &EMotionFX::Integration::ActorComponentRequestBus::Events::GetActorInstance);
|
||||
if (!actorInstance)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const EMotionFX::Actor* actor = actorInstance->GetActor();
|
||||
if (!actor)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const uint32 numNodes = actor->GetNumNodes();
|
||||
const uint32 numLODs = actor->GetNumLODLevels();
|
||||
|
||||
const EMotionFX::Mesh* emfxMesh = nullptr;
|
||||
uint32 meshFirstPrimitiveIndex = 0;
|
||||
|
||||
// Find the render data of the mesh node
|
||||
for (uint32 lodLevel = 0; lodLevel < numLODs; ++lodLevel)
|
||||
{
|
||||
meshFirstPrimitiveIndex = 0;
|
||||
|
||||
for (uint32 nodeIndex = 0; nodeIndex < numNodes; ++nodeIndex)
|
||||
{
|
||||
const EMotionFX::Mesh* mesh = actor->GetMesh(lodLevel, nodeIndex);
|
||||
if (!mesh || mesh->GetIsCollisionMesh())
|
||||
{
|
||||
// Skip invalid and collision meshes.
|
||||
continue;
|
||||
}
|
||||
|
||||
const EMotionFX::Node* node = actor->GetSkeleton()->GetNode(nodeIndex);
|
||||
if (meshNode != node->GetNameString())
|
||||
{
|
||||
// Skip. Increase the index of all primitives of the mesh we're skipping.
|
||||
meshFirstPrimitiveIndex += mesh->GetNumSubMeshes();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Mesh found, save the lod in mesh info
|
||||
meshNodeInfo.m_lodLevel = lodLevel;
|
||||
emfxMesh = mesh;
|
||||
break;
|
||||
}
|
||||
|
||||
if (emfxMesh)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool infoObtained = false;
|
||||
|
||||
if (emfxMesh)
|
||||
{
|
||||
bool dataCopied = CopyDataFromEMotionFXMesh(*emfxMesh, meshClothInfo);
|
||||
|
||||
if (dataCopied)
|
||||
{
|
||||
const uint32 numSubMeshes = emfxMesh->GetNumSubMeshes();
|
||||
for (uint32 subMeshIndex = 0; subMeshIndex < numSubMeshes; ++subMeshIndex)
|
||||
{
|
||||
const EMotionFX::SubMesh* emfxSubMesh = emfxMesh->GetSubMesh(subMeshIndex);
|
||||
|
||||
MeshNodeInfo::SubMesh subMesh;
|
||||
subMesh.m_primitiveIndex = static_cast<int>(meshFirstPrimitiveIndex + subMeshIndex);
|
||||
subMesh.m_verticesFirstIndex = emfxSubMesh->GetStartVertex();
|
||||
subMesh.m_numVertices = emfxSubMesh->GetNumVertices();
|
||||
subMesh.m_indicesFirstIndex = emfxSubMesh->GetStartIndex();
|
||||
subMesh.m_numIndices = emfxSubMesh->GetNumIndices();
|
||||
|
||||
meshNodeInfo.m_subMeshes.push_back(subMesh);
|
||||
}
|
||||
|
||||
infoObtained = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ_Error("ActorAssetHelper", false, "Failed to extract data from node %s in actor %s",
|
||||
meshNode.c_str(), actor->GetFileNameString().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
return infoObtained;
|
||||
}
|
||||
|
||||
bool ActorAssetHelper::CopyDataFromEMotionFXMesh(
|
||||
const EMotionFX::Mesh& emfxMesh,
|
||||
MeshClothInfo& meshClothInfo)
|
||||
{
|
||||
const int numVertices = emfxMesh.GetNumVertices();
|
||||
const int numIndices = emfxMesh.GetNumIndices();
|
||||
if (numVertices == 0 || numIndices == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const uint32* sourceIndices = emfxMesh.GetIndices();
|
||||
const AZ::Vector3* sourcePositions = static_cast<AZ::Vector3*>(emfxMesh.FindOriginalVertexData(EMotionFX::Mesh::ATTRIB_POSITIONS));
|
||||
const AZ::u32* sourceClothData = static_cast<AZ::u32*>(emfxMesh.FindOriginalVertexData(EMotionFX::Mesh::ATTRIB_CLOTH_DATA));
|
||||
const AZ::Vector2* sourceUVs = static_cast<AZ::Vector2*>(emfxMesh.FindOriginalVertexData(EMotionFX::Mesh::ATTRIB_UVCOORDS, 0)); // first UV set
|
||||
|
||||
if (!sourceIndices || !sourcePositions || !sourceClothData)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const SimUVType uvZero(0.0f, 0.0f);
|
||||
|
||||
meshClothInfo.m_particles.resize_no_construct(numVertices);
|
||||
meshClothInfo.m_uvs.resize_no_construct(numVertices);
|
||||
meshClothInfo.m_motionConstraints.resize_no_construct(numVertices);
|
||||
meshClothInfo.m_backstopData.resize_no_construct(numVertices);
|
||||
for (int index = 0; index < numVertices; ++index)
|
||||
{
|
||||
AZ::Color clothVertexData;
|
||||
clothVertexData.FromU32(sourceClothData[index]);
|
||||
|
||||
const float inverseMass = clothVertexData.GetR();
|
||||
const float motionConstraint = clothVertexData.GetG();
|
||||
const float backstopRadius = clothVertexData.GetA();
|
||||
const float backstopOffset = ConvertBackstopOffset(clothVertexData.GetB());
|
||||
|
||||
meshClothInfo.m_particles[index].Set(
|
||||
sourcePositions[index],
|
||||
inverseMass);
|
||||
|
||||
meshClothInfo.m_motionConstraints[index] = motionConstraint;
|
||||
meshClothInfo.m_backstopData[index].Set(backstopOffset, backstopRadius);
|
||||
|
||||
meshClothInfo.m_uvs[index] = (sourceUVs) ? SimUVType(sourceUVs[index].GetX(), sourceUVs[index].GetY()) : uvZero;
|
||||
}
|
||||
|
||||
meshClothInfo.m_indices.resize_no_construct(numIndices);
|
||||
// Fast copy when SimIndexType is the same size as the EMFX indices type.
|
||||
if constexpr (sizeof(SimIndexType) == sizeof(uint32))
|
||||
{
|
||||
memcpy(meshClothInfo.m_indices.data(), sourceIndices, numIndices * sizeof(SimIndexType));
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int index = 0; index < numIndices; ++index)
|
||||
{
|
||||
meshClothInfo.m_indices[index] = static_cast<SimIndexType>(sourceIndices[index]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace NvCloth
|
||||
@@ -1,49 +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.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Utils/AssetHelper.h>
|
||||
|
||||
namespace EMotionFX
|
||||
{
|
||||
class Mesh;
|
||||
}
|
||||
|
||||
namespace NvCloth
|
||||
{
|
||||
//! Helper class to obtain cloth information from an Actor Asset.
|
||||
class ActorAssetHelper
|
||||
: public AssetHelper
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(ActorAssetHelper, "{3246EAC6-595F-4AFB-BA10-44EB0B824398}", AssetHelper);
|
||||
|
||||
explicit ActorAssetHelper(AZ::EntityId entityId);
|
||||
|
||||
// AssetHelper overrides ...
|
||||
void GatherClothMeshNodes(MeshNodeList& meshNodes) override;
|
||||
bool ObtainClothMeshNodeInfo(
|
||||
const AZStd::string& meshNode,
|
||||
MeshNodeInfo& meshNodeInfo,
|
||||
MeshClothInfo& meshClothInfo) override;
|
||||
bool DoesSupportSkinnedAnimation() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
bool CopyDataFromEMotionFXMesh(
|
||||
const EMotionFX::Mesh& emfxMesh,
|
||||
MeshClothInfo& meshClothInfo);
|
||||
};
|
||||
} // namespace NvCloth
|
||||
@@ -13,11 +13,6 @@
|
||||
#include <Utils/AssetHelper.h>
|
||||
|
||||
#include <Utils/MeshAssetHelper.h>
|
||||
#include <Utils/ActorAssetHelper.h>
|
||||
|
||||
#include <AtomLyIntegration/CommonFeatures/Mesh/MeshComponentBus.h>
|
||||
|
||||
#include <Integration/ActorComponentBus.h>
|
||||
|
||||
namespace NvCloth
|
||||
{
|
||||
@@ -30,25 +25,9 @@ namespace NvCloth
|
||||
|
||||
AZStd::unique_ptr<AssetHelper> AssetHelper::CreateAssetHelper(AZ::EntityId entityId)
|
||||
{
|
||||
// Does the entity have an Actor Asset?
|
||||
EMotionFX::ActorInstance* actorInstance = nullptr;
|
||||
EMotionFX::Integration::ActorComponentRequestBus::EventResult(
|
||||
actorInstance, entityId, &EMotionFX::Integration::ActorComponentRequestBus::Events::GetActorInstance);
|
||||
if (actorInstance)
|
||||
{
|
||||
return AZStd::make_unique<ActorAssetHelper>(entityId);
|
||||
}
|
||||
|
||||
AZ::Data::Asset<AZ::RPI::ModelAsset> modelAsset;
|
||||
AZ::Render::MeshComponentRequestBus::EventResult(
|
||||
modelAsset, entityId, &AZ::Render::MeshComponentRequestBus::Events::GetModelAsset);
|
||||
if (modelAsset.GetId().IsValid())
|
||||
{
|
||||
return AZStd::make_unique<MeshAssetHelper>(entityId);
|
||||
}
|
||||
|
||||
AZ_Warning("AssetHelper", false, "Unexpected asset type");
|
||||
return nullptr;
|
||||
return entityId.IsValid()
|
||||
? AZStd::make_unique<MeshAssetHelper>(entityId)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
float AssetHelper::ConvertBackstopOffset(float backstopOffset)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user