24 _collection =
nullptr;
26 _force_initial_rest_frame =
false;
33~EggCharacterFilter() {
34 if (_collection !=
nullptr) {
42void EggCharacterFilter::
46 "Specify this to force all the initial rest frames of the various "
47 "model files to the same value as the first model specified. This "
48 "is a fairly drastic way to repair models whose initial rest frame "
49 "values are completely bogus, but should not be performed when the "
50 "input models are correct.",
51 &EggCharacterFilter::dispatch_none, &_force_initial_rest_frame);
58bool EggCharacterFilter::
60 if (_collection ==
nullptr) {
61 _collection = make_collection();
64 if (!EggMultiFilter::post_command_line()) {
69 for (ei = _eggs.begin(); ei != _eggs.end(); ++ei) {
70 EggData *data = (*ei);
72 if (_collection->add_egg(data) < 0) {
73 nout << data->get_egg_filename().get_basename()
74 <<
" does not contain a character model or animation channel.\n";
79 _collection->check_errors(nout, _force_initial_rest_frame);
89void EggCharacterFilter::
93 int num_characters = _collection->get_num_characters();
94 for (
int i = 0; i < num_characters; i++) {
95 EggCharacterData *char_data = _collection->get_character(i);
99 EggMultiFilter::write_eggs();
109 return new EggCharacterCollection;
Represents a set of characters, as read and collected from possibly several model and/or animation eg...
EggJointData * get_root_joint() const
Returns the root joint of the character hierarchy.
void optimize()
Calls optimize() on all models, and recursively on all joints at this node and below.
This is a base class for a program that reads in a number of egg files, operates on them,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.