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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/vertexpaint_selfshadow_ao.py4
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.cpp4
-rw-r--r--source/gameengine/PyDoc/KX_SceneActuator.py6
6 files changed, 16 insertions, 7 deletions
diff --git a/release/scripts/vertexpaint_selfshadow_ao.py b/release/scripts/vertexpaint_selfshadow_ao.py
index 95ba7d2fb23..d641fd12111 100644
--- a/release/scripts/vertexpaint_selfshadow_ao.py
+++ b/release/scripts/vertexpaint_selfshadow_ao.py
@@ -180,6 +180,10 @@ def main():
t= sys.time()
vertexFakeAO(me, PREF_BLUR_ITERATIONS, PREF_BLUR_RADIUS, PREF_MIN_EDLEN, PREF_CLAMP_CONCAVE, PREF_CLAMP_CONVEX, PREF_SHADOW_ONLY, PREF_SEL_ONLY)
+
+ if ob.modifiers:
+ me.update()
+
print 'done in %.6f' % (sys.time()-t)
if __name__=='__main__':
main()
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp
index e6b49332273..107b12b7159 100644
--- a/source/gameengine/Expressions/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/PyObjectPlus.cpp
@@ -519,6 +519,10 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
{
if ((*attrdef->m_checkFunction)(self, attrdef) != 0)
{
+ // if the checing function didnt set an error then set a generic one here so we dont set an error with no exception
+ if (PyErr_Occurred()==0)
+ PyErr_Format(PyExc_AttributeError, "type check error for attribute \"%s\", reasion unknown", attrdef->m_name);
+
// post check returned an error, restore values
UNDO_AND_ERROR:
if (undoBuffer)
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index c78283db423..e8a291b0a92 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -295,9 +295,8 @@ CValue* SCA_PropertySensor::FindIdentifier(const STR_String& identifiername)
int SCA_PropertySensor::validValueForProperty(void *self, const PyAttributeDef*)
{
- bool result = true;
/* There is no type checking at this moment, unfortunately... */
- return result;
+ return 0;
}
/* ------------------------------------------------------------------------- */
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index afc1fc5d1f8..18fd990dc51 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -1004,7 +1004,7 @@ static PyObject* gPyGetMaterialType(PyObject*)
{
int flag;
- if(G.fileflags & (G_FILE_GAME_MAT|G_FILE_GAME_MAT_GLSL))
+ if(G.fileflags & G_FILE_GAME_MAT_GLSL)
flag = KX_BLENDER_GLSL_MATERIAL;
else if(G.fileflags & G_FILE_GAME_MAT)
flag = KX_BLENDER_MULTITEX_MATERIAL;
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp
index eed1bb8027b..64edb6cd6d5 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp
@@ -363,7 +363,7 @@ const char KX_SceneActuator::SetUseRestart_doc[] =
"\tSet flag to 1 to restart the scene.\n" ;
PyObject* KX_SceneActuator::PySetUseRestart(PyObject* args)
{
- ShowDeprecationWarning("setUseRestart()", "(no replacement)");
+ ShowDeprecationWarning("setUseRestart()", "the useRestart property");
int boolArg;
if (!PyArg_ParseTuple(args, "i:setUseRestart", &boolArg))
@@ -384,7 +384,7 @@ const char KX_SceneActuator::GetUseRestart_doc[] =
"\tReturn whether the scene will be restarted.\n" ;
PyObject* KX_SceneActuator::PyGetUseRestart()
{
- ShowDeprecationWarning("getUseRestart()", "(no replacement)");
+ ShowDeprecationWarning("getUseRestart()", "the useRestart property");
return PyInt_FromLong(!(m_restart == 0));
}
diff --git a/source/gameengine/PyDoc/KX_SceneActuator.py b/source/gameengine/PyDoc/KX_SceneActuator.py
index 2429cd6fb80..8e806c2c50e 100644
--- a/source/gameengine/PyDoc/KX_SceneActuator.py
+++ b/source/gameengine/PyDoc/KX_SceneActuator.py
@@ -18,12 +18,14 @@ class KX_SceneActuator(SCA_IActuator):
@ivar camera: the camera to change to.
When setting the attribute, you can use either a L{KX_Camera} or the name of the camera.
@type camera: L{KX_Camera} on read, string or L{KX_Camera} on write
+ @ivar useRestart: Set flag to True to restart the sene
+ @type useRestart: bool
@type mode: The mode of the actuator
@type mode: int from 0 to 5 L{GameLogic.Scene Actuator}
"""
def setUseRestart(flag):
"""
- DEPRECATED
+ DEPRECATED: use the useRestart property instead
Set flag to True to restart the scene.
@type flag: boolean
@@ -46,7 +48,7 @@ class KX_SceneActuator(SCA_IActuator):
"""
def getUseRestart():
"""
- DEPRECATED
+ DEPRECATED: use the useRestart property instead
Returns True if the scene will be restarted.
@rtype: boolean