25 add_animation_options();
27 add_normals_options();
28 add_transform_options();
31 (
"invtrans",
"",
false,
32 "Import the .dae file using inverted transparency. " 33 "This is useful when importing COLLADA files from some authoring tools " 34 "that export models with inverted transparency, such as Google SketchUp.",
35 &SomethingToEgg::dispatch_none, &_invert_transparency);
37 set_program_brief(
"convert COLLADA assets into .egg files");
38 set_program_description
39 (
"This program converts .dae files (COLLADA Digital Asset Exchange) to .egg.");
41 _coordinate_system = CS_yup_right;
42 _animation_convert = AC_both;
50 if (_animation_convert != AC_both && _animation_convert != AC_none &&
51 _animation_convert != AC_chan && _animation_convert != AC_model) {
52 std::cerr <<
"Unsupported animation convert option.\n";
56 nout <<
"Reading " << _input_filename <<
"\n";
58 _data->set_coordinate_system(_coordinate_system);
62 converter._allow_errors = _allow_errors;
63 converter._invert_transparency = _invert_transparency;
65 apply_parameters(converter);
68 nout <<
"Errors in conversion.\n";
77 int main(
int argc,
char *argv[]) {
virtual void parse_command_line(int argc, char **argv)
Dispatches on each of the options on the command line, and passes the remaining parameters to handle_...
virtual bool convert_file(const Filename &filename)
Handles the reading of the input file and converting it to egg.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class supervises the construction of an EggData structure from a DAE file.
void set_egg_data(EggData *egg_data)
Sets the egg data that will be filled in when convert_file() is called.
void write_egg_file()
Writes out the egg file as the normal result of the program.
This is the general base class for a file-converter program that reads some model file format and gen...
A program to read a DAE file and generate an egg file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.