mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
parent
a099c85245
commit
5ae38a8a92
@ -229,9 +229,13 @@ get_num_directories() const {
|
||||
/**
|
||||
* Returns the nth directory on the search list.
|
||||
*/
|
||||
INLINE const Filename &ConfigVariableSearchPath::
|
||||
INLINE Filename ConfigVariableSearchPath::
|
||||
get_directory(size_t n) const {
|
||||
return get_value().get_directory(n);
|
||||
Filename dir;
|
||||
_lock.lock();
|
||||
dir = _cache.get_directory(n);
|
||||
_lock.unlock();
|
||||
return dir;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +66,7 @@ PUBLISHED:
|
||||
|
||||
INLINE bool is_empty() const;
|
||||
INLINE size_t get_num_directories() const;
|
||||
INLINE const Filename &get_directory(size_t n) const;
|
||||
INLINE Filename get_directory(size_t n) const;
|
||||
MAKE_SEQ(get_directories, get_num_directories, get_directory);
|
||||
MAKE_SEQ_PROPERTY(directories, get_num_directories, get_directory);
|
||||
|
||||
|
@ -207,7 +207,7 @@ load_file(const Filename &filename, const LoaderOptions &options) const {
|
||||
|
||||
if (search) {
|
||||
// Look for the file along the model path.
|
||||
const ConfigVariableSearchPath &model_path = get_model_path();
|
||||
DSearchPath model_path(get_model_path());
|
||||
int num_dirs = model_path.get_num_directories();
|
||||
for (int i = 0; i < num_dirs; ++i) {
|
||||
Filename pathname(model_path.get_directory(i), this_filename);
|
||||
|
Loading…
x
Reference in New Issue
Block a user