mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Merge branch 'release/1.9.x'
This commit is contained in:
commit
0ae2df7e02
@ -23,6 +23,8 @@ class Actor(DirectObject, NodePath):
|
||||
LoaderOptions.LFConvertAnim)
|
||||
|
||||
validateSubparts = ConfigVariableBool('validate-subparts', True)
|
||||
mergeLODBundles = ConfigVariableBool('merge-lod-bundles', True)
|
||||
allowAsyncBind = ConfigVariableBool('allow-async-bind', True)
|
||||
|
||||
class PartDef:
|
||||
|
||||
@ -170,10 +172,10 @@ class Actor(DirectObject, NodePath):
|
||||
# ['common']; when it is false, __animControlDict has one key
|
||||
# per each LOD name.
|
||||
|
||||
if mergeLODBundles == None:
|
||||
if mergeLODBundles is None:
|
||||
# If this isn't specified, it comes from the Config.prc
|
||||
# file.
|
||||
self.mergeLODBundles = base.config.GetBool('merge-lod-bundles', True)
|
||||
self.mergeLODBundles = Actor.mergeLODBundles.getValue()
|
||||
else:
|
||||
self.mergeLODBundles = mergeLODBundles
|
||||
|
||||
@ -181,8 +183,8 @@ class Actor(DirectObject, NodePath):
|
||||
# asynchronous animation binding. This requires that you have
|
||||
# run "egg-optchar -preload" on your animation and models to
|
||||
# generate the appropriate AnimPreloadTable.
|
||||
if allowAsyncBind == None:
|
||||
self.allowAsyncBind = base.config.GetBool('allow-async-bind', True)
|
||||
if allowAsyncBind is None:
|
||||
self.allowAsyncBind = Actor.allowAsyncBind.getValue()
|
||||
else:
|
||||
self.allowAsyncBind = allowAsyncBind
|
||||
|
||||
|
@ -1993,7 +1993,7 @@ def pstatcollect(scope, level = None):
|
||||
|
||||
try:
|
||||
|
||||
if not (__dev__ or config.GetBool('force-pstatcollect', 0)) or \
|
||||
if not (__dev__ or ConfigVariableBool('force-pstatcollect', False)) or \
|
||||
not scope:
|
||||
return decorator
|
||||
|
||||
|
@ -72,6 +72,8 @@ class ShowBase(DirectObject.DirectObject):
|
||||
if logStackDump or uploadStackDump:
|
||||
ExceptionVarDump.install(logStackDump, uploadStackDump)
|
||||
|
||||
self.__autoGarbageLogging = self.__dev__ and self.config.GetBool('auto-garbage-logging', False)
|
||||
|
||||
## The directory containing the main Python file of this application.
|
||||
self.mainDir = ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR")
|
||||
|
||||
@ -291,7 +293,6 @@ class ShowBase(DirectObject.DirectObject):
|
||||
self.physicsMgrEnabled = 0
|
||||
self.physicsMgrAngular = 0
|
||||
|
||||
self.createBaseAudioManagers()
|
||||
self.createStats()
|
||||
|
||||
self.AppHasAudioFocus = 1
|
||||
@ -379,6 +380,8 @@ class ShowBase(DirectObject.DirectObject):
|
||||
else:
|
||||
ShowBase.notify.info('__dev__ == %s' % __dev__)
|
||||
|
||||
self.createBaseAudioManagers()
|
||||
|
||||
# set up recording of Functor creation stacks in __dev__
|
||||
PythonUtil.recordFunctorCreationStacks()
|
||||
|
||||
@ -2659,7 +2662,7 @@ class ShowBase(DirectObject.DirectObject):
|
||||
if not properties.getOpen():
|
||||
# If the user closes the main window, we should exit.
|
||||
self.notify.info("User closed main window.")
|
||||
if __dev__ and config.GetBool('auto-garbage-logging', 0):
|
||||
if self.__autoGarbageLogging:
|
||||
GarbageReport.b_checkForGarbageLeaks()
|
||||
self.userExit()
|
||||
|
||||
@ -2667,7 +2670,7 @@ class ShowBase(DirectObject.DirectObject):
|
||||
self.mainWinForeground = 1
|
||||
elif not properties.getForeground() and self.mainWinForeground:
|
||||
self.mainWinForeground = 0
|
||||
if __dev__ and config.GetBool('auto-garbage-logging', 0):
|
||||
if self.__autoGarbageLogging:
|
||||
GarbageReport.b_checkForGarbageLeaks()
|
||||
|
||||
if properties.getMinimized() and not self.mainWinMinimized:
|
||||
|
@ -166,7 +166,7 @@ class Transitions:
|
||||
self.loadFade()
|
||||
self.fade.reparentTo(aspect2d, FADE_SORT_INDEX)
|
||||
self.fade.setColor(self.alphaOn)
|
||||
elif base.config.GetBool('no-loading-screen',0):
|
||||
elif ConfigVariableBool('no-loading-screen', False):
|
||||
if finishIval:
|
||||
self.transitionIval = finishIval
|
||||
self.transitionIval.start()
|
||||
|
@ -10,7 +10,8 @@ class Rope(NodePath):
|
||||
thick lines built from triangle strips.
|
||||
"""
|
||||
|
||||
showRope = base.config.GetBool('show-rope', 1)
|
||||
showRope = ConfigVariableBool('show-rope', True, \
|
||||
"Set this to false to deactivate the display of ropes.")
|
||||
|
||||
def __init__(self, name = 'Rope'):
|
||||
self.ropeNode = RopeNode(name)
|
||||
@ -18,6 +19,9 @@ class Rope(NodePath):
|
||||
self.ropeNode.setCurve(self.curve)
|
||||
NodePath.__init__(self, self.ropeNode)
|
||||
self.name = name
|
||||
self.order = 0
|
||||
self.verts = []
|
||||
self.knots = None
|
||||
|
||||
def setup(self, order, verts, knots = None):
|
||||
"""This must be called to define the shape of the curve
|
||||
|
@ -6352,7 +6352,7 @@ write_make_seq(ostream &out, Object *obj, const std::string &ClassName,
|
||||
<< "\n"
|
||||
<< " PyObject *getter = PyDict_GetItemString(Dtool_" << ClassName << "._PyType.tp_dict, \"" << element_name << "\");\n"
|
||||
<< " if (getter == (PyObject *)NULL) {\n"
|
||||
<< " return NULL;\n"
|
||||
<< " return Dtool_Raise_AttributeError(self, \"" << element_name << "\");\n"
|
||||
<< " }\n"
|
||||
<< "\n"
|
||||
<< " Py_ssize_t count = (Py_ssize_t)local_this->" << make_seq->_num_name << "();\n"
|
||||
|
@ -629,8 +629,7 @@ remove_all_windows() {
|
||||
// a hack, since it's not really related to removing windows, this
|
||||
// would nevertheless be a fine time to ensure the model cache (if
|
||||
// any) has been flushed to disk.
|
||||
BamCache *cache = BamCache::get_global_ptr();
|
||||
cache->flush_index();
|
||||
BamCache::flush_global_index();
|
||||
|
||||
// And, hey, let's stop the vertex paging threads, if any.
|
||||
VertexDataPage::stop_threads();
|
||||
@ -715,8 +714,7 @@ render_frame() {
|
||||
|
||||
// Since this gets called every frame, we should take advantage of
|
||||
// the opportunity to flush the cache if necessary.
|
||||
BamCache *cache = BamCache::get_global_ptr();
|
||||
cache->consider_flush_index();
|
||||
BamCache::consider_flush_global_index();
|
||||
|
||||
// Anything that happens outside of GraphicsEngine::render_frame()
|
||||
// is deemed to be App.
|
||||
|
@ -257,6 +257,32 @@ get_global_ptr() {
|
||||
return _global_ptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BamCache::consider_flush_global_index
|
||||
// Access: Published, Static
|
||||
// Description: If there is a global BamCache object, calls
|
||||
// consider_flush_index() on it.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void BamCache::
|
||||
consider_flush_global_index() {
|
||||
if (_global_ptr != (BamCache *)NULL) {
|
||||
_global_ptr->consider_flush_index();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BamCache::flush_global_index
|
||||
// Access: Published, Static
|
||||
// Description: If there is a global BamCache object, calls
|
||||
// flush_index() on it.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void BamCache::
|
||||
flush_global_index() {
|
||||
if (_global_ptr != (BamCache *)NULL) {
|
||||
_global_ptr->flush_index();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BamCache::mark_index_stale
|
||||
// Access: Private
|
||||
|
@ -83,6 +83,8 @@ PUBLISHED:
|
||||
void list_index(ostream &out, int indent_level = 0) const;
|
||||
|
||||
INLINE static BamCache *get_global_ptr();
|
||||
INLINE static void consider_flush_global_index();
|
||||
INLINE static void flush_global_index();
|
||||
|
||||
private:
|
||||
void read_index();
|
||||
|
@ -218,7 +218,7 @@ get_region(int n) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void MouseWatcherBase::
|
||||
output(ostream &out) const {
|
||||
out << "MouseWatcherBase (" << _regions.size() << " regions)";
|
||||
out << "MouseWatcherGroup (" << _regions.size() << " regions)";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,13 +31,17 @@ class EXPCL_PANDA_TFORM MouseWatcherGroup : public MouseWatcherBase,
|
||||
public:
|
||||
INLINE MouseWatcherGroup() {};
|
||||
|
||||
public:
|
||||
PUBLISHED:
|
||||
static TypeHandle get_class_type() {
|
||||
ReferenceCount::init_type();
|
||||
return _type_handle;
|
||||
}
|
||||
|
||||
public:
|
||||
static void init_type() {
|
||||
MouseWatcherBase::init_type();
|
||||
ReferenceCount::init_type();
|
||||
register_type(_type_handle, "MouseWatcherGroup",
|
||||
MouseWatcherBase::get_class_type(),
|
||||
ReferenceCount::get_class_type());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user