Panda3D
|
00001 // Filename: config_maya.cxx 00002 // Created by: drose (15Apr02) 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 #include "config_maya.h" 00016 00017 #include "dconfig.h" 00018 00019 Configure(config_maya); 00020 NotifyCategoryDef(maya, ""); 00021 00022 ConfigureFn(config_maya) { 00023 init_libmaya(); 00024 } 00025 00026 ConfigVariableInt init_maya_repeat_count 00027 ("init-maya-repeat-count", 5, 00028 PRC_DESC("The number of times to attempt to initialize Maya and acquire the " 00029 "Maya license before giving up.")); 00030 00031 ConfigVariableDouble init_maya_timeout 00032 ("init-maya-timeout", 5.0, 00033 PRC_DESC("The number of seconds to wait between attempts to acquire the " 00034 "Maya license.")); 00035 00036 //////////////////////////////////////////////////////////////////// 00037 // Function: init_libmaya 00038 // Description: Initializes the library. This must be called at 00039 // least once before any of the functions or classes in 00040 // this library can be used. Normally it will be 00041 // called by the static initializers and need not be 00042 // called explicitly, but special cases exist. 00043 //////////////////////////////////////////////////////////////////// 00044 void 00045 init_libmaya() { 00046 static bool initialized = false; 00047 if (initialized) { 00048 return; 00049 } 00050 initialized = true; 00051 } 00052