direct: Backport assorted fixes from master

This commit is contained in:
rdb 2023-02-24 22:20:01 +01:00
parent 6cfa73d268
commit 79ba760319
4 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,5 @@
from panda3d.core import *
# Leave these imports in, they may be used by ptf files.
from panda3d.core import *
from panda3d.physics import *
from . import Particles
from . import ForceGroup

View File

@ -1827,7 +1827,7 @@ class DelayedCall:
self._removeDoLater()
def finish(self):
if not self._finished:
self._doCallback()
self._doCallback(None)
self.destroy()
def _addDoLater(self):
taskMgr.doMethodLater(self._delay, self._doCallback, self._taskName)

View File

@ -44,7 +44,8 @@ class TaskThreaded:
self.ignoreAll()
def getTimeslice(self):
return self.___timeslice
return self.__timeslice
def setTimeslice(self, timeslice):
self.__timeslice = timeslice

View File

@ -219,7 +219,7 @@ class SequenceInspector(Inspector):
if partNumber == 0:
return self.object
index = self.privatePartNumber(partNumber)
if type(index) == IntType:
if isinstance(index, int):
return self.object[index]
else:
return getattr(self.object, index)