Merge of itasc branch. Project files, scons and cmake should be working. Makefile...
[blender.git] / source / gameengine / GameLogic / SCA_2DFilterActuator.cpp
index 251a586..9b04e26 100644 (file)
@@ -42,9 +42,8 @@ SCA_2DFilterActuator::SCA_2DFilterActuator(
                float float_arg,
                int int_arg,
                RAS_IRasterizer* rasterizer,
-               RAS_IRenderTools* rendertools,
-        PyTypeObject* T)
-    : SCA_IActuator(gameobj, T),
+               RAS_IRenderTools* rendertools)
+    : SCA_IActuator(gameobj, KX_ACT_2DFILTER),
      m_type(type),
         m_disableMotionBlur(flag),
         m_float_arg(float_arg),
@@ -64,8 +63,6 @@ CValue* SCA_2DFilterActuator::GetReplica()
 {
     SCA_2DFilterActuator* replica = new SCA_2DFilterActuator(*this);
     replica->ProcessReplica();
-    CValue::AddDataToReplica(replica);
-
     return replica;
 }
 
@@ -97,7 +94,7 @@ bool SCA_2DFilterActuator::Update()
 }
 
 
-void SCA_2DFilterActuator::SetShaderText(STR_String text)
+void SCA_2DFilterActuator::SetShaderText(const char *text)
 {
        m_shaderText = text;
 }
@@ -110,34 +107,27 @@ void SCA_2DFilterActuator::SetShaderText(STR_String text)
 
 /* Integration hooks ------------------------------------------------------- */
 PyTypeObject SCA_2DFilterActuator::Type = {
-        PyObject_HEAD_INIT(NULL)
-        0,
-        "SCA_2DFilterActuator",
-        sizeof(PyObjectPlus_Proxy),
-        0,
-               py_base_dealloc,
-               0,
-               0,
-               0,
-               0,
-               py_base_repr,
-               0,0,0,0,0,0,
-               py_base_getattro,
-               py_base_setattro,
-               0,0,0,0,0,0,0,0,0,
-               Methods
-};
-
-
-PyParentObject SCA_2DFilterActuator::Parents[] = {
-        &SCA_2DFilterActuator::Type,
-        &SCA_IActuator::Type,
-        &SCA_ILogicBrick::Type,
-        &CValue::Type,
-        NULL
+       PyVarObject_HEAD_INIT(NULL, 0)
+       "SCA_2DFilterActuator",
+       sizeof(PyObjectPlus_Proxy),
+       0,
+       py_base_dealloc,
+       0,
+       0,
+       0,
+       0,
+       py_base_repr,
+       0,0,0,0,0,0,0,0,0,
+       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+       0,0,0,0,0,0,0,
+       Methods,
+       0,
+       0,
+       &SCA_IActuator::Type,
+       0,0,0,0,0,0,
+       py_base_new
 };
 
-
 PyMethodDef SCA_2DFilterActuator::Methods[] = {
        /* add python functions to deal with m_msg... */
     {NULL,NULL}
@@ -146,19 +136,8 @@ PyMethodDef SCA_2DFilterActuator::Methods[] = {
 PyAttributeDef SCA_2DFilterActuator::Attributes[] = {
        KX_PYATTRIBUTE_STRING_RW("shaderText", 0, 64000, false, SCA_2DFilterActuator, m_shaderText),
        KX_PYATTRIBUTE_SHORT_RW("disableMotionBlur", 0, 1, true, SCA_2DFilterActuator, m_disableMotionBlur),
-       KX_PYATTRIBUTE_ENUM_RW("type",RAS_2DFilterManager::RAS_2DFILTER_ENABLED,RAS_2DFilterManager::RAS_2DFILTER_NUMBER_OF_FILTERS,false,SCA_2DFilterActuator,m_type),
-       KX_PYATTRIBUTE_INT_RW("passNb", 0, 100, true, SCA_2DFilterActuator, m_int_arg),
+       KX_PYATTRIBUTE_ENUM_RW("mode",RAS_2DFilterManager::RAS_2DFILTER_ENABLED,RAS_2DFilterManager::RAS_2DFILTER_NUMBER_OF_FILTERS,false,SCA_2DFilterActuator,m_type),
+       KX_PYATTRIBUTE_INT_RW("passNumber", 0, 100, true, SCA_2DFilterActuator, m_int_arg),
        KX_PYATTRIBUTE_FLOAT_RW("value", 0.0, 100.0, SCA_2DFilterActuator, m_float_arg),
        { NULL }        //Sentinel
 };
-
-PyObject* SCA_2DFilterActuator::py_getattro(PyObject *attr) 
-{
-    py_getattro_up(SCA_IActuator);
-}
-
-int SCA_2DFilterActuator::py_setattro(PyObject *attr, PyObject* value) 
-{
-       py_setattro_up(SCA_IActuator);
-}
-