[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20035] trunk/blender: fixes for bugs submitted by BGE users, fixes by myself and Mitchell Stokes
Campbell Barton
ideasman42 at gmail.com
Sun May 3 11:21:58 CEST 2009
Revision: 20035
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20035
Author: campbellbarton
Date: 2009-05-03 11:21:58 +0200 (Sun, 03 May 2009)
Log Message:
-----------
fixes for bugs submitted by BGE users, fixes by myself and Mitchell Stokes
- when the attribute check function failed it didnt set an error raising a SystemError instead
- Rasterizer.getMaterialMode would never return KX_BLENDER_MULTITEX_MATERIAL
- PropertySensor value attribute checking function was always returning a fail.
- Vertex Self Shadow python script didnt update for meshes with modifiers.
Modified Paths:
--------------
trunk/blender/release/scripts/vertexpaint_selfshadow_ao.py
trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp
trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
trunk/blender/source/gameengine/Ketsji/KX_SceneActuator.cpp
trunk/blender/source/gameengine/PyDoc/KX_SceneActuator.py
Modified: trunk/blender/release/scripts/vertexpaint_selfshadow_ao.py
===================================================================
--- trunk/blender/release/scripts/vertexpaint_selfshadow_ao.py 2009-05-03 09:03:47 UTC (rev 20034)
+++ trunk/blender/release/scripts/vertexpaint_selfshadow_ao.py 2009-05-03 09:21:58 UTC (rev 20035)
@@ -180,6 +180,10 @@
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()
Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp 2009-05-03 09:03:47 UTC (rev 20034)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp 2009-05-03 09:21:58 UTC (rev 20035)
@@ -519,6 +519,10 @@
{
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)
Modified: trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp 2009-05-03 09:03:47 UTC (rev 20034)
+++ trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp 2009-05-03 09:21:58 UTC (rev 20035)
@@ -295,9 +295,8 @@
int SCA_PropertySensor::validValueForProperty(void *self, const PyAttributeDef*)
{
- bool result = true;
/* There is no type checking at this moment, unfortunately... */
- return result;
+ return 0;
}
/* ------------------------------------------------------------------------- */
Modified: trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp 2009-05-03 09:03:47 UTC (rev 20034)
+++ trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp 2009-05-03 09:21:58 UTC (rev 20035)
@@ -1004,7 +1004,7 @@
{
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;
Modified: trunk/blender/source/gameengine/Ketsji/KX_SceneActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_SceneActuator.cpp 2009-05-03 09:03:47 UTC (rev 20034)
+++ trunk/blender/source/gameengine/Ketsji/KX_SceneActuator.cpp 2009-05-03 09:21:58 UTC (rev 20035)
@@ -363,7 +363,7 @@
"\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 @@
"\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));
}
Modified: trunk/blender/source/gameengine/PyDoc/KX_SceneActuator.py
===================================================================
--- trunk/blender/source/gameengine/PyDoc/KX_SceneActuator.py 2009-05-03 09:03:47 UTC (rev 20034)
+++ trunk/blender/source/gameengine/PyDoc/KX_SceneActuator.py 2009-05-03 09:21:58 UTC (rev 20035)
@@ -18,12 +18,14 @@
@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 @@
"""
def getUseRestart():
"""
- DEPRECATED
+ DEPRECATED: use the useRestart property instead
Returns True if the scene will be restarted.
@rtype: boolean
More information about the Bf-blender-cvs
mailing list