Browse Source

Fix merge problem

Mark Mine 22 years ago
parent
commit
38a95c373e
2 changed files with 19 additions and 2 deletions
  1. 17 1
      direct/src/tkpanels/AnimPanel.py
  2. 2 1
      direct/src/tkpanels/DirectSessionPanel.py

+ 17 - 1
direct/src/tkpanels/AnimPanel.py

@@ -113,12 +113,28 @@ class AnimPanel(AppShell):
         index = 0
         index = 0
         self.actorControlList = []
         self.actorControlList = []
         for actor in self['actorList']:
         for actor in self['actorList']:
+            anims = actor.getAnimNames()
+            topAnims = []
+            if 'neutral' in anims:
+                i = anims.index('neutral')
+                del(anims[i])
+                topAnims.append('neutral')
+            if 'walk' in anims:
+                i = anims.index('walk')
+                del(anims[i])
+                topAnims.append('walk')
+            if 'run' in anims:
+                i = anims.index('run')
+                del(anims[i])
+                topAnims.append('run')
+            anims.sort()
+            anims = topAnims + anims
             ac = self.createcomponent(
             ac = self.createcomponent(
                 'actorControl%d' % index, (), 'Actor',
                 'actorControl%d' % index, (), 'Actor',
                 ActorControl, (actorFrame,),
                 ActorControl, (actorFrame,),
                 animPanel = self,
                 animPanel = self,
                 text = actor.getName(),
                 text = actor.getName(),
-                animList = actor.getAnimNames(),
+                animList = anims,
                 actor = actor)
                 actor = actor)
             ac.pack(expand = 1, fill = X)
             ac.pack(expand = 1, fill = X)
             self.actorControlList.append(ac)
             self.actorControlList.append(ac)

+ 2 - 1
direct/src/tkpanels/DirectSessionPanel.py

@@ -2,8 +2,9 @@
 
 
 # Import Tkinter, Pmw, and the dial code
 # Import Tkinter, Pmw, and the dial code
 from PandaObject import *
 from PandaObject import *
-from AppShell import *
 from TkGlobal import *
 from TkGlobal import *
+from AppShell import *
+
 import string
 import string
 import Dial
 import Dial
 import Floater
 import Floater