{ghi7197} ignore prefab groups with empty JSON DOMS (#7242)
* {ghi7197} ignore prefab groups with empty JSON DOMS
ignore prefab groups with empty JSON DOMS if the default procedural prefab
is being skipped
Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>
* a cleaner solution is to check if the Editor is attempting to construct,
then ignore making a default procedural prefab group
Signed-off-by: Allen Jackson <23512001+jackalbe@users.noreply.github.com>
This commit is contained in:
@@ -166,7 +166,7 @@ namespace AZ::SceneAPI::Behaviors
|
||||
meshNodeFullName.append(meshNodeName.GetName());
|
||||
|
||||
auto meshGroup = AZStd::make_shared<AZ::SceneAPI::SceneData::MeshGroup>();
|
||||
meshGroup->SetName(meshNodeFullName.c_str());
|
||||
meshGroup->SetName(meshNodeFullName);
|
||||
meshGroup->GetSceneNodeSelectionList().AddSelectedNode(AZStd::move(meshNodePath));
|
||||
for (const auto& meshGoupNamePair : meshTransformMap)
|
||||
{
|
||||
@@ -374,10 +374,18 @@ namespace AZ::SceneAPI::Behaviors
|
||||
Events::ProcessingResult PrefabGroupBehavior::ExportEventHandler::UpdateManifest(
|
||||
Containers::Scene& scene,
|
||||
ManifestAction action,
|
||||
[[maybe_unused]] RequestingApplication requester)
|
||||
RequestingApplication requester)
|
||||
{
|
||||
if (action != Events::AssetImportRequest::ConstructDefault)
|
||||
if (action == Events::AssetImportRequest::Update)
|
||||
{
|
||||
// ignore constructing a default procedural prefab if some tool or script is attempting
|
||||
// to update the scene manifest
|
||||
return Events::ProcessingResult::Ignored;
|
||||
}
|
||||
else if (action == Events::AssetImportRequest::ConstructDefault && requester == RequestingApplication::Editor)
|
||||
{
|
||||
// ignore constructing a default procedurla prefab if the Editor's "Edit Settings..." is being used
|
||||
// the user is trying to assign the source scene asset their own mesh groups
|
||||
return Events::ProcessingResult::Ignored;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user