BGE PyAPI fixes
[blender.git] / source / gameengine / Expressions / Value.cpp
index 7f4ed388442676494b076bb016242ab2f0c2de51..e6ef9733da8bcf93fd63f0bc7072edc4cb4da086 100644 (file)
@@ -555,15 +555,16 @@ PyAttributeDef CValue::Attributes[] = {
 
 
 PyObject*      CValue::py_getattro(PyObject *attr)
-{
-       ShowDeprecationWarning("val = ob.attr", "val = ob['attr']");
-       
+{      
        char *attr_str= PyString_AsString(attr);
        CValue* resultattr = GetProperty(attr_str);
        if (resultattr)
        {
+               /* only show the wanting here because python inspects for __class__ and KX_MeshProxy uses CValues name attr */
+               ShowDeprecationWarning("val = ob.attr", "val = ob['attr']");
+               
                PyObject* pyconvert = resultattr->ConvertValueToPython();
-       
+               
                if (pyconvert)
                        return pyconvert;
                else