xAgeSDLBoolRespond confusion (bug?)
Posted: Thu Jul 25, 2013 9:40 am
xAgeSDLBoolRespond class definition:
Now, D'Lanor mentioned that ptResponder when it initializes sets self.sceneobject to None.
( viewtopic.php?p=48943#p48943 )
But self.sceneobject is used in the code, for example here:
So, wouldn't this cause PtDebugPrint to fail writing the sceneobject name?
Not sure if this is a bug and the class definition should read
or am I getting something wrong here?
- Code: Select all
class xAgeSDLBoolRespond(ptResponder):
"""Runs a given responder based on the value of an SDL boolean"""
def __init__(self):
ptResponder.__init__(self)
[..]
Now, D'Lanor mentioned that ptResponder when it initializes sets self.sceneobject to None.
D'Lanor wrote:ptResponder is derived from ptModifier. The only difference is that ptResponder when it initializes sets self.sceneobject to None. This is only relevant for the BuiltIn prp file. Anywhere else pythonfile mods are attached to scene objects. So in effect it makes no difference which one you use.
( viewtopic.php?p=48943#p48943 )
But self.sceneobject is used in the code, for example here:
- Code: Select all
ageSDL = PtGetAgeSDL()
if not ageSDL:
PtDebugPrint("xAgeSDLBoolRespond._Initialize():\tAgeSDL is None. Initing %s to its default" % self.sceneobject.getName())
self._Execute(defaultValue.value, initFastFwd.value)
return
So, wouldn't this cause PtDebugPrint to fail writing the sceneobject name?
Not sure if this is a bug and the class definition should read
- Code: Select all
class xAgeSDLBoolRespond(ptModifier):
"""Runs a given responder based on the value of an SDL boolean"""
def __init__(self):
ptModifier.__init__(self)
[..]
or am I getting something wrong here?