chore: checkpoint current workspace changes

This commit is contained in:
2026-04-11 22:14:02 +08:00
parent 3e55f8c204
commit 8848cfd958
227 changed files with 34027 additions and 6711 deletions

View File

@@ -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);