Panda3D
|
00001 // Filename: config_mayaloader.cxx 00002 // Created by: drose (09Oct03) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifdef __MACH__ 00016 #define __OPENTRANSPORTPROVIDERS__ 00017 #endif 00018 00019 #include "pandatoolbase.h" 00020 #include "loaderFileTypePandatool.h" 00021 #include "config_mayaegg.h" 00022 #include "mayaToEggConverter.h" 00023 00024 #include "dconfig.h" 00025 #include "loaderFileTypeRegistry.h" 00026 00027 Configure(config_mayaloader); 00028 00029 void EXPCL_MISC init_libmayaloader(); 00030 00031 ConfigureFn(config_mayaloader) { 00032 init_libmayaloader(); 00033 } 00034 00035 //////////////////////////////////////////////////////////////////// 00036 // Function: init_libmayaloader 00037 // Description: Initializes the library. This must be called at 00038 // least once before any of the functions or classes in 00039 // this library can be used. Normally it will be 00040 // called by the static initializers and need not be 00041 // called explicitly, but special cases exist. 00042 //////////////////////////////////////////////////////////////////// 00043 void 00044 init_libmayaloader() { 00045 static bool initialized = false; 00046 if (initialized) { 00047 return; 00048 } 00049 initialized = true; 00050 00051 LoaderFileTypePandatool::init_type(); 00052 00053 LoaderFileTypeRegistry *reg = LoaderFileTypeRegistry::get_global_ptr(); 00054 00055 init_libmayaegg(); 00056 MayaToEggConverter *maya = new MayaToEggConverter; 00057 reg->register_type(new LoaderFileTypePandatool(maya)); 00058 }