Merge pull request #2986 from aws-lumberyard-dev/emfx/open_editor

Open the EMFX editor even if no asset is specified
This commit is contained in:
Luis Sempé
2021-08-10 11:57:53 -07:00
committed by GitHub
@@ -117,16 +117,16 @@ namespace EMotionFX
void EditorAnimGraphComponent::LaunchAnimationEditor(const AZ::Data::AssetId& assetId, [[maybe_unused]] const AZ::Data::AssetType& assetType)
{
// call to open must be done before LoadCharacter
const char* panelName = EMStudio::MainWindow::GetEMotionFXPaneName();
EBUS_EVENT(AzToolsFramework::EditorRequests::Bus, OpenViewPane, panelName);
if (assetId.IsValid())
{
AZ::Data::AssetId actorAssetId;
actorAssetId.SetInvalid();
EditorActorComponentRequestBus::EventResult(actorAssetId, GetEntityId(), &EditorActorComponentRequestBus::Events::GetActorAssetId);
// call to open must be done before LoadCharacter
const char* panelName = EMStudio::MainWindow::GetEMotionFXPaneName();
EBUS_EVENT(AzToolsFramework::EditorRequests::Bus, OpenViewPane, panelName);
EMStudio::MainWindow* mainWindow = EMStudio::GetMainWindow();
if (mainWindow)
{