mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
don't make directories for incorrect files, and put alpha 1 on red could-not-find textures
This commit is contained in:
parent
dbfb75f964
commit
218659244f
@ -82,6 +82,10 @@ copy(TextureImage *texture) {
|
||||
// Couldn't read the texture, so fill it with red.
|
||||
PNMImage dest_image(_x_size, _y_size, texture->get_num_channels());
|
||||
dest_image.fill(1.0, 0.0, 0.0);
|
||||
if (dest_image.has_alpha()) {
|
||||
dest_image.alpha_fill(1.0);
|
||||
}
|
||||
|
||||
write(dest_image);
|
||||
}
|
||||
}
|
||||
|
@ -134,9 +134,6 @@ make_user_filename(Filename filename) {
|
||||
// caches the operation so that repeated calls to
|
||||
// filenames in the same directory will tend to be
|
||||
// faster.
|
||||
//
|
||||
// Also guarantees that the directory containing the
|
||||
// filename exists by making it if it does not.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void FilenameUnifier::
|
||||
make_canonical(Filename &filename) {
|
||||
@ -153,7 +150,6 @@ make_canonical(Filename &filename) {
|
||||
return;
|
||||
}
|
||||
|
||||
filename.make_dir();
|
||||
filename.make_canonical();
|
||||
_canonical_filenames.insert(CanonicalFilenames::value_type(dirname, filename.get_dirname()));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user