[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16129] trunk/blender: SCA_PythonController.cpp - Made errors in python print the controller name , useful when blender crashes on printing the python error which happens frequently .
Campbell Barton
ideasman42 at gmail.com
Sat Aug 16 02:06:52 CEST 2008
Revision: 16129
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16129
Author: campbellbarton
Date: 2008-08-16 02:06:51 +0200 (Sat, 16 Aug 2008)
Log Message:
-----------
SCA_PythonController.cpp - Made errors in python print the controller name, useful when blender crashes on printing the python error which happens frequently.
buttons_logic.c - NULL checks for game logic buttons, linking in groups with some logic links to objects outsude the group could crash blender. There are NULL checks for this case elsewhere so I assume it should be supported.
CMakeLists.txt - remove YESIAMSTUPID option, is not used anymore.
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
trunk/blender/source/blender/src/buttons_logic.c
trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2008-08-15 23:14:22 UTC (rev 16128)
+++ trunk/blender/CMakeLists.txt 2008-08-16 00:06:51 UTC (rev 16129)
@@ -63,7 +63,6 @@
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
-OPTION(YESIAMSTUPID "Enable execution on 64-bit platforms" OFF)
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
Modified: trunk/blender/source/blender/src/buttons_logic.c
===================================================================
--- trunk/blender/source/blender/src/buttons_logic.c 2008-08-15 23:14:22 UTC (rev 16128)
+++ trunk/blender/source/blender/src/buttons_logic.c 2008-08-16 00:06:51 UTC (rev 16129)
@@ -3183,7 +3183,8 @@
while(cont) {
for (iact=0; iact<cont->totlinks; iact++) {
act = cont->links[iact];
- act->flag |= ACT_LINKED;
+ if (act)
+ act->flag |= ACT_LINKED;
}
controller_state_mask |= cont->state_mask;
cont = cont->next;
@@ -3231,7 +3232,8 @@
/* this controller is visible, mark all its actuator */
for (iact=0; iact<cont->totlinks; iact++) {
act = cont->links[iact];
- act->flag |= ACT_VISIBLE;
+ if (act)
+ act->flag |= ACT_VISIBLE;
}
uiBlockSetEmboss(block, UI_EMBOSSM);
uiDefIconButBitS(block, TOG, CONT_DEL, B_DEL_CONT, ICON_X, xco, yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Delete Controller");
Modified: trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp 2008-08-15 23:14:22 UTC (rev 16128)
+++ trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp 2008-08-16 00:06:51 UTC (rev 16129)
@@ -248,7 +248,7 @@
{
// didn't compile, so instead of compile, complain
// something is wrong, tell the user what went wrong
- printf("PYTHON SCRIPT ERROR:\n");
+ printf("Python compile error from controller \"%s\": \n", GetName().Ptr());
//PyRun_SimpleString(m_scriptText.Ptr());
PyErr_Print();
return;
@@ -285,7 +285,7 @@
else
{
// something is wrong, tell the user what went wrong
- printf("PYTHON SCRIPT ERROR:\n");
+ printf("Python script error from controller \"%s\": \n", GetName().Ptr());
PyErr_Print();
//PyRun_SimpleString(m_scriptText.Ptr());
}
More information about the Bf-blender-cvs
mailing list