diff options
author | Lukas Steiblys <imbusy@imbusy.org> | 2009-10-02 02:29:15 +0400 |
---|---|---|
committer | Lukas Steiblys <imbusy@imbusy.org> | 2009-10-02 02:29:15 +0400 |
commit | 0677398a649b6b8c293df3ce3c6668f0a3be3bc8 (patch) | |
tree | 9d510a5bd23559bf4fae670ed04d7e5d6c12578c /source/gameengine/Ketsji/KX_BlenderMaterial.cpp | |
parent | 59248e9f62006ba05e3098e4d213f3dcb23fe711 (diff) | |
parent | bc942eceacb638735dc4f4f68252c4c207147a70 (diff) |
merge from 23153 to 23595soc-2009-imbusy
Diffstat (limited to 'source/gameengine/Ketsji/KX_BlenderMaterial.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_BlenderMaterial.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index be3d4906761..f5086ca89ac 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -777,6 +777,18 @@ void KX_BlenderMaterial::UpdateIPO( mMaterial->ref = (float)(ref); } +void KX_BlenderMaterial::SetBlenderGLSLShader(int layer) +{ + if(!mBlenderShader) + mBlenderShader = new BL_BlenderShader(mScene, mMaterial->material, layer); + + if(!mBlenderShader->Ok()) { + delete mBlenderShader; + mBlenderShader = 0; + } +} + +#ifndef DISABLE_PYTHON PyMethodDef KX_BlenderMaterial::Methods[] = { @@ -870,18 +882,6 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()") return NULL; } - -void KX_BlenderMaterial::SetBlenderGLSLShader(int layer) -{ - if(!mBlenderShader) - mBlenderShader = new BL_BlenderShader(mScene, mMaterial->material, layer); - - if(!mBlenderShader->Ok()) { - delete mBlenderShader; - mBlenderShader = 0; - } -} - KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getMaterialIndex, "getMaterialIndex()") { return PyLong_FromSsize_t( GetMaterialIndex() ); @@ -941,3 +941,4 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, setBlending , "setBlending( GameLogic.sr return NULL; } +#endif // DISABLE_PYTHON |