*** empty log message ***

This commit is contained in:
David Rose 2001-03-30 19:19:26 +00:00
parent 756f72e0b7
commit 4d9ab7f0c7

View File

@ -327,18 +327,26 @@ choose_placements() {
// Now groups is the set of groups that the egg file requires, // Now groups is the set of groups that the egg file requires,
// which also happen to include the texture. It better not be // which also happen to include the texture. It better not be
// empty. // empty.
nassertv(!groups.empty()); if (groups.empty()) {
nout << "Warning! Egg file " << get_name() << ", referencing texture "
// It doesn't really matter which group in the set we choose, so << *reference << ", does not have any groups in common.\n"
// we arbitrarily choose the first one. << "Egg groups:\n";
PaletteGroup *group = (*groups.begin()); get_complete_groups().write(nout, 2);
nout << "Texture groups:\n";
texture->get_groups().write(nout, 2);
// Now get the TexturePlacement object that corresponds to the } else {
// placement of this texture into this group. // It doesn't really matter which group in the set we choose, so
TexturePlacement *placement = texture->get_placement(group); // we arbitrarily choose the first one.
nassertv(placement != (TexturePlacement *)NULL); PaletteGroup *group = (*groups.begin());
reference->set_placement(placement); // Now get the TexturePlacement object that corresponds to the
// placement of this texture into this group.
TexturePlacement *placement = texture->get_placement(group);
nassertv(placement != (TexturePlacement *)NULL);
reference->set_placement(placement);
}
} }
} }
} }