blender/source/gameengine/Converter/BL_ArmatureChannel.h

97 lines
3.0 KiB
C
Raw Normal View History

/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
2010-02-12 13:34:04 +00:00
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
2011-02-25 13:30:41 +00:00
/** \file BL_ArmatureChannel.h
* \ingroup bgeconv
*/
#ifndef __BL_ARMATURECHANNEL_H__
#define __BL_ARMATURECHANNEL_H__
#include "DNA_action_types.h"
#include "CTR_HashedPtr.h"
#include "CTR_Map.h"
#include "PyObjectPlus.h"
class SCA_IObject;
class KX_GameObject;
class BL_ArmatureObject;
struct bConstraint;
struct bPoseChannel;
struct Object;
struct bPose;
class BL_ArmatureChannel : public PyObjectPlus
{
// use Py_HeaderPtr since we use generic pointer in proxy
Py_HeaderPtr;
private:
friend class BL_ArmatureObject;
struct bPoseChannel* m_posechannel;
BL_ArmatureObject* m_armature;
public:
BL_ArmatureChannel(class BL_ArmatureObject *armature,
struct bPoseChannel *posechannel);
virtual ~BL_ArmatureChannel();
#ifdef WITH_PYTHON
// Python access
2012-09-16 04:58:18 +00:00
virtual PyObject *py_repr(void);
2012-09-16 04:58:18 +00:00
static PyObject *py_attr_getattr(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int py_attr_setattr(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
2012-09-16 04:58:18 +00:00
static PyObject *py_attr_get_joint_rotation(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int py_attr_set_joint_rotation(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
#endif /* WITH_PYTHON */
};
/* this is a factory class to access bBone data field in the GE.
2012-03-09 18:28:30 +00:00
* It's not supposed to be instantiated, we only need it for the Attributes and Method array.
* The actual proxy object will be manually created using NewProxyPtr */
class BL_ArmatureBone : public PyObjectPlus
{
// use Py_HeaderPtr since we use generic pointer in proxy
Py_HeaderPtr;
private:
// make constructor private to make sure no one tries to instantiate this class
BL_ArmatureBone() {}
virtual ~BL_ArmatureBone() {}
public:
#ifdef WITH_PYTHON
static PyObject *py_bone_repr(PyObject *self);
static PyObject *py_bone_get_parent(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static PyObject *py_bone_get_children(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
#endif
};
#endif /* __BL_ARMATURECHANNEL_H__ */