make friendlier when source textures are not found
This commit is contained in:
parent
2fdcdf33b0
commit
45b5c4a9bf
|
|
@ -49,9 +49,11 @@ DestTextureImage::
|
|||
DestTextureImage(TexturePlacement *placement) {
|
||||
TextureImage *texture = placement->get_texture();
|
||||
_properties = texture->get_properties();
|
||||
_size_known = true;
|
||||
_x_size = texture->get_x_size();
|
||||
_y_size = texture->get_y_size();
|
||||
_size_known = texture->is_size_known();
|
||||
if (_size_known) {
|
||||
_x_size = texture->get_x_size();
|
||||
_y_size = texture->get_y_size();
|
||||
}
|
||||
|
||||
if (pal->_force_power_2) {
|
||||
_x_size = to_power_2(_x_size);
|
||||
|
|
|
|||
|
|
@ -633,7 +633,8 @@ copy_unplaced(bool redo_all) {
|
|||
Placement::iterator pi;
|
||||
for (pi = _placement.begin(); pi != _placement.end(); ++pi) {
|
||||
TexturePlacement *placement = (*pi).second;
|
||||
if (placement->get_omit_reason() != OR_none) {
|
||||
if (placement->get_omit_reason() != OR_none &&
|
||||
placement->get_omit_reason() != OR_unknown) {
|
||||
DestTextureImage *dest = new DestTextureImage(placement);
|
||||
Filename filename = dest->get_filename();
|
||||
filename.make_canonical();
|
||||
|
|
@ -858,6 +859,11 @@ write_scale_info(ostream &out, int indent_level) {
|
|||
<< "placed on "
|
||||
<< FilenameUnifier::make_user_filename(image->get_filename())
|
||||
<< "\n";
|
||||
|
||||
} else if (placement->get_omit_reason() == OR_unknown) {
|
||||
indent(out, indent_level + 2)
|
||||
<< "not placed because unknown.\n";
|
||||
|
||||
} else {
|
||||
DestTextureImage *image = placement->get_dest();
|
||||
nassertv(image != (DestTextureImage *)NULL);
|
||||
|
|
|
|||
|
|
@ -310,8 +310,16 @@ update_egg() {
|
|||
// We check for an OmitReason of OR_none, rather than asking
|
||||
// is_placed(), because in this case we don't want to consider an
|
||||
// OR_solitary texture as having been placed.
|
||||
if (_placement->get_omit_reason() == OR_unknown) {
|
||||
// The texture doesn't even exist. We can't update the egg to
|
||||
// point to any meaningful path; just leave it pointing to the
|
||||
// source texture. Maybe it will be found along the texture path
|
||||
// later.
|
||||
texture->update_egg_tex(_egg_tex);
|
||||
return;
|
||||
}
|
||||
if (_placement->get_omit_reason() != OR_none) {
|
||||
// The texture does not appear on a palette. This is the easy
|
||||
// The texture exists but is not on a palette. This is the easy
|
||||
// case; we simply have to update the texture reference to the new
|
||||
// texture location.
|
||||
DestTextureImage *dest = _placement->get_dest();
|
||||
|
|
|
|||
Loading…
Reference in New Issue