~diresu/blender/blender-command-port

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/Object.h

  • Committer: theeth
  • Date: 2008-10-14 16:52:04 UTC
  • Revision ID: vcs-imports@canonical.com-20081014165204-r32w2gm6s0osvdhn
copy back trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * $Id: Object.h 14444 2008-04-16 22:40:48Z hos $
 
3
 *
 
4
 * ***** BEGIN GPL LICENSE BLOCK *****
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU General Public License
 
8
 * as published by the Free Software Foundation; either version 2
 
9
 * of the License, or (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software Foundation,
 
18
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
19
 *
 
20
 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
 
21
 * All rights reserved.
 
22
 *
 
23
 * This is a new part of Blender.
 
24
 *
 
25
 * Contributor(s): Michel Selten
 
26
 *
 
27
 * ***** END GPL LICENSE BLOCK *****
 
28
*/
 
29
 
 
30
#ifndef EXPP_OBJECT_H
 
31
#define EXPP_OBJECT_H
 
32
 
 
33
#include <Python.h>
 
34
#include "DNA_object_types.h"
 
35
 
 
36
/* The Object PyType Object defined in Object.c */
 
37
extern PyTypeObject Object_Type;
 
38
 
 
39
#define BPy_Object_Check(v) \
 
40
    ((v)->ob_type == &Object_Type)      /* for type checking */
 
41
 
 
42
/*****************************************************************************/
 
43
/* Python BPy_Object structure definition.                                  */
 
44
/*****************************************************************************/
 
45
typedef struct {
 
46
        PyObject_HEAD 
 
47
        struct Object *object; /* libdata must be second */
 
48
        short realtype;
 
49
} BPy_Object;
 
50
 
 
51
PyObject *Object_Init( void );
 
52
PyObject *Object_CreatePyObject( struct Object *obj );
 
53
Object *Object_FromPyObject( PyObject * py_obj );
 
54
 
 
55
void Object_updateDag( void *data );
 
56
 
 
57
int EXPP_add_obdata( struct Object *object );
 
58
 
 
59
#endif                          /* EXPP_OBJECT_H */