Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use Visibility information in ModelSelector
Setting a model to 'hidden' in an assets.lst now hides the model from the model
selector, although it appears in the map as normal.
  • Loading branch information
Matthew Mott committed Feb 7, 2019
1 parent 9c1bbc4 commit da7d2da
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions radiant/ui/modelselector/ModelPopulator.h
Expand Up @@ -88,10 +88,16 @@ class ModelPopulator :
try
{
// Search for model files
GlobalFileSystem().forEachFile(MODELS_FOLDER,
"*",
[&](const std::string& filename, vfs::Visibility) { visitModelFile(filename); },
0);
GlobalFileSystem().forEachFile(
MODELS_FOLDER, "*",
[&](const std::string& filename, vfs::Visibility vis)
{
// Only add visible models
if (vis == vfs::Visibility::NORMAL)
visitModelFile(filename);
},
0
);

if (TestDestroy()) return static_cast<wxThread::ExitCode>(0);

Expand Down

0 comments on commit da7d2da

Please sign in to comment.