Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * Contributor(s): Joseph Eagar, Campbell Barton 00019 * 00020 * ***** END GPL LICENSE BLOCK ***** 00021 */ 00022 00028 #ifndef PY_IDPROP_API_H 00029 #define PY_IDPROP_API_H 00030 00031 struct ID; 00032 struct IDProperty; 00033 struct BPy_IDGroup_Iter; 00034 00035 typedef struct BPy_IDProperty { 00036 PyObject_VAR_HEAD 00037 struct ID *id; 00038 struct IDProperty *prop; /* must be second member */ 00039 struct IDProperty *parent; 00040 PyObject *data_wrap; 00041 } BPy_IDProperty; 00042 00043 typedef struct BPy_IDArray { 00044 PyObject_VAR_HEAD 00045 struct ID *id; 00046 struct IDProperty *prop; /* must be second member */ 00047 } BPy_IDArray; 00048 00049 typedef struct BPy_IDGroup_Iter { 00050 PyObject_VAR_HEAD 00051 BPy_IDProperty *group; 00052 struct IDProperty *cur; 00053 int mode; 00054 } BPy_IDGroup_Iter; 00055 00056 PyObject *BPy_Wrap_GetKeys(struct IDProperty *prop); 00057 PyObject *BPy_Wrap_GetValues(struct ID *id, struct IDProperty *prop); 00058 PyObject *BPy_Wrap_GetItems(struct ID *id, struct IDProperty *prop); 00059 int BPy_Wrap_SetMapItem(struct IDProperty *prop, PyObject *key, PyObject *val); 00060 00061 00062 PyObject *BPy_IDGroup_WrapData(struct ID *id, struct IDProperty *prop, struct IDProperty *parent); 00063 const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *key, struct IDProperty *group, PyObject *ob); 00064 00065 void IDProp_Init_Types(void); 00066 00067 #define IDPROP_ITER_KEYS 0 00068 #define IDPROP_ITER_ITEMS 1 00069 00070 #endif /* PY_IDPROP_API_H */