Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-09-19 05:33:08 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-09-19 05:33:08 +0400
commitfd5f3e13d2f86f0f344422c773df85d0c3e6df32 (patch)
tree8f55d1124aa01fcdfb847dedd1396e941060dae5 /source/gameengine/Ketsji/KX_TrackToActuator.cpp
parentd70197262b3bf22388673b5b8fc96af969875d50 (diff)
Convert and use actuators with no target object set.
Certain actuators (Add Object/Replace Mesh/Scene/Track To) used to always require a target, or they would not influence the scene. If the actuator target is always set from Python, this could be annoying.
Diffstat (limited to 'source/gameengine/Ketsji/KX_TrackToActuator.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
index 7a0d0ad630f..6880ac5d683 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
@@ -427,6 +427,9 @@ char KX_TrackToActuator::GetObject_doc[] =
"\tReturns the object to track with the parent of this actuator.\n";
PyObject* KX_TrackToActuator::PyGetObject(PyObject* self, PyObject* args, PyObject* kwds)
{
+ if (!m_object)
+ Py_Return;
+
return PyString_FromString(m_object->GetName());
}