Bläddra i källkod

*** empty log message ***

Joe Shochet 25 år sedan
förälder
incheckning
457c73ab21
3 ändrade filer med 6 tillägg och 3 borttagningar
  1. 1 1
      direct/src/fsm/FSM.py
  2. 2 2
      direct/src/showbase/Messenger.py
  3. 3 0
      direct/src/showbase/ShowBase.py

+ 1 - 1
direct/src/fsm/FSM.py

@@ -7,7 +7,7 @@ class FSM(DirectObject):
 
     # create FSM DirectNotify category
     notify = directNotify.newCategory("FSM")
-    # notify.setDebug(1)
+    notify.setDebug(1)
 
     # special methods
     

+ 2 - 2
direct/src/showbase/Messenger.py

@@ -38,7 +38,7 @@ class Messenger:
         """
 
         Messenger.notify.debug('object: ' + `object`
-                  + '\n accept: ' + `event`
+                  + '\n now accepting: ' + `event`
                   + '\n method: ' + `method`
                   + '\n extraArgs: ' + `extraArgs`
                   + '\n persistent: ' + `persistent`)
@@ -52,7 +52,7 @@ class Messenger:
         It is safe to call even if it was not alread
         """
 
-        Messenger.notify.debug(`object` + '\n ignore: ' + `event`)
+        Messenger.notify.debug(`object` + '\n now ignoring: ' + `event`)
             
         if self.dict.has_key(event):
             # Find the dictionary of all the objects accepting this event

+ 3 - 0
direct/src/showbase/ShowBase.py

@@ -18,6 +18,7 @@ import ClockObject
 import Transitions
 import Loader
 import time
+import FSM
 
 globalClock = ClockObject.ClockObject.getGlobalClock()
 
@@ -37,6 +38,8 @@ class ShowBase:
         self.wantStats = self.config.GetBool('want-stats', 0)
 
         taskMgr.taskTimerVerbose = self.config.GetBool('task-timer-verbose', 0)
+        fsmDebug = self.config.GetBool('fsm-debug', 0)
+        FSM.FSM.notify.setDebug(fsmDebug)
 
         self.initialState = NodeAttributes()
         # Set a default "off color" (i.e. use poly color) for color transitions