fix egg files not getting their trefs updated

This commit is contained in:
David Rose 2003-05-06 00:35:42 +00:00
parent ce8ef1441b
commit 362c716a82
3 changed files with 21 additions and 0 deletions

View File

@ -168,6 +168,7 @@ scan_textures() {
// It hasn't changed substantially, so keep the original
// (which still has the placement references from a previous
// pass).
aref->from_egg_quick(*bref);
combined_textures.push_back(aref);
delete bref;

View File

@ -135,6 +135,25 @@ from_egg(EggFile *egg_file, EggData *data, EggTexture *egg_tex) {
_wrap_v = egg_tex->determine_wrap_v();
}
////////////////////////////////////////////////////////////////////
// Function: TextureReference::from_egg_quick
// Access: Public
// Description: Sets up the pointers within the TextureReference
// to the same egg file pointers indicated by the other
// TextureReference object, without changing any of the
// other internal data stored here regarding the egg
// structures. This is intended for use when we have
// already shown that the two TextureReferences describe
// equivalent data.
////////////////////////////////////////////////////////////////////
void TextureReference::
from_egg_quick(const TextureReference &other) {
nassertv(_tref_name == other._tref_name);
_egg_file = other._egg_file;
_egg_tex = other._egg_tex;
_egg_data = other._egg_data;
}
////////////////////////////////////////////////////////////////////
// Function: TextureReference::get_egg_file
// Access: Public

View File

@ -50,6 +50,7 @@ public:
~TextureReference();
void from_egg(EggFile *egg_file, EggData *data, EggTexture *egg_tex);
void from_egg_quick(const TextureReference &other);
EggFile *get_egg_file() const;
SourceTextureImage *get_source() const;