Open the EMFX editor even if no asset is specified

Signed-off-by: lsemp3d <58790905+lsemp3d@users.noreply.github.com>
This commit is contained in:
lsemp3d
2021-08-09 13:05:23 -07:00
parent f03df3e546
commit cb52418a92
@@ -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)
{