[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19533] trunk/blender/source/gameengine/ Expressions/PyObjectPlus.cpp: include PyObjectPlus method in __dict__

Campbell Barton ideasman42 at gmail.com
Sat Apr 4 11:54:05 CEST 2009


Revision: 19533
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19533
Author:   campbellbarton
Date:     2009-04-04 11:54:05 +0200 (Sat, 04 Apr 2009)

Log Message:
-----------
include PyObjectPlus method in __dict__

Modified Paths:
--------------
    trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp

Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp	2009-04-04 08:20:52 UTC (rev 19532)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp	2009-04-04 09:54:05 UTC (rev 19533)
@@ -110,6 +110,9 @@
 {
 	PyObject *descr = PyDict_GetItem(Type.tp_dict, attr); \
 	if (descr == NULL) {
+		if (strcmp(PyString_AsString(attr), "__dict__")==0) {
+			return py_getattr_dict(NULL, Methods, NULL); /* no Attributes yet */
+		}
 		PyErr_SetString(PyExc_AttributeError, "attribute not found");
 		return NULL;
 	} else {





More information about the Bf-blender-cvs mailing list