浏览代码

Fix use of deprecated NodePath.id()

rdb 11 年之前
父节点
当前提交
4b1c4ff3c8
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      direct/src/directtools/DirectSelection.py

+ 4 - 4
direct/src/directtools/DirectSelection.py

@@ -83,7 +83,7 @@ class SelectedNodePaths(DirectObject):
                     break
                     break
 
 
         # Get this pointer
         # Get this pointer
-        id = nodePath.id()
+        id = nodePath.get_key()
         # First see if its already in the selected dictionary
         # First see if its already in the selected dictionary
         dnp = self.getSelectedDict(id)
         dnp = self.getSelectedDict(id)
         # If so, deselect it
         # If so, deselect it
@@ -104,7 +104,7 @@ class SelectedNodePaths(DirectObject):
                 # Show its bounding box
                 # Show its bounding box
                 dnp.highlight(fRecompute = 0)
                 dnp.highlight(fRecompute = 0)
             # Add it to the selected dictionary
             # Add it to the selected dictionary
-            self.selectedDict[dnp.id()] = dnp
+            self.selectedDict[dnp.get_key()] = dnp
             self.selectedList.append(dnp) # [gjeon]
             self.selectedList.append(dnp) # [gjeon]
 
 
         # And update last
         # And update last
@@ -117,7 +117,7 @@ class SelectedNodePaths(DirectObject):
     def deselect(self, nodePath):
     def deselect(self, nodePath):
         """ Deselect the specified node path """
         """ Deselect the specified node path """
         # Get this pointer
         # Get this pointer
-        id = nodePath.id()
+        id = nodePath.get_key()
         # See if it is in the selected dictionary
         # See if it is in the selected dictionary
         dnp = self.getSelectedDict(id)
         dnp = self.getSelectedDict(id)
         if dnp:
         if dnp:
@@ -240,7 +240,7 @@ class SelectedNodePaths(DirectObject):
 
 
     def getDirectNodePath(self, nodePath):
     def getDirectNodePath(self, nodePath):
         # Get this pointer
         # Get this pointer
-        id = nodePath.id()
+        id = nodePath.get_key()
         # First check selected dict
         # First check selected dict
         dnp = self.getSelectedDict(id)
         dnp = self.getSelectedDict(id)
         if dnp:
         if dnp: