/* How to compile: * gcc -L/usr/local/lib -l3ds breve3ds.c -o breve3ds * Depends on: * http://www.lib3ds.org/ */ #include #include int main(int argc, char **argv) { Lib3dsFile * input3ds; if ( argc != 3 ) { printf( "Use lib3ds version 2 function to create node\n" ); printf( "from meshes needed for Breve.\n" ); printf( "Leonardo Hamada \n" ); printf( "Usage: breve3ds \n" ); return 2; } input3ds = lib3ds_file_open( argv[1] ); if ( NULL == input3ds ) { printf( "Error opening 3ds file.\n" ); return 1; } lib3ds_file_create_nodes_for_meshes( input3ds ); if ( ! lib3ds_file_save( input3ds, argv[2] ) ) { printf( "Error saving 3ds file.\n" ); lib3ds_file_free( input3ds ); return 3; } lib3ds_file_free( input3ds ); return 0; }