Skip to content

Commit

Permalink
Auto remove invalid appearance parts
Browse files Browse the repository at this point in the history
  • Loading branch information
psiberx committed Aug 5, 2024
1 parent c180580 commit 9b27ce2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/App/Extensions/GarmentOverride/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,21 @@ void App::GarmentOverrideModule::OnResolveDefinition(Red::AppearanceResource* aR
CustomizationModule::FixCustomizationAppearance(aResource, aDefinition, aSelector);
}
}

if (auto definition = aDefinition->instance)
{
if (definition->partsValues.size > 0)
{
auto depot = Red::ResourceDepot::Get();
for (auto i = static_cast<int32_t>(definition->partsValues.size - 1); i >= 0; --i)
{
if (!depot->ResourceExists(definition->partsValues[i].resource.path))
{
definition->partsValues.RemoveAt(i);
}
}
}
}
}

void App::GarmentOverrideModule::OnGetVisualTags(Red::AppearanceNameVisualTagsPreset& aPreset,
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set_xmakever("2.5.9")

set_project("ArchiveXL")
set_version("1.16.3", {build = "%y%m%d%H%M"})
set_version("1.16.4", {build = "%y%m%d%H%M"})

set_arch("x64")
set_languages("cxx2a")
Expand Down

0 comments on commit 9b27ce2

Please sign in to comment.