From c19665e6276f0d4145b4022f758b3ab360408c54 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Tue, 21 Oct 2008 18:58:58 +0000 Subject: [PATCH] added getRepository builtin --- direct/src/showbase/PythonUtil.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index 4331758458..c4c592578d 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -31,7 +31,7 @@ __all__ = ['enumerate', 'unique', 'indent', 'nonRepeatingRandomList', 'printStack', 'printReverseStack', 'listToIndex2item', 'listToItem2index', 'pandaBreak','pandaTrace','formatTimeCompact','DestructiveScratchPad', 'deeptype','getProfileResultString','StdoutCapture','StdoutPassthrough', -'Averager',] +'Averager', 'getRepository', ] import types import string @@ -3188,6 +3188,12 @@ def getBase(): except: return simbase +def getRepository(): + try: + return base.cr + except: + return simbase.air + def superFlattenShip(ship): #PHASE 1: remove characters @@ -3781,6 +3787,7 @@ __builtin__.ClassTree = ClassTree __builtin__.invertDict = invertDict __builtin__.invertDictLossless = invertDictLossless __builtin__.getBase = getBase +__builtin__.getRepository = getRepository __builtin__.safeRepr = safeRepr __builtin__.fastRepr = fastRepr __builtin__.nullGen = nullGen