diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-05-15 07:26:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-05-15 07:26:53 +0400 |
commit | b8657fd64895f9fcf7d5308b298e516c02faf110 (patch) | |
tree | 01909b4c2f38d7baef898ed4335affc772a3973e /source | |
parent | e8c0440660be3523f5d6dda300158225d93145f1 (diff) |
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
Diffstat (limited to 'source')
20 files changed, 324 insertions, 283 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 145cb1f22de..d0a4a87af72 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -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 }; diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index 29bbe9b3d7d..a24d83da90c 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -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 }; diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp index 7682f6755ef..caed85b9938 100644 --- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp +++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp @@ -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 }; diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp index 33dc83506f3..4faa4b55d4a 100644 --- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp +++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp @@ -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); } diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp index 2632cbd3dac..3b343af3cba 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp +++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp @@ -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; diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp index 2db871c77cf..ff957d8350e 100644 --- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp +++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 5f7197e31f1..b87d0ee4283 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -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)) { diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index c9cb8e1b942..6f66faaeafb 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -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), diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp index 9588e14d360..7c18b03906e 100644 --- a/source/gameengine/Ketsji/KX_GameActuator.cpp +++ b/source/gameengine/Ketsji/KX_GameActuator.cpp @@ -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)) { diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index fe9fb8bb583..9196d1e0527 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -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 */ diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index 5e1785e9c21..3ec0598ac03 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index fdde5fdcf7b..78a61e9d95e 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -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), diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp index af5631b4403..3d3bc1265a0 100644 --- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index e3622c211ff..9502599603c 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -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), diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 07a880c950b..3a341f007e4 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -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); } // <----- diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index 2c02d949c63..8c0d5596939 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -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(); diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp index 46a1db9378a..d848065ad73 100644 --- a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp +++ b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp @@ -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 }; diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py index 9b87842f7e0..28fd95611bc 100644 --- a/source/gameengine/PyDoc/GameLogic.py +++ b/source/gameengine/PyDoc/GameLogic.py @@ -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. diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py index 0240efa4eab..d58f9087a9f 100644 --- a/source/gameengine/PyDoc/GameTypes.py +++ b/source/gameengine/PyDoc/GameTypes.py @@ -70,10 +70,9 @@ class SCA_ILogicBrick(CValue): @type owner: L{KX_GameObject} or None in exceptional cases. @ivar name: The name of this logic brick (read-only). @type name: string - @group Deprecated: getOwner, setExecutePriority, getExecutePriority """ - - #--The following methods are deprecated-- + +#{ Deprecated def getOwner(): """ Gets the game object associated with this logic brick. @@ -101,7 +100,7 @@ class SCA_ILogicBrick(CValue): @rtype: integer @return: this logic bricks current priority. """ - +#} class SCA_IObject(CValue): """ @@ -137,7 +136,6 @@ class SCA_ISensor(SCA_ILogicBrick): @type triggered: boolean @ivar positive: True if this sensor brick is in a positive state. (read-only) @type positive: boolean - @group Deprecated: isPositive, isTriggered, getUsePosPulseMode, setUsePosPulseMode, getFrequency, setFrequency, getUseNegPulseMode, setUseNegPulseMode, getInvert, setInvert, getLevel, setLevel """ def reset(): @@ -146,8 +144,7 @@ class SCA_ISensor(SCA_ILogicBrick): The sensor is put in its initial state as if it was just activated. """ - - #--The following methods are deprecated-- +#{ Deprecated def isPositive(): """ True if this sensor brick is in a positive state. @@ -223,6 +220,7 @@ class SCA_ISensor(SCA_ILogicBrick): @param level: Detect level instead of edge? (KX_TRUE, KX_FALSE) @type level: boolean """ +#} class SCA_IController(SCA_ILogicBrick): """ @@ -239,10 +237,8 @@ class SCA_IController(SCA_ILogicBrick): - note: the sensors are not necessarily owned by the same object. - note: when objects are instanced in dupligroups links may be lost from objects outside the dupligroup. @type actuators: sequence supporting index/string lookups and iteration. - - @group Deprecated: getState, getSensors, getActuators, getSensor, getActuator """ - +#{ Deprecated def getState(): """ Get the controllers state bitmask, this can be used with the GameObject's state to test if the the controller is active. @@ -277,6 +273,7 @@ class SCA_IController(SCA_ILogicBrick): @type name: string @rtype: L{SCA_IActuator} """ +#} class SCA_IActuator(SCA_ILogicBrick): """ @@ -289,31 +286,31 @@ class BL_ActionActuator(SCA_IActuator): @ivar action: The name of the action to set as the current action. @type action: string - @ivar start: Specifies the starting frame of the animation. - @type start: float - @ivar end: Specifies the ending frame of the animation. - @type end: float - @ivar blendin: Specifies the number of frames of animation to generate when making transitions between actions. - @type blendin: float + @ivar frameStart: Specifies the starting frame of the animation. + @type frameStart: float + @ivar frameEnd: Specifies the ending frame of the animation. + @type frameEnd: float + @ivar blendIn: Specifies the number of frames of animation to generate when making transitions between actions. + @type blendIn: float @ivar priority: Sets the priority of this actuator. Actuators will lower priority numbers will override actuators with higher numbers. @type priority: integer @ivar frame: Sets the current frame for the animation. @type frame: float - @ivar property: Sets the property to be used in FromProp playback mode. - @type property: string + @ivar propName: Sets the property to be used in FromProp playback mode. + @type propName: string @ivar blendTime: Sets the internal frame timer. This property must be in - the range from 0.0 to blendin. + the range from 0.0 to blendIn. @type blendTime: float - @ivar type: The operation mode of the actuator. KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND - @type type: integer + @ivar mode: The operation mode of the actuator. KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND + @type mode: integer @ivar useContinue: The actions continue option, True or False. When True, the action will always play from where last left off, otherwise negative events to this actuator will reset it to its start frame. @type: boolean - @ivar frameProperty: The name of the property that is set to the current frame number. - @type frameProperty: string + @ivar framePropName: The name of the property that is set to the current frame number. + @type framePropName: string """ def setChannel(channel, matrix, mode = False): """ @@ -326,7 +323,7 @@ class BL_ActionActuator(SCA_IActuator): @type mode: boolean """ - #--The following methods are deprecated-- +#{ Deprecated def setAction(action, reset = True): """ Sets the current action. @@ -343,7 +340,7 @@ class BL_ActionActuator(SCA_IActuator): def setStart(start): """ Specifies the starting frame of the animation. - @deprecated: Use the L{start} property + @deprecated: Use the L{frameStart} property @param start: the starting frame of the animation @type start: float """ @@ -351,7 +348,7 @@ class BL_ActionActuator(SCA_IActuator): def setEnd(end): """ Specifies the ending frame of the animation. - @deprecated: use the L{end} property + @deprecated: use the L{frameEnd} property @param end: the ending frame of the animation @type end: float """ @@ -359,7 +356,7 @@ class BL_ActionActuator(SCA_IActuator): """ Specifies the number of frames of animation to generate when making transitions between actions. - @deprecated: use the L{blendin} property + @deprecated: use the L{blendIn} property @param blendin: the number of frames in transition. @type blendin: float """ @@ -417,7 +414,7 @@ class BL_ActionActuator(SCA_IActuator): """ Set the actions continue option True or False. see getContinue. - @deprecated: use the L{continue} property + @deprecated: use the L{useContinue} property @param cont: The continue option. @type cont: bool """ @@ -451,21 +448,21 @@ class BL_ActionActuator(SCA_IActuator): """ Returns the starting frame of the action. - @deprecated: use the L{start} property + @deprecated: use the L{frameStart} property @rtype: float """ def getEnd(): """ Returns the last frame of the action. - @deprecated: use the L{end} property + @deprecated: use the L{frameEnd} property @rtype: float """ def getBlendin(): """ Returns the number of interpolation animation frames to be generated when this actuator is triggered. - @deprecated: use the L{blendin} property + @deprecated: use the L{blendIn} property @rtype: float """ def getPriority(): @@ -492,7 +489,7 @@ class BL_ActionActuator(SCA_IActuator): """ def setFrameProperty(prop): """ - @deprecated: use the L{frameProperty} property + @deprecated: use the L{framePropName} property @param prop: A string specifying the property of the object that will be updated with the action frame number. @type prop: string """ @@ -500,9 +497,10 @@ class BL_ActionActuator(SCA_IActuator): """ Returns the name of the property that is set to the current frame number. - @deprecated: use the L{frameProperty} property + @deprecated: use the L{framePropName} property @rtype: string """ +#} class BL_Shader(PyObjectPlus): """ @@ -755,31 +753,32 @@ class BL_ShapeActionActuator(SCA_IActuator): @ivar action: The name of the action to set as the current shape action. @type action: string - @ivar start: Specifies the starting frame of the shape animation. - @type start: float - @ivar end: Specifies the ending frame of the shape animation. - @type end: float - @ivar blendin: Specifies the number of frames of animation to generate when making transitions between actions. - @type blendin: float + @ivar frameStart: Specifies the starting frame of the shape animation. + @type frameStart: float + @ivar frameEnd: Specifies the ending frame of the shape animation. + @type frameEnd: float + @ivar blendIn: Specifies the number of frames of animation to generate when making transitions between actions. + @type blendIn: float @ivar priority: Sets the priority of this actuator. Actuators will lower priority numbers will override actuators with higher numbers. @type priority: integer @ivar frame: Sets the current frame for the animation. @type frame: float - @ivar property: Sets the property to be used in FromProp playback mode. - @type property: string + @ivar propName: Sets the property to be used in FromProp playback mode. + @type propName: string @ivar blendTime: Sets the internal frame timer. This property must be in the range from 0.0 to blendin. @type blendTime: float - @ivar type: The operation mode of the actuator. + @ivar mode: The operation mode of the actuator. KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND - @type type: integer - @ivar frameProperty: The name of the property that is set to the current frame number. - @type frameProperty: string + @type mode: integer + @ivar framePropName: The name of the property that is set to the current frame number. + @type framePropName: string """ +#{ Deprecated def setAction(action, reset = True): """ Sets the current action. @@ -798,7 +797,7 @@ class BL_ShapeActionActuator(SCA_IActuator): """ Specifies the starting frame of the animation. - @deprecated: use the L{start} property + @deprecated: use the L{frameStart} property @param start: the starting frame of the animation @type start: float """ @@ -807,7 +806,7 @@ class BL_ShapeActionActuator(SCA_IActuator): """ Specifies the ending frame of the animation. - @deprecated: use the L{end} property + @deprecated: use the L{frameEnd} property @param end: the ending frame of the animation @type end: float """ @@ -816,7 +815,7 @@ class BL_ShapeActionActuator(SCA_IActuator): Specifies the number of frames of animation to generate when making transitions between actions. - @deprecated: use the L{blendin} property + @deprecated: use the L{blendIn} property @param blendin: the number of frames in transition. @type blendin: float """ @@ -891,21 +890,21 @@ class BL_ShapeActionActuator(SCA_IActuator): """ Returns the starting frame of the action. - @deprecated: use the L{start} property + @deprecated: use the L{frameStart} property @rtype: float """ def getEnd(): """ Returns the last frame of the action. - @deprecated: use the L{end} property + @deprecated: use the L{frameEnd} property @rtype: float """ def getBlendin(): """ Returns the number of interpolation animation frames to be generated when this actuator is triggered. - @deprecated: use the L{blendin} property + @deprecated: use the L{blendIn} property @rtype: float """ def getPriority(): @@ -932,7 +931,7 @@ class BL_ShapeActionActuator(SCA_IActuator): """ def setFrameProperty(prop): """ - @deprecated: use the L{frameProperty} property + @deprecated: use the L{framePropName} property @param prop: A string specifying the property of the object that will be updated with the action frame number. @type prop: string """ @@ -940,9 +939,10 @@ class BL_ShapeActionActuator(SCA_IActuator): """ Returns the name of the property that is set to the current frame number. - @deprecated: use the L{frameProperty} property + @deprecated: use the L{framePropName} property @rtype: string """ +#} class CListValue(CPropValue): """ @@ -1002,7 +1002,7 @@ class CListValue(CPropValue): This has the advantage that you can store the id in places you could not store a gameObject. Warning: the id is derived from a memory location and will be different each time the game engine starts. - """# + """ class KX_BlenderMaterial(PyObjectPlus): # , RAS_IPolyMaterial) """ @@ -1023,7 +1023,7 @@ class KX_BlenderMaterial(PyObjectPlus): # , RAS_IPolyMaterial) Set the pixel color arithmetic functions. @param src: Specifies how the red, green, blue, - and alpha source blending factors are computed. + and alpha source blending factors are computed. @type src: GL_ZERO, GL_ONE, GL_SRC_COLOR, @@ -1094,6 +1094,7 @@ class KX_CDActuator(SCA_IActuator): """ Plays the track selected. """ +#{ Deprecated def setGain(gain): """ Sets the gain (volume) of the CD. @@ -1110,6 +1111,7 @@ class KX_CDActuator(SCA_IActuator): @rtype: float @return: Between 0.0 (silent) and 1.0 (max volume) """ +#} class KX_CameraActuator(SCA_IActuator): """ @@ -1121,16 +1123,18 @@ class KX_CameraActuator(SCA_IActuator): @type max: float @ivar height: height to stay above the target object @type height: float - @ivar xy: axis this actuator is tracking, true=X, false=Y - @type xy: boolean + @ivar useXY: axis this actuator is tracking, true=X, false=Y + @type useXY: boolean @ivar object: the object this actuator tracks. @type object: KX_GameObject or None @author: snail """ +#{ Deprecated def getObject(name_only = 1): """ Returns the name of the object this actuator tracks. + @deprecated: Use the L{object} attribute instead. @type name_only: bool @param name_only: optional argument, when 0 return a KX_GameObject @rtype: string, KX_GameObject or None if no object is set @@ -1140,6 +1144,7 @@ class KX_CameraActuator(SCA_IActuator): """ Sets the object this actuator tracks. + @deprecated: Use the L{object} attribute instead. @param target: the object to track. @type target: L{KX_GameObject}, string or None """ @@ -1148,6 +1153,7 @@ class KX_CameraActuator(SCA_IActuator): """ Returns the minimum distance to target maintained by the actuator. + @deprecated: Use the L{min} attribute instead. @rtype: float """ @@ -1156,6 +1162,7 @@ class KX_CameraActuator(SCA_IActuator): Sets the minimum distance to the target object maintained by the actuator. + @deprecated: Use the L{min} attribute instead. @param distance: The minimum distance to maintain. @type distance: float """ @@ -1164,6 +1171,7 @@ class KX_CameraActuator(SCA_IActuator): """ Gets the maximum distance to stay from the target object. + @deprecated: Use the L{max} attribute instead. @rtype: float """ @@ -1171,6 +1179,7 @@ class KX_CameraActuator(SCA_IActuator): """ Sets the maximum distance to stay from the target object. + @deprecated: Use the L{max} attribute instead. @param distance: The maximum distance to maintain. @type distance: float """ @@ -1179,6 +1188,7 @@ class KX_CameraActuator(SCA_IActuator): """ Returns the height to stay above the target object. + @deprecated: Use the L{height} attribute instead. @rtype: float """ @@ -1186,6 +1196,7 @@ class KX_CameraActuator(SCA_IActuator): """ Sets the height to stay above the target object. + @deprecated: Use the L{height} attribute instead. @type height: float @param height: The height to stay above the target object. """ @@ -1194,6 +1205,7 @@ class KX_CameraActuator(SCA_IActuator): """ Sets the axis to get behind. + @deprecated: Use the L{useXY} attribute instead. @param xaxis: False to track Y axis, True to track X axis. @type xaxis: boolean """ @@ -1202,9 +1214,11 @@ class KX_CameraActuator(SCA_IActuator): """ Returns the axis this actuator is tracking. + @deprecated: Use the L{useXY} attribute instead. @return: True if tracking X axis, False if tracking Y axis. @rtype: boolean """ +#} class KX_ConstraintActuator(SCA_IActuator): """ @@ -1238,8 +1252,8 @@ class KX_ConstraintActuator(SCA_IActuator): If set to 0, the actuator is not limited in time. @type time: integer - @ivar property: the name of the property or material for the ray detection of the distance constraint. - @type property: string + @ivar propName: the name of the property or material for the ray detection of the distance constraint. + @type propName: string @ivar min: The lower bound of the constraint For the rotation and orientation constraint, it represents radiant @@ -1279,6 +1293,7 @@ class KX_ConstraintActuator(SCA_IActuator): KX_ACT_CONSTRAINT_FHNZ (21) : set force field along negative Z axis @type limit: integer """ +#{ Deprecated def setDamp(time): """ Sets the time this constraint is delayed. @@ -1442,6 +1457,7 @@ class KX_ConstraintActuator(SCA_IActuator): @rtype: float """ +#} class KX_ConstraintWrapper(PyObjectPlus): """ @@ -1462,8 +1478,8 @@ class KX_GameActuator(SCA_IActuator): Properties: - @ivar file: the new .blend file to load - @type file: string. + @ivar fileName: the new .blend file to load + @type fileName: string. @ivar mode: The mode of this actuator @type mode: Constant in... - L{GameLogic.KX_GAME_LOAD} @@ -1473,21 +1489,23 @@ class KX_GameActuator(SCA_IActuator): - L{GameLogic.KX_GAME_SAVECFG} - L{GameLogic.KX_GAME_LOADCFG} """ +#{ Deprecated def getFile(): """ Returns the filename of the new .blend file to load. - @deprecated: use the L{file} property + @deprecated: use the L{fileName} property @rtype: string """ def setFile(filename): """ Sets the new .blend file to load. - @deprecated: use the L{file} property + @deprecated: use the L{fileName} property @param filename: The file name this actuator will load. @type filename: string """ +#} class KX_GameObject(SCA_IObject): """ @@ -1530,16 +1548,16 @@ class KX_GameObject(SCA_IObject): @type orientation: 3x3 Matrix [[float]] On write: local orientation, on read: world orientation @ivar scaling: The object's scaling factor. list [sx, sy, sz] - deprecated: use L{localScaling} and L{worldScaling} + deprecated: use L{localScale} and L{worldScale} @type scaling: list [sx, sy, sz] On write: local scaling, on read: world scaling @ivar localOrientation: The object's local orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector. @type localOrientation: 3x3 Matrix [[float]] @ivar worldOrientation: The object's world orientation. @type worldOrientation: 3x3 Matrix [[float]] - @ivar localScaling: The object's local scaling factor. - @type localScaling: list [sx, sy, sz] - @ivar worldScaling: The object's world scaling factor. Read-only - @type worldScaling: list [sx, sy, sz] + @ivar localScale: The object's local scaling factor. + @type localScale: list [sx, sy, sz] + @ivar worldScale: The object's world scaling factor. Read-only + @type worldScale: list [sx, sy, sz] @ivar localPosition: The object's local position. @type localPosition: list [x, y, z] @ivar worldPosition: The object's world position. @@ -2002,16 +2020,16 @@ class KX_IpoActuator(SCA_IActuator): """ IPO actuator activates an animation. - @ivar startFrame: Start frame. - @type startFrame: float - @ivar endFrame: End frame. - @type endFrame: float + @ivar frameStart: Start frame. + @type frameStart: float + @ivar frameEnd: End frame. + @type frameEnd: float @ivar propName: Use this property to define the Ipo position @type propName: string @ivar framePropName: Assign this property this action current frame number @type framePropName: string - @ivar type: Play mode for the ipo. (In GameLogic.KX_IPOACT_PLAY, KX_IPOACT_PINGPONG, KX_IPOACT_FLIPPER, KX_IPOACT_LOOPSTOP, KX_IPOACT_LOOPEND, KX_IPOACT_FROM_PROP) - @type type: int + @ivar mode: Play mode for the ipo. (In GameLogic.KX_IPOACT_PLAY, KX_IPOACT_PINGPONG, KX_IPOACT_FLIPPER, KX_IPOACT_LOOPSTOP, KX_IPOACT_LOOPEND, KX_IPOACT_FROM_PROP) + @type mode: int @ivar useIpoAsForce: Apply Ipo as a global or local force depending on the local option (dynamic objects only) @type useIpoAsForce: bool @ivar useIpoAdd: Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag @@ -2021,6 +2039,7 @@ class KX_IpoActuator(SCA_IActuator): @ivar useChildren: Update IPO on all children Objects as well @type useChildren: bool """ +#{ Deprecated def set(mode, startframe, endframe, force): """ Sets the properties of the actuator. @@ -2046,28 +2065,28 @@ class KX_IpoActuator(SCA_IActuator): """ Sets the frame from which the IPO starts playing. - @deprecated: use L{startFrame} + @deprecated: use L{frameStart} @type startframe: integer """ def getStart(): """ Returns the frame from which the IPO starts playing. - @deprecated: use L{startFrame} + @deprecated: use L{frameStart} @rtype: integer """ def setEnd(endframe): """ Sets the frame at which the IPO stops playing. - @deprecated: use L{endFrame} + @deprecated: use L{frameEnd} @type endframe: integer """ def getEnd(): """ Returns the frame at which the IPO stops playing. - @deprecated: use L{endFrame} + @deprecated: use L{frameEnd} @rtype: integer """ def setIpoAsForce(force): @@ -2133,6 +2152,7 @@ class KX_IpoActuator(SCA_IActuator): @deprecated: use L{useIpoLocal} """ +#} class KX_LightObject(KX_GameObject): """ @@ -2420,20 +2440,19 @@ class KX_TouchSensor(SCA_ISensor): """ Touch sensor detects collisions between objects. - @ivar property: The property or material to collide with. - @type property: string + @ivar propName: The property or material to collide with. + @type propName: string @ivar useMaterial: Determines if the sensor is looking for a property or material. KX_True = Find material; KX_False = Find property @type useMaterial: boolean - @ivar pulseCollisions: The last collided object. - @type pulseCollisions: bool - @ivar objectHit: The last collided object. (read-only) - @type objectHit: L{KX_GameObject} or None - @ivar objectHitList: A list of colliding objects. (read-only) - @type objectHitList: L{CListValue} of L{KX_GameObject} + @ivar usePulseCollision: The last collided object. + @type usePulseCollision: bool + @ivar hitObject: The last collided object. (read-only) + @type hitObject: L{KX_GameObject} or None + @ivar hitObjectList: A list of colliding objects. (read-only) + @type hitObjectList: L{CListValue} of L{KX_GameObject} """ - - #--The following methods are deprecated, please use properties instead. +#{ Deprecated def setProperty(name): """ Set the property or material to collide with. Use @@ -2457,7 +2476,7 @@ class KX_TouchSensor(SCA_ISensor): """ Returns the last object hit by this touch sensor. - @deprecated: use the L{objectHit} property + @deprecated: use the L{hitObject} property @rtype: L{KX_GameObject} """ def getHitObjectList(): @@ -2466,8 +2485,8 @@ class KX_TouchSensor(SCA_ISensor): Only objects that have the requisite material/property are listed. - @deprecated: use the L{objectHitList} property - @rtype: L{CListValue} of L{KX_GameObject} + @deprecated: use the L{hitObjectList} property + @rtype: L{CListValue} of L{hitObjectList} """ def getTouchMaterial(): """ @@ -2476,6 +2495,7 @@ class KX_TouchSensor(SCA_ISensor): @deprecated: use the L{useMaterial} property """ +#} class KX_NearSensor(KX_TouchSensor): """ @@ -3393,8 +3413,8 @@ class KX_RaySensor(SCA_ISensor): """ A ray sensor detects the first object in a given direction. - @ivar property: The property the ray is looking for. - @type property: string + @ivar propName: The property the ray is looking for. + @type propName: string @ivar range: The distance of the ray. @type range: float @ivar useMaterial: Whether or not to look for a material (false = property) @@ -3414,7 +3434,7 @@ class KX_RaySensor(SCA_ISensor): KX_RAY_AXIS_POS_X, KX_RAY_AXIS_POS_Y, KX_RAY_AXIS_POS_Z, KX_RAY_AXIS_NEG_X, KX_RAY_AXIS_NEG_Y, KX_RAY_AXIS_NEG_Z """ - +#{ Deprecated def getHitObject(): """ Returns the game object that was hit by this ray. @@ -3443,6 +3463,7 @@ class KX_RaySensor(SCA_ISensor): @deprecated: Use the L{rayDirection} attribute instead. @rtype: list [dx, dy, dz] """ +#} class KX_SCA_AddObjectActuator(SCA_IActuator): """ @@ -3562,13 +3583,14 @@ class KX_SCA_AddObjectActuator(SCA_IActuator): class KX_SCA_DynamicActuator(SCA_IActuator): """ Dynamic Actuator. - @ivar operation: the type of operation of the actuator, 0-4 + @ivar mode: the type of operation of the actuator, 0-4 KX_DYN_RESTORE_DYNAMICS, KX_DYN_DISABLE_DYNAMICS, KX_DYN_ENABLE_RIGID_BODY, KX_DYN_DISABLE_RIGID_BODY, KX_DYN_SET_MASS - @type operation: integer + @type mode: integer @ivar mass: the mass value for the KX_DYN_SET_MASS operation @type mass: float """ +#{ Deprecated def setOperation(operation): """ Set the type of operation when the actuator is activated: @@ -3578,13 +3600,14 @@ class KX_SCA_DynamicActuator(SCA_IActuator): - 3 = disable rigid body - 4 = set mass - @deprecated: Use the L{operation} attribute instead. + @deprecated: Use the L{mode} attribute instead. """ def getOperation(): """ return the type of operation - @deprecated: Use the L{operation} attribute instead. + @deprecated: Use the L{mode} attribute instead. """ +#} class KX_SCA_EndObjectActuator(SCA_IActuator): """ @@ -3714,8 +3737,8 @@ class KX_Scene(PyObjectPlus): @type name: string @ivar objects: A list of objects in the scene, (read-only). @type objects: L{CListValue} of L{KX_GameObject} - @ivar objects_inactive: A list of objects on background layers (used for the addObject actuator), (read-only). - @type objects_inactive: L{CListValue} of L{KX_GameObject} + @ivar objectsInactive: A list of objects on background layers (used for the addObject actuator), (read-only). + @type objectsInactive: L{CListValue} of L{KX_GameObject} @ivar lights: A list of lights in the scene, (read-only). @type lights: L{CListValue} of L{KX_LightObject} @ivar cameras: A list of cameras in the scene, (read-only). @@ -3791,6 +3814,7 @@ class KX_SceneActuator(SCA_IActuator): @ivar mode: The mode of the actuator @type mode: int from 0 to 5 L{GameLogic.Scene Actuator} """ +#{ Deprecated def setUseRestart(flag): """ Set flag to True to restart the scene. @@ -3837,6 +3861,7 @@ class KX_SceneActuator(SCA_IActuator): @deprecated: use the L{camera} attribute instead. @rtype: string """ +#} class KX_SoundActuator(SCA_IActuator): """ @@ -3846,8 +3871,8 @@ class KX_SoundActuator(SCA_IActuator): the actuator to be activated - they act instantly provided that the actuator has been activated once at least. - @ivar filename: Sets the filename of the sound this actuator plays. - @type filename: string + @ivar fileName: Sets the filename of the sound this actuator plays. + @type fileName: string @ivar volume: Sets the volume (gain) of the sound. @type volume: float @@ -3871,31 +3896,17 @@ class KX_SoundActuator(SCA_IActuator): also use quaternion [float,float,float,float] or euler angles [float,float,float] @type orientation: 3x3 matrix [[float]] - @ivar type: Sets the operation mode of the actuator. You can use one of the following constant: + @ivar mode: Sets the operation mode of the actuator. You can use one of the following constant: - KX_SOUNDACT_PLAYSTOP (1) - KX_SOUNDACT_PLAYEND (2) - KX_SOUNDACT_LOOPSTOP (3) - KX_SOUNDACT_LOOPEND (4) - KX_SOUNDACT_LOOPBIDIRECTIONAL (5) - KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP (6) - @type type: integer - - @group Play Methods: startSound, pauseSound, stopSound + @type mode: integer """ - def setFilename(filename): - """ - Sets the filename of the sound this actuator plays. - - @deprecated: Use the L{filename} attribute instead. - @type filename: string - """ - def getFilename(): - """ - Returns the filename of the sound this actuator plays. - - @deprecated: Use the L{filename} attribute instead. - @rtype: string - """ + +#{ Play Methods def startSound(): """ Starts the sound. @@ -3908,6 +3919,23 @@ class KX_SoundActuator(SCA_IActuator): """ Stops the sound. """ +#} + +#{ Deprecated + def setFilename(filename): + """ + Sets the filename of the sound this actuator plays. + + @deprecated: Use the L{fileName} attribute instead. + @type filename: string + """ + def getFilename(): + """ + Returns the filename of the sound this actuator plays. + + @deprecated: Use the L{fileName} attribute instead. + @rtype: string + """ def setGain(gain): """ Sets the gain (volume) of the sound @@ -4030,6 +4058,7 @@ class KX_SoundActuator(SCA_IActuator): @rtype: integer @return: KX_SOUNDACT_PLAYSTOP, KX_SOUNDACT_PLAYEND, KX_SOUNDACT_LOOPSTOP, KX_SOUNDACT_LOOPEND, KX_SOUNDACT_LOOPBIDIRECTIONAL, KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP """ +#} class KX_StateActuator(SCA_IActuator): """ @@ -4451,11 +4480,12 @@ class KX_VisibilityActuator(SCA_IActuator): Visibility Actuator. @ivar visibility: whether the actuator makes its parent object visible or invisible @type visibility: boolean - @ivar occlusion: whether the actuator makes its parent object an occluder or not - @type occlusion: boolean - @ivar recursion: whether the visibility/occlusion should be propagated to all children of the object - @type recursion: boolean + @ivar useOcclusion: whether the actuator makes its parent object an occluder or not + @type useOcclusion: boolean + @ivar useRecursion: whether the visibility/occlusion should be propagated to all children of the object + @type useRecursion: boolean """ +#{ Deprecated def set(visible): """ Sets whether the actuator makes its parent object visible or invisible. @@ -4464,8 +4494,7 @@ class KX_VisibilityActuator(SCA_IActuator): @param visible: - True: Makes its parent visible. - False: Makes its parent invisible. """ -# -# Documentation for PyObjectPlus base class +#} class SCA_2DFilterActuator(SCA_IActuator): """ @@ -4483,7 +4512,7 @@ class SCA_2DFilterActuator(SCA_IActuator): @type shaderText: string @ivar disableMotionBlur: action on motion blur: 0=enable, 1=disable @type disableMotionBlur: integer - @ivar type: type of 2D filter, use one of the following constants: + @ivar mode: type of 2D filter, use one of the following constants: RAS_2DFILTER_ENABLED (-2) : enable the filter that was previously disabled RAS_2DFILTER_DISABLED (-1) : disable the filter that is currently active RAS_2DFILTER_NOFILTER (0) : disable and destroy the filter that is currently active @@ -4499,10 +4528,10 @@ class SCA_2DFilterActuator(SCA_IActuator): RAS_2DFILTER_SEPIA (10) RAS_2DFILTER_INVERT (11) RAS_2DFILTER_CUSTOMFILTER (12) : customer filter, the code code is set via shaderText property - @type type: integer - @ivar passNb: order number of filter in the stack of 2D filters. Filters are executed in increasing order of passNb. + @type mode: integer + @ivar passNumber: order number of filter in the stack of 2D filters. Filters are executed in increasing order of passNb. Only be one filter can be defined per passNb. - @type passNb: integer (0-100) + @type passNumber: integer (0-100) @ivar value: argument for motion blur filter @type value: float (0.0-100.0) """ @@ -4706,7 +4735,7 @@ class SCA_JoystickSensor(SCA_ISensor): """ Returns the state of the joysticks axis. See differs to L{getAxis()<SCA_JoystickSensor.getAxis>} returning the current state of the joystick. - @deprecated: Use the L{axisPosition} attribute instead. + @deprecated: Use the L{axisSingle} attribute instead. @rtype: list @return: 4 values, each spesifying the value of an axis between -32767 and 32767 depending on how far the axis is pushed, 0 for nothing. @@ -4929,13 +4958,14 @@ class SCA_PropertyActuator(SCA_IActuator): Properties: - @ivar property: the property on which to operate. - @type property: string + @ivar propName: the property on which to operate. + @type propName: string @ivar value: the value with which the actuator operates. @type value: string - @ivar type: TODO - add constants to game logic dict!. - @type type: iny + @ivar mode: TODO - add constants to game logic dict!. + @type mode: int """ +#{ Deprecated def setProperty(prop): """ Set the property on which to operate. @@ -4970,6 +5000,7 @@ class SCA_PropertyActuator(SCA_IActuator): @deprecated: Use the L{value} attribute instead. @rtype: string """ +#} class SCA_PropertySensor(SCA_ISensor): """ @@ -4977,21 +5008,21 @@ class SCA_PropertySensor(SCA_ISensor): Properties: - @ivar type: type of check on the property: + @ivar mode: type of check on the property: KX_PROPSENSOR_EQUAL(1), KX_PROPSENSOR_NOTEQUAL(2), KX_PROPSENSOR_INTERVAL(3), KX_PROPSENSOR_CHANGED(4), KX_PROPSENSOR_EXPRESSION(5) - @type type: integer - @ivar property: the property with which the sensor operates. - @type property: string + @type mode: integer + @ivar propName: the property the sensor operates. + @type propName: string @ivar value: the value with which the sensor compares to the value of the property. @type value: string """ - +#{ Deprecated def getType(): """ Gets when to activate this sensor. - @deprecated: Use the L{type} attribute instead. + @deprecated: Use the L{mode} attribute instead. @return: KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL, KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED, or KX_PROPSENSOR_EXPRESSION. @@ -5001,7 +5032,7 @@ class SCA_PropertySensor(SCA_ISensor): """ Set the type of check to perform. - @deprecated: Use the L{type} attribute instead. + @deprecated: Use the L{mode} attribute instead. @type checktype: KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL, KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED, or KX_PROPSENSOR_EXPRESSION. @@ -5011,7 +5042,7 @@ class SCA_PropertySensor(SCA_ISensor): """ Return the property with which the sensor operates. - @deprecated: Use the L{property} attribute instead. + @deprecated: Use the L{propName} attribute instead. @rtype: string @return: the name of the property this sensor is watching. """ @@ -5020,7 +5051,7 @@ class SCA_PropertySensor(SCA_ISensor): Sets the property with which to operate. If there is no property of that name, this call is ignored. - @deprecated: Use the L{property} attribute instead. + @deprecated: Use the L{propName} attribute instead. @type name: string. """ def getValue(): @@ -5040,6 +5071,7 @@ class SCA_PropertySensor(SCA_ISensor): @deprecated: Use the L{value} attribute instead. @type value: string """ +#} class SCA_PythonController(SCA_IController): """ @@ -5102,76 +5134,11 @@ class SCA_RandomActuator(SCA_IActuator): KX_RANDOMACT_FLOAT_CONST, KX_RANDOMACT_FLOAT_UNIFORM, KX_RANDOMACT_FLOAT_NORMAL, KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL @type distribution: integer, read-only - @ivar property: the name of the property to set with the random value. + @ivar propName: the name of the property to set with the random value. If the generator and property types do not match, the assignment is ignored. - @type property: string + @type propName: string """ - def setSeed(seed): - """ - Sets the seed of the random number generator. - - Equal seeds produce equal series. If the seed is 0, - the generator will produce the same value on every call. - - @deprecated: Use the L{seed} attribute instead. - @type seed: integer - """ - def getSeed(): - """ - Returns the initial seed of the generator. - - @deprecated: Use the L{seed} attribute instead. - @rtype: integer - """ - def getPara1(): - """ - Returns the first parameter of the active distribution. - - Refer to the documentation of the generator types for the meaning - of this value. - - @deprecated: Use the L{para1} attribute instead. - @rtype: float - """ - def getPara2(): - """ - Returns the second parameter of the active distribution. - - Refer to the documentation of the generator types for the meaning - of this value. - - @deprecated: Use the L{para2} attribute instead. - @rtype: float - """ - def getDistribution(): - """ - Returns the type of random distribution. - - @deprecated: Use the L{distribution} attribute instead. - @rtype: distribution type - @return: KX_RANDOMACT_BOOL_CONST, KX_RANDOMACT_BOOL_UNIFORM, KX_RANDOMACT_BOOL_BERNOUILLI, - KX_RANDOMACT_INT_CONST, KX_RANDOMACT_INT_UNIFORM, KX_RANDOMACT_INT_POISSON, - KX_RANDOMACT_FLOAT_CONST, KX_RANDOMACT_FLOAT_UNIFORM, KX_RANDOMACT_FLOAT_NORMAL, - KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL - """ - def setProperty(property): - """ - Set the property to which the random value is assigned. - - If the generator and property types do not match, the assignment is ignored. - - @deprecated: Use the L{property} attribute instead. - @type property: string - @param property: The name of the property to set. - """ - def getProperty(): - """ - Returns the name of the property to set. - - @deprecated: Use the L{property} attribute instead. - @rtype: string - """ def setBoolConst(value): """ Sets this generator to produce a constant boolean value. @@ -5249,6 +5216,74 @@ class SCA_RandomActuator(SCA_IActuator): @type half_life: float """ +#{ Deprecated + def setSeed(seed): + """ + Sets the seed of the random number generator. + + Equal seeds produce equal series. If the seed is 0, + the generator will produce the same value on every call. + + @deprecated: Use the L{seed} attribute instead. + @type seed: integer + """ + def getSeed(): + """ + Returns the initial seed of the generator. + + @deprecated: Use the L{seed} attribute instead. + @rtype: integer + """ + def getPara1(): + """ + Returns the first parameter of the active distribution. + + Refer to the documentation of the generator types for the meaning + of this value. + + @deprecated: Use the L{para1} attribute instead. + @rtype: float + """ + def getPara2(): + """ + Returns the second parameter of the active distribution. + + Refer to the documentation of the generator types for the meaning + of this value. + + @deprecated: Use the L{para2} attribute instead. + @rtype: float + """ + def getDistribution(): + """ + Returns the type of random distribution. + + @deprecated: Use the L{distribution} attribute instead. + @rtype: distribution type + @return: KX_RANDOMACT_BOOL_CONST, KX_RANDOMACT_BOOL_UNIFORM, KX_RANDOMACT_BOOL_BERNOUILLI, + KX_RANDOMACT_INT_CONST, KX_RANDOMACT_INT_UNIFORM, KX_RANDOMACT_INT_POISSON, + KX_RANDOMACT_FLOAT_CONST, KX_RANDOMACT_FLOAT_UNIFORM, KX_RANDOMACT_FLOAT_NORMAL, + KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL + """ + def setProperty(property): + """ + Set the property to which the random value is assigned. + + If the generator and property types do not match, the assignment is ignored. + + @deprecated: Use the L{propName} attribute instead. + @type property: string + @param property: The name of the property to set. + """ + def getProperty(): + """ + Returns the name of the property to set. + + @deprecated: Use the L{propName} attribute instead. + @rtype: string + """ +#} + class SCA_RandomSensor(SCA_ISensor): """ diff --git a/source/gameengine/PyDoc/bge_api_validate_py.txt b/source/gameengine/PyDoc/bge_api_validate_py.txt index ec92cc28770..ebd74c06bb3 100644 --- a/source/gameengine/PyDoc/bge_api_validate_py.txt +++ b/source/gameengine/PyDoc/bge_api_validate_py.txt @@ -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 - |