Panda3D
config_maya.cxx
1 // Filename: config_maya.cxx
2 // Created by: drose (15Apr02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "config_maya.h"
16 
17 #include "dconfig.h"
18 
19 Configure(config_maya);
20 NotifyCategoryDef(maya, "");
21 
22 ConfigureFn(config_maya) {
23  init_libmaya();
24 }
25 
26 ConfigVariableInt init_maya_repeat_count
27 ("init-maya-repeat-count", 5,
28  PRC_DESC("The number of times to attempt to initialize Maya and acquire the "
29  "Maya license before giving up."));
30 
31 ConfigVariableDouble init_maya_timeout
32 ("init-maya-timeout", 5.0,
33  PRC_DESC("The number of seconds to wait between attempts to acquire the "
34  "Maya license."));
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: init_libmaya
38 // Description: Initializes the library. This must be called at
39 // least once before any of the functions or classes in
40 // this library can be used. Normally it will be
41 // called by the static initializers and need not be
42 // called explicitly, but special cases exist.
43 ////////////////////////////////////////////////////////////////////
44 void
45 init_libmaya() {
46  static bool initialized = false;
47  if (initialized) {
48  return;
49  }
50  initialized = true;
51 }
52 
This is a convenience class to specialize ConfigVariable as a floating-point type.
This is a convenience class to specialize ConfigVariable as an integer type.