rename and negate DISABLE_PYTHON --> WITH_PYTHON
[blender.git] / source / gameengine / Ketsji / KX_PolygonMaterial.cpp
index 63204b16e8b5043a93e1850aa0b6c0d81e881269..898898451258cfb37b2d525f3e6595c80b1d3623 100644 (file)
@@ -54,7 +54,7 @@ KX_PolygonMaterial::KX_PolygonMaterial()
        m_tface(NULL),
        m_mcol(NULL),
        m_material(NULL),
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
        m_pymaterial(NULL),
 #endif
        m_pass(0)
@@ -90,7 +90,7 @@ void KX_PolygonMaterial::Initialize(
        m_tface = tface;
        m_mcol = mcol;
        m_material = ma;
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
        m_pymaterial = 0;
 #endif
        m_pass = 0;
@@ -98,19 +98,19 @@ void KX_PolygonMaterial::Initialize(
 
 KX_PolygonMaterial::~KX_PolygonMaterial()
 {
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
        if (m_pymaterial)
        {
                Py_DECREF(m_pymaterial);
        }
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
 }
 
 bool KX_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingInfo) const 
 {
        bool dopass = false;
 
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
        if (m_pymaterial)
        {
                PyObject *pyRasty = PyCObject_FromVoidPtr((void*)rasty, NULL);  /* new reference */
@@ -130,7 +130,7 @@ bool KX_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingI
                }
        }
        else
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON
        {
                switch (m_pass++)
                {
@@ -201,7 +201,7 @@ void KX_PolygonMaterial::GetMaterialRGBAColor(unsigned char *rgba) const
                RAS_IPolyMaterial::GetMaterialRGBAColor(rgba);
 }
 
-#ifndef DISABLE_PYTHON
+#ifdef WITH_PYTHON
 
 //----------------------------------------------------------------------------
 //Python
@@ -393,4 +393,4 @@ int KX_PolygonMaterial::pyattr_set_specular(void *self_v, const KX_PYATTRIBUTE_D
        return PY_SET_ATTR_SUCCESS;
 }
 
-#endif // DISABLE_PYTHON
+#endif // WITH_PYTHON