diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-05-26 20:15:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-05-26 20:15:40 +0400 |
commit | 33b974ee43c2d6c131860efbe02fd478197b9fda (patch) | |
tree | 459ef7b438e969938baa3f6049e5d0668ea62926 /source/gameengine/Ketsji/KX_BlenderMaterial.cpp | |
parent | 7e48820a97a1cc5d806caa2c7ea5b47f4809aa58 (diff) |
BGE Py API
- Deprecation warnings for using attribute access
- Added dictionary functions to KX_GameObject and ListValue
ob.get(key, default=None)
ob.has_key(key)
ob.has_key is important since there was no way to do something like hasattr(ob, "attr") which can be replaced by ob.has_key("attr") - (both still work of course).
ob.get is just useful in many cases where you want a property if it exists but can fallback to a default.
- CListValue::FindValue was adding a reference but the ~3 places it was used were releasing the reference. added a FindValue that accepts a const char* type to avoid converting python strings to STR_String.
Diffstat (limited to 'source/gameengine/Ketsji/KX_BlenderMaterial.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_BlenderMaterial.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index f1543d752f1..bc2d718203b 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -714,7 +714,6 @@ void KX_BlenderMaterial::setObjectMatrixData(int i, RAS_IRasterizer *ras) mScene->GetObjectList()->FindValue(mMaterial->mapping[i].objconame); if(!obj) return; - obj->Release(); /* FindValue() AddRef's */ obj->Release(); |