I need to change the object to which a Camera Actuator is bounded to
from a Python script. However, KX_CameraActuator objects does not
have such attribute or method accessible from Python.
1. Is it possible to have it added to a further release of Blender?
2. Is there another way to acheive my goal?
Thanks.
KX_CameraActuator: changing parameters from python script
Moderators: jesterKing, stiv
I thought I would give it a tryalien-xmp wrote: This is quite easy for someone wanting to get into Blender game engine coding.

camera patch
let me know if its up to standard

Awesome! I'll apply the patch after the 2.36 cvs is unfrozen.
Only two comments:
1. Any nonzero value is valid as true, so I changed it to:
2. And the python doc needs to be updated. 
Only two comments:
Code: Select all
PyObject* KX_CameraActuator::PySetXY(PyObject* self,
PyObject* args,
PyObject* kwds)
{
bool value;
if(!PyArg_ParseTuple(args,"i", &value))
{
return NULL;
}
value == 1 ? m_x = true : m_x = false;
Py_Return;
}
Code: Select all
PyObject* KX_CameraActuator::PySetXY(PyObject* self,
PyObject* args,
PyObject* kwds)
{
int value;
if(PyArg_ParseTuple(args,"i", &value))
{
m_x = value != 0;
Py_Return;
}
return NULL;
}
