Additional read-only prefab workflow changes.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
+15
-3
@@ -277,6 +277,8 @@ namespace AzToolsFramework
|
||||
}
|
||||
}
|
||||
|
||||
bool itemWasShown = false;
|
||||
|
||||
// Create Prefab
|
||||
{
|
||||
if (!selectedEntities.empty())
|
||||
@@ -312,33 +314,43 @@ namespace AzToolsFramework
|
||||
QObject::connect(createAction, &QAction::triggered, createAction, [selectedEntities] {
|
||||
ContextMenu_CreatePrefab(selectedEntities);
|
||||
});
|
||||
|
||||
itemWasShown = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Instantiate Prefab
|
||||
if (!readOnlyEntityInSelection)
|
||||
{
|
||||
QAction* instantiateAction = menu->addAction(QObject::tr("Instantiate Prefab..."));
|
||||
instantiateAction->setToolTip(QObject::tr("Instantiates a prefab file in the scene."));
|
||||
|
||||
QObject::connect(
|
||||
instantiateAction, &QAction::triggered, instantiateAction, [] { ContextMenu_InstantiatePrefab(); });
|
||||
|
||||
itemWasShown = true;
|
||||
}
|
||||
|
||||
// Instantiate Procedural Prefab
|
||||
if (AZ::Prefab::ProceduralPrefabAsset::UseProceduralPrefabs())
|
||||
if (AZ::Prefab::ProceduralPrefabAsset::UseProceduralPrefabs() && !readOnlyEntityInSelection)
|
||||
{
|
||||
QAction* action = menu->addAction(QObject::tr("Instantiate Procedural Prefab..."));
|
||||
action->setToolTip(QObject::tr("Instantiates a procedural prefab file in a prefab."));
|
||||
|
||||
QObject::connect(
|
||||
action, &QAction::triggered, action, [] { ContextMenu_InstantiateProceduralPrefab(); });
|
||||
|
||||
itemWasShown = true;
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
if (itemWasShown)
|
||||
{
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
bool itemWasShown = false;
|
||||
itemWasShown = false;
|
||||
|
||||
// Edit/Save Prefab
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user