49 std::make_unique<FOOTPRINT_LIBRARY_ADAPTER>( mgr ) );
75 cfgpath.AppendDir( wxT(
"3d" ) );
81 aUpdateProjDir =
true;
107 int clearCacheInterval = 0;
109 if(
Pgm().GetCommonSettings() )
114 if( clearCacheInterval > 0 )
Provide an extensible class to resolve 3D model paths.
std::optional< LIBRARY_MANAGER_ADAPTER * > Adapter(LIBRARY_TABLE_TYPE aType) const
void RegisterAdapter(LIBRARY_TABLE_TYPE aType, std::unique_ptr< LIBRARY_MANAGER_ADAPTER > &&aAdapter)
static wxString GetUserSettingsPath()
Return the user configuration path used to store KiCad's configuration files.
virtual COMMON_SETTINGS * GetCommonSettings() const
virtual LIBRARY_MANAGER & GetLibraryManager() const
static std::mutex s_libAdapterMutex
Used to synchronise access to FootprintLibAdapter.
static void Cleanup3DCache(PROJECT *aProject)
static S3D_CACHE * Get3DCacheManager(PROJECT *aProject, bool updateProjDir=false)
Return a pointer to an instance of the 3D cache manager.
static FILENAME_RESOLVER * Get3DFilenameResolver(PROJECT *aProject)
Accessor for 3D path resolver.
static FOOTPRINT_LIBRARY_ADAPTER * FootprintLibAdapter(PROJECT *aProject)
Container for project specific data.
virtual void SetElem(PROJECT::ELEM aIndex, _ELEM *aElem)
virtual _ELEM * GetElem(PROJECT::ELEM aIndex)
Get and set the elements for this project.
Cache for storing the 3D shapes.
void SetProgramBase(PGM_BASE *aBase)
Set the filename resolver's pointer to the application's PGM_BASE instance.
bool Set3DConfigDir(const wxString &aConfigDir)
Set the configuration directory to be used by the model manager for storing 3D model manager configur...
FILENAME_RESOLVER * GetResolver() noexcept
bool SetProject(PROJECT *aProject)
Set the current project's working directory; this affects the model search path.
void CleanCacheDir(int aNumDaysOld)
Delete up old cache files in cache directory.
This file is part of the common library.
PGM_BASE & Pgm()
The global program "get" accessor.
static std::mutex mutex3D_cacheManager
int clear_3d_cache_interval