File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ if(HAVE_PYTHON)
53
53
file (WRITE "${CMAKE_CURRENT_BINARY_DIR} /pandac/PandaModules.py"
54
54
"\" This module is deprecated. Import from panda3d.core and other panda3d.* modules instead.\"
55
55
56
- print(\" Warning: pandac.PandaModules is deprecated, import from panda3d.core instead\" )\n " )
56
+ if __debug__:
57
+ print(\" Warning: pandac.PandaModules is deprecated, import from panda3d.core instead\" )\n " )
57
58
58
59
foreach (module ${ALL_INTERROGATE_MODULES} )
59
60
string (REGEX REPLACE "^.*\\ ." "" module_name "${module} " )
@@ -66,6 +67,19 @@ except ImportError as err:
66
67
" )
67
68
endforeach ()
68
69
70
+ file (APPEND "${CMAKE_CURRENT_BINARY_DIR} /pandac/PandaModules.py"
71
+ "from direct.showbase import DConfig
72
+
73
+ def get_config_showbase():
74
+ return DConfig
75
+
76
+ def get_config_express():
77
+ return DConfig
78
+
79
+ getConfigShowbase = get_config_showbase
80
+ getConfigExpress = get_config_express
81
+ " )
82
+
69
83
# Now install ourselves:
70
84
install_python_package (pandac SOURCE "${CMAKE_CURRENT_BINARY_DIR} /pandac" LIB COMPONENT Direct )
71
85
endif ()
You can’t perform that action at this time.
0 commit comments