Revision: 48357
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48357
Author:   moguri
Date:     2012-06-28 06:22:47 +0000 (Thu, 28 Jun 2012)
Log Message:
-----------
Removing channel manipulation from the Action Actuator Python API since this 
has been broken since the animation changes from Pepper. 
BL_ArmatureObject.channels should be used instead. For more information see bug 
#28843 for more info:
http://projects.blender.org/tracker/index.php?func=detail&aid=28843&group_id=9&atid=306

Modified Paths:
--------------
    trunk/blender/doc/python_api/rst/bge.types.rst
    trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp

Modified: trunk/blender/doc/python_api/rst/bge.types.rst
===================================================================
--- trunk/blender/doc/python_api/rst/bge.types.rst      2012-06-28 05:33:09 UTC 
(rev 48356)
+++ trunk/blender/doc/python_api/rst/bge.types.rst      2012-06-28 06:22:47 UTC 
(rev 48357)
@@ -256,12 +256,6 @@
 
       :type: string
 
-   .. attribute:: channelNames
-
-      A list of channel names that may be used with :data:`setChannel` and 
:data:`getChannel`.
-
-      :type: list of strings
-
    .. attribute:: frameStart
 
       Specifies the starting frame of the animation.
@@ -322,26 +316,6 @@
 
       :type: string
 
-   .. method:: setChannel(channel, matrix)
-
-      Alternative to the 2 arguments, 4 arguments (channel, matrix, loc, size, 
quat) are also supported.
-
-      :arg channel: A string specifying the name of the bone channel, error 
raised if not in :data:`channelNames`.
-      :type channel: string
-      :arg matrix: A 4x4 matrix specifying the overriding transformation as an 
offset from the bone's rest position.
-      :arg  matrix: list [[float]]
-
-      .. note::
-         
-         These values are relative to the bones rest position, currently the 
api has no way to get this info (which is annoying), but can be worked around 
by using bones with a rest pose that has no translation.
-
-   .. method:: getChannel(channel)
-
-      :arg channel: A string specifying the name of the bone channel. error 
raised if not in :data:`channelNames`.
-      :type channel: string
-      :return: (loc, size, quat)
-      :rtype: tuple
-
 .. class:: BL_Shader(PyObjectPlus)
 
    BL_Shader GLSL shaders.

Modified: trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp     
2012-06-28 05:33:09 UTC (rev 48356)
+++ trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp     
2012-06-28 06:22:47 UTC (rev 48357)
@@ -350,6 +350,9 @@
 
 PyObject* BL_ActionActuator::PyGetChannel(PyObject* value)
 {
+       PyErr_SetString(PyExc_NotImplementedError, 
"BL_ActionActuator.getChannel() no longer works, please use 
BL_ArmatureObject.channels instead");
+       return NULL;
+#if 0 // XXX To be removed in a later version (first removed in 2.64)
        const char *string= _PyUnicode_AsString(value);
 
        if (GetParent()->GetGameObjectType() != SCA_IObject::OBJ_ARMATURE)
@@ -407,6 +410,7 @@
                pchan->size[0], pchan->size[1], pchan->size[2],
                pchan->quat[0], pchan->quat[1], pchan->quat[2], pchan->quat[3] 
);
 #endif
+#endif
 }
 
 /*     setChannel                                                         */
@@ -416,6 +420,10 @@
 "\t - matrix    : A 4x4 matrix specifying the overriding transformation\n"
 "\t               as an offset from the bone's rest position.\n")
 {
+       PyErr_SetString(PyExc_NotImplementedError, 
"BL_ActionActuator.setChannel() no longer works, please use 
BL_ArmatureObject.channels instead");
+       return NULL;
+
+#if 0 // XXX To be removed in a later version (first removed in 2.64)
        BL_ArmatureObject *obj = (BL_ArmatureObject*)GetParent();
        char *string;
        PyObject *pymat= NULL;
@@ -497,6 +505,7 @@
        }
        
        Py_RETURN_NONE;
+#endif
 }
 
 /* ------------------------------------------------------------------------- */
@@ -583,6 +592,10 @@
 
 PyObject* BL_ActionActuator::pyattr_get_channel_names(void *self_v, const 
KX_PYATTRIBUTE_DEF *attrdef)
 {
+       PyErr_SetString(PyExc_NotImplementedError, 
"BL_ActionActuator.channelNames no longer works, please use 
BL_ArmatureObject.channels instead");
+       return NULL;
+
+#if 0 // XXX To be removed in a later version (first removed in 2.64)
        BL_ActionActuator* self= static_cast<BL_ActionActuator*>(self_v);
        PyObject *ret= PyList_New(0);
        PyObject *item;
@@ -605,6 +618,7 @@
        }
        
        return ret;
+#endif
 }
 
 PyObject* BL_ActionActuator::pyattr_get_use_continue(void *self_v, const 
KX_PYATTRIBUTE_DEF *attrdef)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to