Browse Source

Fix for create new in thumbnail view

Signed-off-by: Daniel Tamkin <[email protected]>
Daniel Tamkin 2 years ago
parent
commit
e6db2384e3

+ 17 - 2
Code/Editor/AzAssetBrowser/AzAssetBrowserWindow.cpp

@@ -333,8 +333,23 @@ AzAssetBrowserWindow::AzAssetBrowserWindow(QWidget* parent)
     connect(m_ui->m_assetBrowserTreeViewWidget, &AzAssetBrowser::AssetBrowserTreeView::ClearTypeFilter,
     connect(m_ui->m_assetBrowserTreeViewWidget, &AzAssetBrowser::AssetBrowserTreeView::ClearTypeFilter,
         m_ui->m_searchWidget, &AzAssetBrowser::SearchWidget::ClearTypeFilter);
         m_ui->m_searchWidget, &AzAssetBrowser::SearchWidget::ClearTypeFilter);
 
 
-    connect(m_assetBrowserModel, &AzAssetBrowser::AssetBrowserModel::RequestOpenItemForEditing,
-        m_ui->m_assetBrowserTreeViewWidget, &AzAssetBrowser::AssetBrowserTreeView::OpenItemForEditing);
+    connect(
+        m_assetBrowserModel,
+        &AzAssetBrowser::AssetBrowserModel::RequestOpenItemForEditing,
+        this,
+        [this](const QModelIndex& index)
+        {
+            m_ui->m_assetBrowserTreeViewWidget->OpenItemForEditing(index);
+        });
+
+    connect(
+        m_assetBrowserModel,
+        &AzAssetBrowser::AssetBrowserModel::RequestThumbnailviewUpdate,
+        this,
+        [this]
+        {
+            m_ui->m_thumbnailView->UpdateThumbnailview();
+        });
 
 
     connect(this, &AzAssetBrowserWindow::SizeChangedSignal,
     connect(this, &AzAssetBrowserWindow::SizeChangedSignal,
         m_ui->m_assetBrowserTableViewWidget, &AzAssetBrowser::AssetBrowserTableView::UpdateSizeSlot);
         m_ui->m_assetBrowserTableViewWidget, &AzAssetBrowser::AssetBrowserTableView::UpdateSizeSlot);

+ 6 - 0
Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/AssetFolderThumbnailView.cpp

@@ -459,6 +459,12 @@ namespace AzQtComponents
         }
         }
     }
     }
 
 
+    void AssetFolderThumbnailView::RefreshRootIndex()
+    {
+        QAbstractItemView::setRootIndex(rootIndex());
+        emit rootIndexChanged(rootIndex());
+    }
+
     QModelIndex AssetFolderThumbnailView::moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
     QModelIndex AssetFolderThumbnailView::moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
     {
     {
         Q_UNUSED(modifiers);
         Q_UNUSED(modifiers);

+ 2 - 0
Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/AssetFolderThumbnailView.h

@@ -107,6 +107,8 @@ namespace AzQtComponents
 
 
         void setRootIndex(const QModelIndex &index) override;
         void setRootIndex(const QModelIndex &index) override;
 
 
+        void RefreshRootIndex();
+
         void SetShowSearchResultsMode(bool searchMode);
         void SetShowSearchResultsMode(bool searchMode);
 
 
         void HideProductAssets(bool checked);
         void HideProductAssets(bool checked);

+ 2 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserBus.h

@@ -362,7 +362,8 @@ namespace AzToolsFramework
             //! Notifies the handler that a new asset was created from the editor so they can handle renaming or other behavior as necessary.
             //! Notifies the handler that a new asset was created from the editor so they can handle renaming or other behavior as necessary.
             //! @param assetPath The full path to the asset that was created.
             //! @param assetPath The full path to the asset that was created.
             //! @param creatorBusId The file creator's bus handler address. A default constructed Crc32 implies no one is listening.
             //! @param creatorBusId The file creator's bus handler address. A default constructed Crc32 implies no one is listening.
-            virtual void HandleAssetCreatedInEditor(const AZStd::string_view /*assetPath*/, const AZ::Crc32& /*creatorBusId*/) {}
+            //! @param initialFilenameChange Notifies the handler that this file should give users the option to rename upon creation, set to false if you will use custom naming
+            virtual void HandleAssetCreatedInEditor(const AZStd::string_view /*assetPath*/, const AZ::Crc32& /*creatorBusId*/, const bool /*initialFilenameChange*/) {}
 
 
             //! Notifies a given handler that an asset which was recently created has been given a non-default name.
             //! Notifies a given handler that an asset which was recently created has been given a non-default name.
             //! @param assetPath The full path to the asset that had its initial name change.
             //! @param assetPath The full path to the asset that had its initial name change.

+ 2 - 2
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserComponent.cpp

@@ -272,14 +272,14 @@ namespace AzToolsFramework
             return SourceFileDetails();
             return SourceFileDetails();
         }
         }
 
 
-        void AssetBrowserComponent::HandleAssetCreatedInEditor(const AZStd::string_view assetPath, const AZ::Crc32& creatorBusId)
+        void AssetBrowserComponent::HandleAssetCreatedInEditor(const AZStd::string_view assetPath, const AZ::Crc32& creatorBusId, const bool initialFilenameChange)
         {
         {
             if (assetPath.empty())
             if (assetPath.empty())
             {
             {
                 return;
                 return;
             }
             }
 
 
-            m_assetBrowserModel->HandleAssetCreatedInEditor(assetPath, creatorBusId);
+            m_assetBrowserModel->HandleAssetCreatedInEditor(assetPath, creatorBusId, initialFilenameChange);
         }
         }
 
 
         void AssetBrowserComponent::AddFile(const AZ::s64& fileId) 
         void AssetBrowserComponent::AddFile(const AZ::s64& fileId) 

+ 1 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserComponent.h

@@ -139,7 +139,7 @@ namespace AzToolsFramework
 
 
             //////////////////////////////////////////////////////////////////////////
             //////////////////////////////////////////////////////////////////////////
             // AssetBrowserFileCreationNotificationBus
             // AssetBrowserFileCreationNotificationBus
-            void HandleAssetCreatedInEditor(const AZStd::string_view assetPath, const AZ::Crc32& creatorBusId /*= AZ::Crc32()*/) override;
+            void HandleAssetCreatedInEditor(const AZStd::string_view assetPath, const AZ::Crc32& creatorBusId /*= AZ::Crc32()*/, const bool initialFilenameChange) override;
             //////////////////////////////////////////////////////////////////////////
             //////////////////////////////////////////////////////////////////////////
         };
         };
     } // namespace AssetBrowser
     } // namespace AssetBrowser

+ 36 - 6
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserModel.cpp

@@ -440,7 +440,7 @@ namespace AzToolsFramework
                     }
                     }
                 }
                 }
 
 
-                if (!m_newlyCreatedAssetPathsToCreatorBusIds.empty())
+                if (!m_newlyCreatedAssetPathsToCreatorBusIds.empty() || !m_customNewlyCreatedAssetPathsToCreatorBusIds.empty())
                 {
                 {
                     // Gets the newest child with the assumption that BeginAddEntry still adds entries at GetChildCount
                     // Gets the newest child with the assumption that BeginAddEntry still adds entries at GetChildCount
                     AssetBrowserEntry* newestChildEntry = parent->GetChild(parent->GetChildCount() - 1);
                     AssetBrowserEntry* newestChildEntry = parent->GetChild(parent->GetChildCount() - 1);
@@ -469,16 +469,24 @@ namespace AzToolsFramework
             }
             }
         }
         }
 
 
-        void AssetBrowserModel::HandleAssetCreatedInEditor(const AZStd::string& assetPath, const AZ::Crc32& creatorBusId)
+        void AssetBrowserModel::HandleAssetCreatedInEditor(const AZStd::string& assetPath, const AZ::Crc32& creatorBusId, const bool initialFilenameChange)
         {
         {
-            QModelIndex index = findIndex(assetPath.c_str());
-            if (index.isValid())
+            if (initialFilenameChange)
             {
             {
-                emit RequestOpenItemForEditing(index);
+                QModelIndex index = findIndex(assetPath.c_str());
+                if (index.isValid())
+                {
+                    emit RequestOpenItemForEditing(index);
+                    emit RequestThumbnailviewUpdate();
+                }
+                else
+                {
+                    m_newlyCreatedAssetPathsToCreatorBusIds[AZ::IO::Path(assetPath).AsPosix()] = creatorBusId;
+                }
             }
             }
             else
             else
             {
             {
-                m_newlyCreatedAssetPathsToCreatorBusIds[AZ::IO::Path(assetPath).AsPosix()] = creatorBusId;
+                m_customNewlyCreatedAssetPathsToCreatorBusIds[AZ::IO::Path(assetPath).AsPosix()] = creatorBusId;
             }
             }
         }
         }
 
 
@@ -548,6 +556,28 @@ namespace AzToolsFramework
                         if (GetEntryIndex(entry, index))
                         if (GetEntryIndex(entry, index))
                         {
                         {
                             emit RequestOpenItemForEditing(index);
                             emit RequestOpenItemForEditing(index);
+                            emit RequestThumbnailviewUpdate();
+                        }
+                    });
+            }
+            else if (m_customNewlyCreatedAssetPathsToCreatorBusIds.contains(fullpath))
+            {
+                if (m_customNewlyCreatedAssetPathsToCreatorBusIds[fullpath] != AZ::Crc32())
+                {
+                    m_assetEntriesToCreatorBusIds[entry] = m_customNewlyCreatedAssetPathsToCreatorBusIds[fullpath];
+                }
+
+                m_customNewlyCreatedAssetPathsToCreatorBusIds.erase(fullpath);
+
+                QTimer::singleShot(
+                    0,
+                    this,
+                    [this, entry]()
+                    {
+                        QModelIndex index;
+                        if (GetEntryIndex(entry, index))
+                        {
+                            emit RequestThumbnailviewUpdate();
                         }
                         }
                     });
                     });
             }
             }

+ 4 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserModel.h

@@ -99,13 +99,15 @@ namespace AzToolsFramework
             static void SourceIndexesToAssetIds(const QModelIndexList& indexes, AZStd::vector<AZ::Data::AssetId>& assetIds);
             static void SourceIndexesToAssetIds(const QModelIndexList& indexes, AZStd::vector<AZ::Data::AssetId>& assetIds);
             static void SourceIndexesToAssetDatabaseEntries(const QModelIndexList& indexes, AZStd::vector<AssetBrowserEntry*>& entries);
             static void SourceIndexesToAssetDatabaseEntries(const QModelIndexList& indexes, AZStd::vector<AssetBrowserEntry*>& entries);
 
 
-            void HandleAssetCreatedInEditor(const AZStd::string& assetPath, const AZ::Crc32& creatorBusId = AZ::Crc32());
+            void HandleAssetCreatedInEditor(const AZStd::string& assetPath, const AZ::Crc32& creatorBusId = AZ::Crc32(), const bool initialFilenameChange = true);
 
 
             bool GetEntryIndex(AssetBrowserEntry* entry, QModelIndex& index) const;
             bool GetEntryIndex(AssetBrowserEntry* entry, QModelIndex& index) const;
 
 
         Q_SIGNALS:
         Q_SIGNALS:
             void RequestOpenItemForEditing(const QModelIndex& index);
             void RequestOpenItemForEditing(const QModelIndex& index);
 
 
+            void RequestThumbnailviewUpdate();
+
         private:
         private:
             //Non owning pointer
             //Non owning pointer
             AssetBrowserFilterModel* m_filterModel = nullptr;
             AssetBrowserFilterModel* m_filterModel = nullptr;
@@ -116,6 +118,7 @@ namespace AzToolsFramework
             bool m_isTickBusEnabled = false;
             bool m_isTickBusEnabled = false;
             AZStd::unordered_map<AssetBrowserEntry*, AZ::Crc32> m_assetEntriesToCreatorBusIds;
             AZStd::unordered_map<AssetBrowserEntry*, AZ::Crc32> m_assetEntriesToCreatorBusIds;
             AZStd::unordered_map<AZStd::string, AZ::Crc32> m_newlyCreatedAssetPathsToCreatorBusIds;
             AZStd::unordered_map<AZStd::string, AZ::Crc32> m_newlyCreatedAssetPathsToCreatorBusIds;
+            AZStd::unordered_map<AZStd::string, AZ::Crc32> m_customNewlyCreatedAssetPathsToCreatorBusIds;
 
 
             void WatchForExpectedAssets(AssetBrowserEntry* entry);
             void WatchForExpectedAssets(AssetBrowserEntry* entry);
         };
         };

+ 6 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserThumbnailView.cpp

@@ -78,6 +78,7 @@ namespace AzToolsFramework
                 m_thumbnailViewProxyModel,
                 m_thumbnailViewProxyModel,
                 &AssetBrowserThumbnailViewProxyModel::SetRootIndex);
                 &AssetBrowserThumbnailViewProxyModel::SetRootIndex);
 
 
+
             auto layout = new QVBoxLayout();
             auto layout = new QVBoxLayout();
             layout->addWidget(m_thumbnailViewWidget);
             layout->addWidget(m_thumbnailViewWidget);
             setLayout(layout);
             setLayout(layout);
@@ -179,6 +180,11 @@ namespace AzToolsFramework
             }
             }
         }
         }
 
 
+        void AssetBrowserThumbnailView::UpdateThumbnailview()
+        {
+            m_thumbnailViewWidget->RefreshRootIndex();
+        }
+
         void AssetBrowserThumbnailView::UpdateFilterInLocalFilterModel()
         void AssetBrowserThumbnailView::UpdateFilterInLocalFilterModel()
         {
         {
             if (!m_assetTreeView)
             if (!m_assetTreeView)

+ 2 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserThumbnailView.h

@@ -43,6 +43,8 @@ namespace AzToolsFramework
 
 
             void HideProductAssets(bool checked);
             void HideProductAssets(bool checked);
 
 
+            void UpdateThumbnailview();
+
             AzQtComponents::AssetFolderThumbnailView* GetThumbnailViewWidget() const;
             AzQtComponents::AssetFolderThumbnailView* GetThumbnailViewWidget() const;
 
 
             void setSelectionMode(QAbstractItemView::SelectionMode mode);
             void setSelectionMode(QAbstractItemView::SelectionMode mode);

+ 2 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp

@@ -898,7 +898,8 @@ namespace AzToolsFramework
                         AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
                         AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
                         &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
                         &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
                         path.c_str(),
                         path.c_str(),
-                        AZ::Crc32());
+                        AZ::Crc32(),
+                        true);
 
 
                     if (!AZ::IO::SystemFile::Exists(path.c_str()))
                     if (!AZ::IO::SystemFile::Exists(path.c_str()))
                     {
                     {

+ 4 - 2
Code/Framework/AzToolsFramework/AzToolsFramework/Script/LuaEditorSystemComponent.cpp

@@ -81,7 +81,8 @@ namespace AzToolsFramework
                         AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
                         AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
                         &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
                         &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
                         fullFilepath,
                         fullFilepath,
-                        AZ::Crc32());
+                        AZ::Crc32(),
+                        true);
                 }
                 }
                 else
                 else
                 {
                 {
@@ -112,7 +113,8 @@ namespace AzToolsFramework
                         AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
                         AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
                         &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
                         &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
                         fullFilepath,
                         fullFilepath,
-                        LuaComponentScriptBusId);
+                        LuaComponentScriptBusId,
+                        true);
                 }
                 }
                 else
                 else
                 {
                 {

+ 12 - 0
Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialBrowserInteractions.cpp

@@ -121,6 +121,12 @@ namespace AZ
                           dialog.m_sourcePath.toUtf8().constData();
                           dialog.m_sourcePath.toUtf8().constData();
                           materialData.m_parentMaterial = "";
                           materialData.m_parentMaterial = "";
                           AZ::RPI::JsonUtils::SaveObjectToFile(dialog.m_targetPath.toUtf8().constData(), materialData);
                           AZ::RPI::JsonUtils::SaveObjectToFile(dialog.m_targetPath.toUtf8().constData(), materialData);
+                          AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotificationBus::Event(
+                              AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
+                              &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
+                              dialog.m_targetPath.toUtf8().constData(),
+                              AZ::Crc32(),
+                              false);
                       }
                       }
                   } });
                   } });
 
 
@@ -156,6 +162,12 @@ namespace AZ
                       {
                       {
                           AZ::IO::FileIOBase::GetInstance()->Copy(
                           AZ::IO::FileIOBase::GetInstance()->Copy(
                               dialog.m_sourcePath.toUtf8().constData(), dialog.m_targetPath.toUtf8().constData());
                               dialog.m_sourcePath.toUtf8().constData(), dialog.m_targetPath.toUtf8().constData());
+                          AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotificationBus::Event(
+                              AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
+                              &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
+                              dialog.m_targetPath.toUtf8().constData(),
+                              AZ::Crc32(),
+                              false);
                       }
                       }
                   } });
                   } });
         }
         }

+ 13 - 12
Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp

@@ -939,12 +939,6 @@ namespace EMotionFX
                       AZ::IO::FixedMaxPath outFilePath = AzFramework::StringFunc::Path::MakeUniqueFilenameWithSuffix(
                       AZ::IO::FixedMaxPath outFilePath = AzFramework::StringFunc::Path::MakeUniqueFilenameWithSuffix(
                           AZ::IO::PathView(fullSourceFolderNameInCallback + "/NewAnimGraph.animgraph"));
                           AZ::IO::PathView(fullSourceFolderNameInCallback + "/NewAnimGraph.animgraph"));
 
 
-                      AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotificationBus::Event(
-                          AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
-                          &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
-                          outFilePath.Native().c_str(),
-                          AZ::Crc32());
-
                       EMotionFX::AnimGraph* animGraph = aznew EMotionFX::AnimGraph();
                       EMotionFX::AnimGraph* animGraph = aznew EMotionFX::AnimGraph();
                       // create the root state machine object
                       // create the root state machine object
                       EMotionFX::AnimGraphObject* rootSMObject =
                       EMotionFX::AnimGraphObject* rootSMObject =
@@ -961,6 +955,12 @@ namespace EMotionFX
                           animGraph->SaveToFile(outFilePath.Native().c_str(), serializeContext);
                           animGraph->SaveToFile(outFilePath.Native().c_str(), serializeContext);
                           delete animGraph;
                           delete animGraph;
                       }
                       }
+                      AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotificationBus::Event(
+                          AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
+                          &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
+                          outFilePath.Native().c_str(),
+                          AZ::Crc32(),
+                          true);
                   } });
                   } });
 
 
             creators.push_back(
             creators.push_back(
@@ -972,12 +972,6 @@ namespace EMotionFX
                       AZ::IO::FixedMaxPath outFilePath = AzFramework::StringFunc::Path::MakeUniqueFilenameWithSuffix(
                       AZ::IO::FixedMaxPath outFilePath = AzFramework::StringFunc::Path::MakeUniqueFilenameWithSuffix(
                           AZ::IO::PathView(fullSourceFolderNameInCallback + "/NewMotionSet.motionset"));
                           AZ::IO::PathView(fullSourceFolderNameInCallback + "/NewMotionSet.motionset"));
 
 
-                      AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotificationBus::Event(
-                          AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
-                          &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
-                          outFilePath.Native().c_str(),
-                          AZ::Crc32());
-
                       AZ::IO::PathView filePath = outFilePath.c_str();
                       AZ::IO::PathView filePath = outFilePath.c_str();
                       AZStd::string motionSetName = filePath.Stem().Native();
                       AZStd::string motionSetName = filePath.Stem().Native();
                       EMotionFX::MotionSet* motionSet = aznew EMotionFX::MotionSet(motionSetName.c_str(), /*parentSet=*/nullptr);
                       EMotionFX::MotionSet* motionSet = aznew EMotionFX::MotionSet(motionSetName.c_str(), /*parentSet=*/nullptr);
@@ -987,6 +981,13 @@ namespace EMotionFX
                           serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
                           serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
                       motionSet->SaveToFile(outFilePath.Native().c_str(), serializeContext);
                       motionSet->SaveToFile(outFilePath.Native().c_str(), serializeContext);
                       delete motionSet;
                       delete motionSet;
+
+                      AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotificationBus::Event(
+                          AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
+                          &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
+                          outFilePath.Native().c_str(),
+                          AZ::Crc32(),
+                          true);
                   } });
                   } });
         }
         }
 
 

+ 5 - 4
Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp

@@ -245,10 +245,11 @@ namespace ScriptCanvasEditor
                 else
                 else
                 {
                 {
                     AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotificationBus::Event(
                     AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotificationBus::Event(
-                        AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId
-                        , &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor
-                        , source.AbsolutePath().Native()
-                        , AZ::Crc32());
+                        AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::FileCreationNotificationBusId,
+                        &AzToolsFramework::AssetBrowser::AssetBrowserFileCreationNotifications::HandleAssetCreatedInEditor,
+                        source.AbsolutePath().Native(),
+                        AZ::Crc32(),
+                        true);
                 }
                 }
 
 
                 fileStream.Close();
                 fileStream.Close();