Revision: 16083 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16083 Author: bdiego Date: 2008-08-13 20:29:13 +0200 (Wed, 13 Aug 2008)
Log Message: ----------- branches/blender-2.47 Merge from trunk: Revision: 16075 Revision: 16081 Modified Paths: -------------- branches/blender-2.47/source/blender/src/header_view3d.c branches/blender-2.47/source/gameengine/GameLogic/SCA_PythonController.cpp Modified: branches/blender-2.47/source/blender/src/header_view3d.c =================================================================== --- branches/blender-2.47/source/blender/src/header_view3d.c 2008-08-13 17:42:58 UTC (rev 16082) +++ branches/blender-2.47/source/blender/src/header_view3d.c 2008-08-13 18:29:13 UTC (rev 16083) @@ -5077,7 +5077,7 @@ static char string[512]; char *str = string; - str += sprintf(str, "%s", "Snap Mode: %t"); + str += sprintf(str, "%s", "Snap Element: %t"); str += sprintf(str, "%s", "|Vertex%x0"); str += sprintf(str, "%s", "|Edge%x1"); str += sprintf(str, "%s", "|Face%x2"); @@ -5715,7 +5715,7 @@ xco+= XIC; uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_VERTEXSEL, snapmode_pup(), xco,0,XIC+10,YIC, &(G.scene->snap_mode), 0.0, 0.0, 0, 0, "Snapping mode"); xco+= XIC; - uiDefButS(block, MENU, B_NOP, "Mode%t|Closest%x0|Center%x1|Median%x2|Active%x3",xco,0,70,YIC, &G.scene->snap_target, 0, 0, 0, 0, "Snap Target Mode"); + uiDefButS(block, MENU, B_NOP, "Snap Mode%t|Closest%x0|Center%x1|Median%x2|Active%x3",xco,0,70,YIC, &G.scene->snap_target, 0, 0, 0, 0, "Snap Target Mode"); xco+= 70; } else { uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEAR,xco,0,XIC,YIC, &G.scene->snap_flag, 0, 0, 0, 0, "Snap while Ctrl is held during transform (Shift Tab)"); Modified: branches/blender-2.47/source/gameengine/GameLogic/SCA_PythonController.cpp =================================================================== --- branches/blender-2.47/source/gameengine/GameLogic/SCA_PythonController.cpp 2008-08-13 17:42:58 UTC (rev 16082) +++ branches/blender-2.47/source/gameengine/GameLogic/SCA_PythonController.cpp 2008-08-13 18:29:13 UTC (rev 16083) @@ -273,36 +273,16 @@ * break it by hand, then DECREF (which in this case * should always ensure excdict is cleared). */ -/* PyObject *excdict= myPyDict_Copy(m_pythondictionary); - struct _object* resultobj = PyEval_EvalCode((PyCodeObject*)m_bytecode, - excdict, - excdict - ); - PyDict_Clear(excdict); - Py_DECREF(excdict);*/ - -#if 1 PyObject *excdict= PyDict_Copy(m_pythondictionary); PyObject* resultobj = PyEval_EvalCode((PyCodeObject*)m_bytecode, - excdict, - excdict - ); - PyDict_Clear(excdict); - Py_DECREF(excdict); -#else + excdict, excdict); - PyObject* resultobj = PyEval_EvalCode((PyCodeObject*)m_bytecode, - m_pythondictionary, - m_pythondictionary - ); - -#endif - if (resultobj) { Py_DECREF(resultobj); - } else + } + else { // something is wrong, tell the user what went wrong printf("PYTHON SCRIPT ERROR:\n"); @@ -310,6 +290,11 @@ //PyRun_SimpleString(m_scriptText.Ptr()); } + // clear after PyErrPrint - seems it can be using + // something in this dictionary and crash? + PyDict_Clear(excdict); + Py_DECREF(excdict); + m_sCurrentController = NULL; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs