2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2010-01-19 00:59:36 +00:00
|
|
|
* ***** 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.
|
2010-01-19 00:59:36 +00:00
|
|
|
*
|
|
|
|
|
* Contributor(s): Campbell Barton
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
2011-02-27 20:10:08 +00:00
|
|
|
/** \file blender/python/intern/bpy_props.h
|
|
|
|
|
* \ingroup pythonintern
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __BPY_PROPS_H__
|
|
|
|
|
#define __BPY_PROPS_H__
|
2010-01-19 00:59:36 +00:00
|
|
|
|
2011-06-02 08:29:16 +00:00
|
|
|
PyObject *BPY_rna_props(void);
|
2010-01-19 00:59:36 +00:00
|
|
|
|
Datablock ID Properties
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.
In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.
Original author: @artfunkel
Alexander (Blend4Web Team)
Reviewers: brecht, artfunkel, mont29, campbellbarton
Reviewed By: mont29, campbellbarton
Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne
Maniphest Tasks: T37754
Differential Revision: https://developer.blender.org/D113
2017-04-13 12:30:03 +03:00
|
|
|
PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw);
|
|
|
|
|
PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw);
|
|
|
|
|
StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix);
|
|
|
|
|
|
2010-01-19 00:59:36 +00:00
|
|
|
#define PYRNA_STACK_ARRAY 32
|
|
|
|
|
|
|
|
|
|
#endif
|