diff --git a/direct/src/level/CutScene.py b/direct/src/level/CutScene.py index 0e4a34e56f..40d7bb4c59 100755 --- a/direct/src/level/CutScene.py +++ b/direct/src/level/CutScene.py @@ -15,7 +15,6 @@ import DirectNotifyGlobal import ClassicFSM #import DistributedInteractiveEntity import DelayDelete -import Localizer # effects # diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 63113851ef..3d0d60d649 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -2,7 +2,7 @@ # This module redefines the builtin import function with one # that prints out every import it does in a hierarchical form # Annoying and very noisy, but sometimes useful -# import VerboseImport +#import VerboseImport from PandaModules import * from DirectNotifyGlobal import * diff --git a/direct/src/showbase/VerboseImport.py b/direct/src/showbase/VerboseImport.py index c92d5e9757..40c4f4e980 100644 --- a/direct/src/showbase/VerboseImport.py +++ b/direct/src/showbase/VerboseImport.py @@ -11,13 +11,17 @@ indentLevel = 0 # The new import function def newimport(*args, **kw): global indentLevel + fPrint = 0 name = args[0] # Only print the name if we have not imported this before if not sys.modules.has_key(name): print (" "*indentLevel + "import " + args[0]) + fPrint = 1 indentLevel += 1 result = oldimport(*args, **kw) indentLevel -= 1 + if fPrint: + print (" "*indentLevel + "DONE: import " + args[0]) return result # Replace the builtin import with our new import