chore: checkpoint current workspace changes
This commit is contained in:
@@ -479,6 +479,10 @@ void ProjectPanel::DrawProjectContextMenu(IProjectManager& manager, const Contex
|
||||
const bool canCreate = !target.createFolderPath.empty();
|
||||
const bool canShowInExplorer = !target.subjectPath.empty();
|
||||
const bool canOpen = target.item != nullptr && Commands::CanOpenAsset(target.item);
|
||||
const bool canInstantiateModel =
|
||||
target.item != nullptr &&
|
||||
m_context != nullptr &&
|
||||
Commands::CanInstantiateModelAsset(*m_context, target.item);
|
||||
const bool canDelete = target.item != nullptr;
|
||||
const bool canRename = target.item != nullptr;
|
||||
const std::string copyPath = BuildProjectRelativeAssetPath(
|
||||
@@ -518,6 +522,12 @@ void ProjectPanel::DrawProjectContextMenu(IProjectManager& manager, const Contex
|
||||
});
|
||||
});
|
||||
|
||||
Actions::DrawMenuAction(Actions::MakeAction("Instantiate In Scene", nullptr, false, canInstantiateModel), [&]() {
|
||||
QueueDeferredAction(m_deferredContextAction, [this, target]() {
|
||||
Commands::InstantiateModelAsset(*m_context, target.item);
|
||||
});
|
||||
});
|
||||
|
||||
Actions::DrawMenuAction(Actions::MakeOpenAssetAction(canOpen), [&]() {
|
||||
QueueDeferredAction(m_deferredContextAction, [this, target]() {
|
||||
Actions::OpenProjectAsset(*m_context, target.item);
|
||||
|
||||
Reference in New Issue
Block a user