Name attributes added since 2.48a more consistently.

BL_ActionActuator::blendin -> blendIn
BL_ActionActuator::end -> frameEnd
BL_ActionActuator::property -> propName
BL_ActionActuator::start -> frameStart
BL_ActionActuator::type -> mode
BL_ShapeActionActuator::blendin -> blendIn
BL_ShapeActionActuator::end -> frameEnd
BL_ShapeActionActuator::frameProperty -> framePropName
BL_ShapeActionActuator::property -> propName
BL_ShapeActionActuator::start -> frameStart
BL_ShapeActionActuator::type -> mode
KX_CameraActuator::xy -> useXY
KX_ConstraintActuator::property -> propName
KX_GameActuator::file -> fileName
KX_GameObject::localScaling -> localScaling
KX_GameObject::worldScaling -> worldScaling
KX_IpoActuator::endFrame -> frameEnd
KX_IpoActuator::startFrame -> frameStart
KX_IpoActuator::type -> mode
KX_RaySensor::property -> propName
KX_SCA_DynamicActuator::operation -> mode
KX_Scene::objects_inactive -> objectsInactive
KX_SoundActuator::filename -> fileName
KX_SoundActuator::type -> mode
KX_TouchSensor::objectHit -> hitObject
KX_TouchSensor::objectHitList -> hitObjectList
KX_TouchSensor::property -> propName
KX_TouchSensor::pulseCollisions -> usePulseCollision
KX_VisibilityActuator::occlusion -> useOcclusion
KX_VisibilityActuator::recursion -> useRecursion
SCA_2DFilterActuator::passNb -> passNumber
SCA_PropertyActuator::property -> propName
SCA_PropertyActuator::type -> mode
SCA_PropertySensor::property -> propName
SCA_PropertySensor::type -> mode
SCA_RandomActuator::property -> propName
This commit is contained in:
Campbell Barton 2009-05-15 03:26:53 +00:00
parent e8c0440660
commit b8657fd648
20 changed files with 324 additions and 283 deletions

@ -997,17 +997,17 @@ PyMethodDef BL_ActionActuator::Methods[] = {
};
PyAttributeDef BL_ActionActuator::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RW("start", 0, MAXFRAMEF, BL_ActionActuator, m_startframe),
KX_PYATTRIBUTE_FLOAT_RW("end", 0, MAXFRAMEF, BL_ActionActuator, m_endframe),
KX_PYATTRIBUTE_FLOAT_RW("blendin", 0, MAXFRAMEF, BL_ActionActuator, m_blendin),
KX_PYATTRIBUTE_FLOAT_RW("frameStart", 0, MAXFRAMEF, BL_ActionActuator, m_startframe),
KX_PYATTRIBUTE_FLOAT_RW("frameEnd", 0, MAXFRAMEF, BL_ActionActuator, m_endframe),
KX_PYATTRIBUTE_FLOAT_RW("blendIn", 0, MAXFRAMEF, BL_ActionActuator, m_blendin),
KX_PYATTRIBUTE_RW_FUNCTION("action", BL_ActionActuator, pyattr_get_action, pyattr_set_action),
KX_PYATTRIBUTE_SHORT_RW("priority", 0, 100, false, BL_ActionActuator, m_priority),
KX_PYATTRIBUTE_FLOAT_RW_CHECK("frame", 0, MAXFRAMEF, BL_ActionActuator, m_localtime, CheckFrame),
KX_PYATTRIBUTE_STRING_RW("property", 0, 31, false, BL_ActionActuator, m_propname),
KX_PYATTRIBUTE_STRING_RW("frameProperty", 0, 31, false, BL_ActionActuator, m_framepropname),
KX_PYATTRIBUTE_STRING_RW("propName", 0, 31, false, BL_ActionActuator, m_propname),
KX_PYATTRIBUTE_STRING_RW("framePropName", 0, 31, false, BL_ActionActuator, m_framepropname),
KX_PYATTRIBUTE_BOOL_RW("useContinue", BL_ActionActuator, m_end_reset),
KX_PYATTRIBUTE_FLOAT_RW_CHECK("blendTime", 0, MAXFRAMEF, BL_ActionActuator, m_blendframe, CheckBlendTime),
KX_PYATTRIBUTE_SHORT_RW_CHECK("type",0,100,false,BL_ActionActuator,m_playtype,CheckType),
KX_PYATTRIBUTE_SHORT_RW_CHECK("mode",0,100,false,BL_ActionActuator,m_playtype,CheckType),
{ NULL } //Sentinel
};

@ -467,16 +467,16 @@ PyMethodDef BL_ShapeActionActuator::Methods[] = {
};
PyAttributeDef BL_ShapeActionActuator::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RW("start", 0, MAXFRAMEF, BL_ShapeActionActuator, m_startframe),
KX_PYATTRIBUTE_FLOAT_RW("end", 0, MAXFRAMEF, BL_ShapeActionActuator, m_endframe),
KX_PYATTRIBUTE_FLOAT_RW("blendin", 0, MAXFRAMEF, BL_ShapeActionActuator, m_blendin),
KX_PYATTRIBUTE_FLOAT_RW("frameStart", 0, MAXFRAMEF, BL_ShapeActionActuator, m_startframe),
KX_PYATTRIBUTE_FLOAT_RW("frameEnd", 0, MAXFRAMEF, BL_ShapeActionActuator, m_endframe),
KX_PYATTRIBUTE_FLOAT_RW("blendIn", 0, MAXFRAMEF, BL_ShapeActionActuator, m_blendin),
KX_PYATTRIBUTE_RW_FUNCTION("action", BL_ShapeActionActuator, pyattr_get_action, pyattr_set_action),
KX_PYATTRIBUTE_SHORT_RW("priority", 0, 100, false, BL_ShapeActionActuator, m_priority),
KX_PYATTRIBUTE_FLOAT_RW_CHECK("frame", 0, MAXFRAMEF, BL_ShapeActionActuator, m_localtime, CheckFrame),
KX_PYATTRIBUTE_STRING_RW("property", 0, 31, false, BL_ShapeActionActuator, m_propname),
KX_PYATTRIBUTE_STRING_RW("frameProperty", 0, 31, false, BL_ShapeActionActuator, m_framepropname),
KX_PYATTRIBUTE_STRING_RW("propName", 0, 31, false, BL_ShapeActionActuator, m_propname),
KX_PYATTRIBUTE_STRING_RW("framePropName", 0, 31, false, BL_ShapeActionActuator, m_framepropname),
KX_PYATTRIBUTE_FLOAT_RW_CHECK("blendTime", 0, MAXFRAMEF, BL_ShapeActionActuator, m_blendframe, CheckBlendTime),
KX_PYATTRIBUTE_SHORT_RW_CHECK("type",0,100,false,BL_ShapeActionActuator,m_playtype,CheckType),
KX_PYATTRIBUTE_SHORT_RW_CHECK("mode",0,100,false,BL_ShapeActionActuator,m_playtype,CheckType),
{ NULL } //Sentinel
};

@ -149,8 +149,8 @@ PyMethodDef SCA_2DFilterActuator::Methods[] = {
PyAttributeDef SCA_2DFilterActuator::Attributes[] = {
KX_PYATTRIBUTE_STRING_RW("shaderText", 0, 64000, false, SCA_2DFilterActuator, m_shaderText),
KX_PYATTRIBUTE_SHORT_RW("disableMotionBlur", 0, 1, true, SCA_2DFilterActuator, m_disableMotionBlur),
KX_PYATTRIBUTE_ENUM_RW("type",RAS_2DFilterManager::RAS_2DFILTER_ENABLED,RAS_2DFilterManager::RAS_2DFILTER_NUMBER_OF_FILTERS,false,SCA_2DFilterActuator,m_type),
KX_PYATTRIBUTE_INT_RW("passNb", 0, 100, true, SCA_2DFilterActuator, m_int_arg),
KX_PYATTRIBUTE_ENUM_RW("mode",RAS_2DFilterManager::RAS_2DFILTER_ENABLED,RAS_2DFilterManager::RAS_2DFILTER_NUMBER_OF_FILTERS,false,SCA_2DFilterActuator,m_type),
KX_PYATTRIBUTE_INT_RW("passNumber", 0, 100, true, SCA_2DFilterActuator, m_int_arg),
KX_PYATTRIBUTE_FLOAT_RW("value", 0.0, 100.0, SCA_2DFilterActuator, m_float_arg),
{ NULL } //Sentinel
};

@ -270,9 +270,9 @@ PyMethodDef SCA_PropertyActuator::Methods[] = {
};
PyAttributeDef SCA_PropertyActuator::Attributes[] = {
KX_PYATTRIBUTE_STRING_RW_CHECK("property",0,100,false,SCA_PropertyActuator,m_propname,CheckProperty),
KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,100,false,SCA_PropertyActuator,m_propname,CheckProperty),
KX_PYATTRIBUTE_STRING_RW("value",0,100,false,SCA_PropertyActuator,m_exprtxt),
KX_PYATTRIBUTE_INT_RW("type", KX_ACT_PROP_NODEF+1, KX_ACT_PROP_MAX-1, false, SCA_PropertyActuator, m_type), /* ATTR_TODO add constents to game logic dict */
KX_PYATTRIBUTE_INT_RW("mode", KX_ACT_PROP_NODEF+1, KX_ACT_PROP_MAX-1, false, SCA_PropertyActuator, m_type), /* ATTR_TODO add constents to game logic dict */
{ NULL } //Sentinel
};
@ -296,7 +296,7 @@ const char SCA_PropertyActuator::SetProperty_doc[] =
"\tof this name, the call is ignored.\n";
PyObject* SCA_PropertyActuator::PySetProperty(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("setProperty()", "the 'property' property");
ShowDeprecationWarning("setProperty()", "the 'propName' property");
/* Check whether the name exists first ! */
char *nameArg;
if (!PyArg_ParseTuple(args, "s:setProperty", &nameArg)) {
@ -321,7 +321,7 @@ const char SCA_PropertyActuator::GetProperty_doc[] =
"\tReturn the property on which the actuator operates.\n";
PyObject* SCA_PropertyActuator::PyGetProperty(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("getProperty()", "the 'property' property");
ShowDeprecationWarning("getProperty()", "the 'propName' property");
return PyString_FromString(m_propname);
}

@ -347,8 +347,8 @@ PyMethodDef SCA_PropertySensor::Methods[] = {
};
PyAttributeDef SCA_PropertySensor::Attributes[] = {
KX_PYATTRIBUTE_INT_RW("type",KX_PROPSENSOR_NODEF,KX_PROPSENSOR_MAX-1,false,SCA_PropertySensor,m_checktype),
KX_PYATTRIBUTE_STRING_RW_CHECK("property",0,100,false,SCA_PropertySensor,m_checkpropname,CheckProperty),
KX_PYATTRIBUTE_INT_RW("mode",KX_PROPSENSOR_NODEF,KX_PROPSENSOR_MAX-1,false,SCA_PropertySensor,m_checktype),
KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,100,false,SCA_PropertySensor,m_checkpropname,CheckProperty),
KX_PYATTRIBUTE_STRING_RW_CHECK("value",0,100,false,SCA_PropertySensor,m_checkpropval,validValueForProperty),
{ NULL } //Sentinel
};
@ -372,7 +372,7 @@ const char SCA_PropertySensor::GetType_doc[] =
"\tReturns the type of check this sensor performs.\n";
PyObject* SCA_PropertySensor::PyGetType()
{
ShowDeprecationWarning("getType()", "the type property");
ShowDeprecationWarning("getType()", "the mode property");
return PyInt_FromLong(m_checktype);
}
@ -385,7 +385,7 @@ const char SCA_PropertySensor::SetType_doc[] =
"\tSet the type of check to perform.\n";
PyObject* SCA_PropertySensor::PySetType(PyObject* args)
{
ShowDeprecationWarning("setType()", "the type property");
ShowDeprecationWarning("setType()", "the mode property");
int typeArg;
if (!PyArg_ParseTuple(args, "i:setType", &typeArg)) {
@ -406,7 +406,7 @@ const char SCA_PropertySensor::GetProperty_doc[] =
"\tReturn the property with which the sensor operates.\n";
PyObject* SCA_PropertySensor::PyGetProperty()
{
ShowDeprecationWarning("getProperty()", "the 'property' property");
ShowDeprecationWarning("getProperty()", "the 'propName' property");
return PyString_FromString(m_checkpropname);
}
@ -418,7 +418,7 @@ const char SCA_PropertySensor::SetProperty_doc[] =
"\tof this name, the call is ignored.\n";
PyObject* SCA_PropertySensor::PySetProperty(PyObject* args)
{
ShowDeprecationWarning("setProperty()", "the 'property' property");
ShowDeprecationWarning("setProperty()", "the 'propName' property");
/* We should query whether the name exists. Or should we create a prop */
/* on the fly? */
char *propNameArg = NULL;

@ -370,7 +370,7 @@ PyAttributeDef SCA_RandomActuator::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RO("para1",SCA_RandomActuator,m_parameter1),
KX_PYATTRIBUTE_FLOAT_RO("para2",SCA_RandomActuator,m_parameter2),
KX_PYATTRIBUTE_ENUM_RO("distribution",SCA_RandomActuator,m_distribution),
KX_PYATTRIBUTE_STRING_RW_CHECK("property",0,100,false,SCA_RandomActuator,m_propname,CheckProperty),
KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,100,false,SCA_RandomActuator,m_propname,CheckProperty),
KX_PYATTRIBUTE_RW_FUNCTION("seed",SCA_RandomActuator,pyattr_get_seed,pyattr_set_seed),
{ NULL } //Sentinel
};
@ -477,7 +477,7 @@ const char SCA_RandomActuator::SetProperty_doc[] =
"\tSet the property to which the random value is assigned. If the \n"
"\tgenerator and property types do not match, the assignment is ignored.\n";
PyObject* SCA_RandomActuator::PySetProperty(PyObject* args) {
ShowDeprecationWarning("setProperty()", "the 'property' property");
ShowDeprecationWarning("setProperty()", "the 'propName' property");
char *nameArg;
if (!PyArg_ParseTuple(args, "s:setProperty", &nameArg)) {
return NULL;
@ -501,7 +501,7 @@ const char SCA_RandomActuator::GetProperty_doc[] =
"\tgenerator and property types do not match, the assignment is ignored.\n";
PyObject* SCA_RandomActuator::PyGetProperty()
{
ShowDeprecationWarning("getProperty()", "the 'property' property");
ShowDeprecationWarning("getProperty()", "the 'propName' property");
return PyString_FromString(m_propname);
}

@ -419,7 +419,7 @@ PyAttributeDef KX_CameraActuator::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RW("min",-MAXFLOAT,MAXFLOAT,KX_CameraActuator,m_minHeight),
KX_PYATTRIBUTE_FLOAT_RW("max",-MAXFLOAT,MAXFLOAT,KX_CameraActuator,m_maxHeight),
KX_PYATTRIBUTE_FLOAT_RW("height",-MAXFLOAT,MAXFLOAT,KX_CameraActuator,m_height),
KX_PYATTRIBUTE_BOOL_RW("xy",KX_CameraActuator,m_x),
KX_PYATTRIBUTE_BOOL_RW("useXY",KX_CameraActuator,m_x),
KX_PYATTRIBUTE_RW_FUNCTION("object", KX_CameraActuator, pyattr_get_object, pyattr_set_object),
{NULL}
};
@ -561,7 +561,7 @@ const char KX_CameraActuator::SetXY_doc[] =
"\t1=x, 0=y\n";
PyObject* KX_CameraActuator::PySetXY(PyObject* args)
{
ShowDeprecationWarning("setXY()", "the xy property");
ShowDeprecationWarning("setXY()", "the useXY property");
int value;
if(PyArg_ParseTuple(args,"i:setXY", &value))
{

@ -631,7 +631,7 @@ PyAttributeDef KX_ConstraintActuator::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_ARRAY_RW_CHECK("direction",-MAXFLOAT,MAXFLOAT,KX_ConstraintActuator,m_refDirection,3,pyattr_check_direction),
KX_PYATTRIBUTE_INT_RW("option",0,0xFFFF,false,KX_ConstraintActuator,m_option),
KX_PYATTRIBUTE_INT_RW("time",0,1000,true,KX_ConstraintActuator,m_activeTime),
KX_PYATTRIBUTE_STRING_RW("property",0,32,true,KX_ConstraintActuator,m_property),
KX_PYATTRIBUTE_STRING_RW("propName",0,32,true,KX_ConstraintActuator,m_property),
KX_PYATTRIBUTE_FLOAT_RW("min",-MAXFLOAT,MAXFLOAT,KX_ConstraintActuator,m_minimumBound),
KX_PYATTRIBUTE_FLOAT_RW("distance",-MAXFLOAT,MAXFLOAT,KX_ConstraintActuator,m_minimumBound),
KX_PYATTRIBUTE_FLOAT_RW("max",-MAXFLOAT,MAXFLOAT,KX_ConstraintActuator,m_maximumBound),

@ -252,7 +252,7 @@ PyMethodDef KX_GameActuator::Methods[] =
};
PyAttributeDef KX_GameActuator::Attributes[] = {
KX_PYATTRIBUTE_STRING_RW("file",0,100,false,KX_GameActuator,m_filename),
KX_PYATTRIBUTE_STRING_RW("fileName",0,100,false,KX_GameActuator,m_filename),
KX_PYATTRIBUTE_INT_RW("mode", KX_GAME_NODEF+1, KX_GAME_MAX-1, true, KX_GameActuator, m_mode),
{ NULL } //Sentinel
};
@ -279,7 +279,7 @@ const char KX_GameActuator::GetFile_doc[] =
"get the name of the file to start.\n";
PyObject* KX_GameActuator::PyGetFile(PyObject* args, PyObject* kwds)
{
ShowDeprecationWarning("getFile()", "the file property");
ShowDeprecationWarning("getFile()", "the fileName property");
return PyString_FromString(m_filename);
}
@ -291,7 +291,7 @@ PyObject* KX_GameActuator::PySetFile(PyObject* args, PyObject* kwds)
{
char* new_file;
ShowDeprecationWarning("setFile()", "the file property");
ShowDeprecationWarning("setFile()", "the fileName property");
if (!PyArg_ParseTuple(args, "s:setFile", &new_file))
{

@ -1197,8 +1197,8 @@ PyAttributeDef KX_GameObject::Attributes[] = {
KX_PYATTRIBUTE_RW_FUNCTION("worldOrientation",KX_GameObject,pyattr_get_worldOrientation,pyattr_set_worldOrientation),
KX_PYATTRIBUTE_RW_FUNCTION("localPosition", KX_GameObject, pyattr_get_localPosition, pyattr_set_localPosition),
KX_PYATTRIBUTE_RW_FUNCTION("worldPosition", KX_GameObject, pyattr_get_worldPosition, pyattr_set_worldPosition),
KX_PYATTRIBUTE_RW_FUNCTION("localScaling", KX_GameObject, pyattr_get_localScaling, pyattr_set_localScaling),
KX_PYATTRIBUTE_RO_FUNCTION("worldScaling", KX_GameObject, pyattr_get_worldScaling),
KX_PYATTRIBUTE_RW_FUNCTION("localScale", KX_GameObject, pyattr_get_localScaling, pyattr_set_localScaling),
KX_PYATTRIBUTE_RO_FUNCTION("worldScale", KX_GameObject, pyattr_get_worldScaling),
KX_PYATTRIBUTE_RO_FUNCTION("attrDict", KX_GameObject, pyattr_get_attrDict),
/* Experemental, dont rely on these yet */

@ -445,9 +445,8 @@ PyParentObject KX_IpoActuator::Parents[] = {
};
PyMethodDef KX_IpoActuator::Methods[] = {
{"set", (PyCFunction) KX_IpoActuator::sPySet, METH_VARARGS, (PY_METHODCHAR)Set_doc},
// deprecated
{"set", (PyCFunction) KX_IpoActuator::sPySet, METH_VARARGS, (PY_METHODCHAR)Set_doc},
{"setProperty", (PyCFunction) KX_IpoActuator::sPySetProperty, METH_VARARGS, (PY_METHODCHAR)SetProperty_doc},
{"setStart", (PyCFunction) KX_IpoActuator::sPySetStart, METH_VARARGS, (PY_METHODCHAR)SetStart_doc},
{"getStart", (PyCFunction) KX_IpoActuator::sPyGetStart, METH_NOARGS, (PY_METHODCHAR)GetStart_doc},
@ -465,11 +464,11 @@ PyMethodDef KX_IpoActuator::Methods[] = {
};
PyAttributeDef KX_IpoActuator::Attributes[] = {
KX_PYATTRIBUTE_FLOAT_RW("startFrame", 0, 300000, KX_IpoActuator, m_startframe),
KX_PYATTRIBUTE_FLOAT_RW("endFrame", 0, 300000, KX_IpoActuator, m_endframe),
KX_PYATTRIBUTE_FLOAT_RW("frameStart", 0, 300000, KX_IpoActuator, m_startframe),
KX_PYATTRIBUTE_FLOAT_RW("frameEnd", 0, 300000, KX_IpoActuator, m_endframe),
KX_PYATTRIBUTE_STRING_RW("propName", 0, 64, false, KX_IpoActuator, m_propname),
KX_PYATTRIBUTE_STRING_RW("framePropName", 0, 64, false, KX_IpoActuator, m_framepropname),
KX_PYATTRIBUTE_INT_RW("type", KX_ACT_IPO_NODEF+1, KX_ACT_IPO_MAX-1, true, KX_IpoActuator, m_type),
KX_PYATTRIBUTE_INT_RW("mode", KX_ACT_IPO_NODEF+1, KX_ACT_IPO_MAX-1, true, KX_IpoActuator, m_type),
KX_PYATTRIBUTE_BOOL_RW("useIpoAsForce", KX_IpoActuator, m_ipo_as_force),
KX_PYATTRIBUTE_BOOL_RW("useIpoAdd", KX_IpoActuator, m_ipo_add),
KX_PYATTRIBUTE_BOOL_RW("useIpoLocal", KX_IpoActuator, m_ipo_local),
@ -501,7 +500,7 @@ const char KX_IpoActuator::Set_doc[] =
"\tSet the properties of the actuator.\n";
PyObject* KX_IpoActuator::PySet(PyObject* args) {
ShowDeprecationWarning("set()", "a number properties");
ShowDeprecationWarning("set()", "a range properties");
/* sets modes PLAY, PINGPONG, FLIPPER, LOOPSTOP, LOOPEND */
/* arg 1 = mode string, arg 2 = startframe, arg3 = stopframe, */
@ -563,7 +562,7 @@ const char KX_IpoActuator::SetStart_doc[] =
"\tSet the frame from which the ipo starts playing.\n";
PyObject* KX_IpoActuator::PySetStart(PyObject* args) {
ShowDeprecationWarning("setStart()", "the startFrame property");
ShowDeprecationWarning("setStart()", "the frameStart property");
float startArg;
if(!PyArg_ParseTuple(args, "f:setStart", &startArg)) {
@ -579,7 +578,7 @@ const char KX_IpoActuator::GetStart_doc[] =
"getStart()\n"
"\tReturns the frame from which the ipo starts playing.\n";
PyObject* KX_IpoActuator::PyGetStart() {
ShowDeprecationWarning("getStart()", "the startFrame property");
ShowDeprecationWarning("getStart()", "the frameStart property");
return PyFloat_FromDouble(m_startframe);
}
@ -589,7 +588,7 @@ const char KX_IpoActuator::SetEnd_doc[] =
"\t - frame: last frame to use (int)\n"
"\tSet the frame at which the ipo stops playing.\n";
PyObject* KX_IpoActuator::PySetEnd(PyObject* args) {
ShowDeprecationWarning("setEnd()", "the endFrame property");
ShowDeprecationWarning("setEnd()", "the frameEnd property");
float endArg;
if(!PyArg_ParseTuple(args, "f:setEnd", &endArg)) {
return NULL;
@ -604,7 +603,7 @@ const char KX_IpoActuator::GetEnd_doc[] =
"getEnd()\n"
"\tReturns the frame at which the ipo stops playing.\n";
PyObject* KX_IpoActuator::PyGetEnd() {
ShowDeprecationWarning("getEnd()", "the endFrame property");
ShowDeprecationWarning("getEnd()", "the frameEnd property");
return PyFloat_FromDouble(m_endframe);
}
@ -670,7 +669,7 @@ const char KX_IpoActuator::SetType_doc[] =
"\t - mode: Play, PingPong, Flipper, LoopStop, LoopEnd or FromProp (string)\n"
"\tSet the operation mode of the actuator.\n";
PyObject* KX_IpoActuator::PySetType(PyObject* args) {
ShowDeprecationWarning("setType()", "the type property");
ShowDeprecationWarning("setType()", "the mode property");
int typeArg;
if (!PyArg_ParseTuple(args, "i:setType", &typeArg)) {
@ -689,7 +688,7 @@ const char KX_IpoActuator::GetType_doc[] =
"getType()\n"
"\tReturns the operation mode of the actuator.\n";
PyObject* KX_IpoActuator::PyGetType() {
ShowDeprecationWarning("getType()", "the type property");
ShowDeprecationWarning("getType()", "the mode property");
return PyInt_FromLong(m_type);
}

@ -366,7 +366,7 @@ PyAttributeDef KX_RaySensor::Attributes[] = {
KX_PYATTRIBUTE_BOOL_RW("useMaterial", KX_RaySensor, m_bFindMaterial),
KX_PYATTRIBUTE_BOOL_RW("useXRay", KX_RaySensor, m_bXRay),
KX_PYATTRIBUTE_FLOAT_RW("range", 0, 10000, KX_RaySensor, m_distance),
KX_PYATTRIBUTE_STRING_RW("property", 0, 100, false, KX_RaySensor, m_propertyname),
KX_PYATTRIBUTE_STRING_RW("propName", 0, 100, false, KX_RaySensor, m_propertyname),
KX_PYATTRIBUTE_INT_RW("axis", 0, 5, true, KX_RaySensor, m_axis),
KX_PYATTRIBUTE_FLOAT_ARRAY_RO("hitPosition", KX_RaySensor, m_hitPosition, 3),
KX_PYATTRIBUTE_FLOAT_ARRAY_RO("rayDirection", KX_RaySensor, m_rayDirection, 3),

@ -91,7 +91,7 @@ PyMethodDef KX_SCA_DynamicActuator::Methods[] = {
};
PyAttributeDef KX_SCA_DynamicActuator::Attributes[] = {
KX_PYATTRIBUTE_SHORT_RW("operation",0,4,false,KX_SCA_DynamicActuator,m_dyn_operation),
KX_PYATTRIBUTE_SHORT_RW("mode",0,4,false,KX_SCA_DynamicActuator,m_dyn_operation),
KX_PYATTRIBUTE_FLOAT_RW("mass",0.0,MAXFLOAT,KX_SCA_DynamicActuator,m_setmass),
{ NULL } //Sentinel
};
@ -122,7 +122,7 @@ KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, setOperation,
"\t 3 = disable rigid body\n"
"Change the dynamic status of the parent object.\n")
{
ShowDeprecationWarning("setOperation()", "the operation property");
ShowDeprecationWarning("setOperation()", "the mode property");
int dyn_operation;
if (!PyArg_ParseTuple(args, "i:setOperation", &dyn_operation))
@ -142,7 +142,7 @@ KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, getOperation,
"Returns the operation type of this actuator.\n"
)
{
ShowDeprecationWarning("getOperation()", "the operation property");
ShowDeprecationWarning("getOperation()", "the mode property");
return PyInt_FromLong((long)m_dyn_operation);
}

@ -1720,7 +1720,7 @@ int KX_Scene::pyattr_set_active_camera(void *self_v, const KX_PYATTRIBUTE_DEF *a
PyAttributeDef KX_Scene::Attributes[] = {
KX_PYATTRIBUTE_RO_FUNCTION("name", KX_Scene, pyattr_get_name),
KX_PYATTRIBUTE_RO_FUNCTION("objects", KX_Scene, pyattr_get_objects),
KX_PYATTRIBUTE_RO_FUNCTION("objects_inactive", KX_Scene, pyattr_get_objects_inactive), KX_PYATTRIBUTE_RO_FUNCTION("lights", KX_Scene, pyattr_get_lights),
KX_PYATTRIBUTE_RO_FUNCTION("objectsInactive", KX_Scene, pyattr_get_objects_inactive), KX_PYATTRIBUTE_RO_FUNCTION("lights", KX_Scene, pyattr_get_lights),
KX_PYATTRIBUTE_RO_FUNCTION("cameras", KX_Scene, pyattr_get_cameras),
KX_PYATTRIBUTE_RO_FUNCTION("lights", KX_Scene, pyattr_get_lights),
KX_PYATTRIBUTE_RW_FUNCTION("active_camera", KX_Scene, pyattr_get_active_camera, pyattr_set_active_camera),

@ -295,7 +295,7 @@ PyMethodDef KX_SoundActuator::Methods[] = {
};
PyAttributeDef KX_SoundActuator::Attributes[] = {
KX_PYATTRIBUTE_RW_FUNCTION("filename", KX_SoundActuator, pyattr_get_filename, pyattr_set_filename),
KX_PYATTRIBUTE_RW_FUNCTION("fileName", KX_SoundActuator, pyattr_get_filename, pyattr_set_filename),
KX_PYATTRIBUTE_RW_FUNCTION("volume", KX_SoundActuator, pyattr_get_gain, pyattr_set_gain),
KX_PYATTRIBUTE_RW_FUNCTION("pitch", KX_SoundActuator, pyattr_get_pitch, pyattr_set_pitch),
KX_PYATTRIBUTE_RW_FUNCTION("rollOffFactor", KX_SoundActuator, pyattr_get_rollOffFactor, pyattr_set_rollOffFactor),
@ -303,7 +303,7 @@ PyAttributeDef KX_SoundActuator::Attributes[] = {
KX_PYATTRIBUTE_RW_FUNCTION("position", KX_SoundActuator, pyattr_get_position, pyattr_set_position),
KX_PYATTRIBUTE_RW_FUNCTION("velocity", KX_SoundActuator, pyattr_get_velocity, pyattr_set_velocity),
KX_PYATTRIBUTE_RW_FUNCTION("orientation", KX_SoundActuator, pyattr_get_orientation, pyattr_set_orientation),
KX_PYATTRIBUTE_ENUM_RW("type",KX_SoundActuator::KX_SOUNDACT_NODEF+1,KX_SoundActuator::KX_SOUNDACT_MAX-1,false,KX_SoundActuator,m_type),
KX_PYATTRIBUTE_ENUM_RW("mode",KX_SoundActuator::KX_SOUNDACT_NODEF+1,KX_SoundActuator::KX_SOUNDACT_MAX-1,false,KX_SoundActuator,m_type),
{ NULL } //Sentinel
};
@ -364,7 +364,7 @@ PyObject* KX_SoundActuator::pyattr_get_filename(void *self, const struct KX_PYAT
char* name = objectname.Ptr();
if (!name) {
PyErr_SetString(PyExc_RuntimeError, "value = actuator.filename: KX_SoundActuator, unable to get sound filename");
PyErr_SetString(PyExc_RuntimeError, "value = actuator.fileName: KX_SoundActuator, unable to get sound fileName");
return NULL;
} else
return PyString_FromString(name);
@ -565,7 +565,7 @@ int KX_SoundActuator::pyattr_set_orientation(void *self, const struct KX_PYATTRI
PyObject* KX_SoundActuator::PySetFilename(PyObject* args)
{
char *soundName = NULL;
ShowDeprecationWarning("setFilename()", "the filename property");
ShowDeprecationWarning("setFilename()", "the fileName property");
// void *soundPointer = NULL; /*unused*/
if (!PyArg_ParseTuple(args, "s", &soundName))
@ -576,7 +576,7 @@ PyObject* KX_SoundActuator::PySetFilename(PyObject* args)
PyObject* KX_SoundActuator::PyGetFilename()
{
ShowDeprecationWarning("getFilename()", "the filename property");
ShowDeprecationWarning("getFilename()", "the fileName property");
if (!m_soundObject)
{
return PyString_FromString("");
@ -585,7 +585,7 @@ PyObject* KX_SoundActuator::PyGetFilename()
char* name = objectname.Ptr();
if (!name) {
PyErr_SetString(PyExc_RuntimeError, "Unable to get sound filename");
PyErr_SetString(PyExc_RuntimeError, "Unable to get sound fileName");
return NULL;
} else
return PyString_FromString(name);
@ -759,7 +759,7 @@ PyObject* KX_SoundActuator::PySetOrientation(PyObject* args)
PyObject* KX_SoundActuator::PySetType(PyObject* args)
{
int typeArg;
ShowDeprecationWarning("setType()", "the type property");
ShowDeprecationWarning("setType()", "the mode property");
if (!PyArg_ParseTuple(args, "i:setType", &typeArg)) {
return NULL;
@ -775,7 +775,7 @@ PyObject* KX_SoundActuator::PySetType(PyObject* args)
PyObject* KX_SoundActuator::PyGetType()
{
ShowDeprecationWarning("getType()", "the type property");
ShowDeprecationWarning("getType()", "the mode property");
return PyInt_FromLong(m_type);
}
// <-----

@ -292,11 +292,11 @@ PyMethodDef KX_TouchSensor::Methods[] = {
};
PyAttributeDef KX_TouchSensor::Attributes[] = {
KX_PYATTRIBUTE_STRING_RW("property",0,100,false,KX_TouchSensor,m_touchedpropname),
KX_PYATTRIBUTE_STRING_RW("propName",0,100,false,KX_TouchSensor,m_touchedpropname),
KX_PYATTRIBUTE_BOOL_RW("useMaterial",KX_TouchSensor,m_bFindMaterial),
KX_PYATTRIBUTE_BOOL_RW("pulseCollisions",KX_TouchSensor,m_bTouchPulse),
KX_PYATTRIBUTE_RO_FUNCTION("objectHit", KX_TouchSensor, pyattr_get_object_hit),
KX_PYATTRIBUTE_RO_FUNCTION("objectHitList", KX_TouchSensor, pyattr_get_object_hit_list),
KX_PYATTRIBUTE_BOOL_RW("usePulseCollision",KX_TouchSensor,m_bTouchPulse),
KX_PYATTRIBUTE_RO_FUNCTION("hitObject", KX_TouchSensor, pyattr_get_object_hit),
KX_PYATTRIBUTE_RO_FUNCTION("hitObjectList", KX_TouchSensor, pyattr_get_object_hit_list),
{ NULL } //Sentinel
};
@ -325,7 +325,7 @@ const char KX_TouchSensor::SetProperty_doc[] =
"\tmaterials.";
PyObject* KX_TouchSensor::PySetProperty(PyObject* value)
{
ShowDeprecationWarning("setProperty()", "the propertyName property");
ShowDeprecationWarning("setProperty()", "the propName property");
char *nameArg= PyString_AsString(value);
if (nameArg==NULL) {
PyErr_SetString(PyExc_ValueError, "expected a ");
@ -342,6 +342,8 @@ const char KX_TouchSensor::GetProperty_doc[] =
"\tgetTouchMaterial() to find out whether this sensor\n"
"\tlooks for properties or materials.";
PyObject* KX_TouchSensor::PyGetProperty() {
ShowDeprecationWarning("getProperty()", "the propName property");
return PyString_FromString(m_touchedpropname);
}
@ -350,7 +352,7 @@ const char KX_TouchSensor::GetHitObject_doc[] =
;
PyObject* KX_TouchSensor::PyGetHitObject()
{
ShowDeprecationWarning("getHitObject()", "the objectHit property");
ShowDeprecationWarning("getHitObject()", "the hitObject property");
/* to do: do Py_IncRef if the object is already known in Python */
/* otherwise, this leaks memory */
if (m_hitObject)
@ -366,7 +368,7 @@ const char KX_TouchSensor::GetHitObjectList_doc[] =
"\tbut only those matching the property/material condition.\n";
PyObject* KX_TouchSensor::PyGetHitObjectList()
{
ShowDeprecationWarning("getHitObjectList()", "the objectHitList property");
ShowDeprecationWarning("getHitObjectList()", "the hitObjectList property");
/* to do: do Py_IncRef if the object is already known in Python */
/* otherwise, this leaks memory */ /* Edit, this seems ok and not to leak memory - Campbell */
return m_colliders->GetProxy();

@ -136,8 +136,8 @@ KX_VisibilityActuator::Methods[] = {
PyAttributeDef KX_VisibilityActuator::Attributes[] = {
KX_PYATTRIBUTE_BOOL_RW("visibility", KX_VisibilityActuator, m_visible),
KX_PYATTRIBUTE_BOOL_RW("occlusion", KX_VisibilityActuator, m_occlusion),
KX_PYATTRIBUTE_BOOL_RW("recursion", KX_VisibilityActuator, m_recursive),
KX_PYATTRIBUTE_BOOL_RW("useOcclusion", KX_VisibilityActuator, m_occlusion),
KX_PYATTRIBUTE_BOOL_RW("useRecursion", KX_VisibilityActuator, m_recursive),
{ NULL } //Sentinel
};

@ -318,6 +318,8 @@ Documentation for the GameLogic Module.
@group Deprecated: addActiveActuator
"""
import GameTypes
# TODO
# globalDict
# error
@ -346,7 +348,7 @@ def addActiveActuator(actuator, activate):
"""
Activates the given actuator.
@deprecated: Use L{SCA_PythonController.activate} and L{SCA_PythonController.deactivate} instead.
@deprecated: Use L{GameTypes.SCA_PythonController.activate} and L{GameTypes.SCA_PythonController.deactivate} instead.
@type actuator: L{SCA_IActuator} or the actuator name as a string.
@type activate: boolean
@param activate: whether to activate or deactivate the given actuator.

File diff suppressed because it is too large Load Diff

@ -51,7 +51,11 @@ if doc_dir not in sys.path:
def check_attribute(class_ob, member):
for l in class_ob.__doc__.split('\n'):
doc = class_ob.__doc__
if not doc:
return False
for l in doc.split('\n'):
l = l.strip()
'''
@ -130,4 +134,3 @@ for mod_name, pymod in mods_dict.iteritems():
sys.path.pop() # remove the pydoc dir from our import paths