mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix assertion failure when texture is no longer used
This commit is contained in:
parent
7398f2bfa2
commit
b3fd81d53e
@ -41,6 +41,9 @@ operator << (ostream &out, OmitReason omit) {
|
|||||||
|
|
||||||
case OR_unknown:
|
case OR_unknown:
|
||||||
return out << "unknown";
|
return out << "unknown";
|
||||||
|
|
||||||
|
case OR_unused:
|
||||||
|
return out << "unused";
|
||||||
}
|
}
|
||||||
|
|
||||||
return out << "**invalid**(" << (int)omit << ")";
|
return out << "**invalid**(" << (int)omit << ")";
|
||||||
|
@ -49,6 +49,10 @@ enum OmitReason {
|
|||||||
|
|
||||||
OR_unknown,
|
OR_unknown,
|
||||||
// The texture file cannot be read, so its size can't be determined.
|
// The texture file cannot be read, so its size can't be determined.
|
||||||
|
|
||||||
|
OR_unused,
|
||||||
|
// The texture is no longer used by any of the egg files that
|
||||||
|
// formerly referenced it.
|
||||||
};
|
};
|
||||||
|
|
||||||
ostream &operator << (ostream &out, OmitReason omit);
|
ostream &operator << (ostream &out, OmitReason omit);
|
||||||
|
@ -282,7 +282,12 @@ determine_size() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nassertr(_has_uvs, false);
|
if (!_has_uvs) {
|
||||||
|
force_replace();
|
||||||
|
_omit_reason = OR_unused;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TexCoordd rounded_min_uv = min_uv;
|
TexCoordd rounded_min_uv = min_uv;
|
||||||
TexCoordd rounded_max_uv = max_uv;
|
TexCoordd rounded_max_uv = max_uv;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user