|
Blender
V2.93
|
#include <Python.h>#include "RNA_types.h"#include "BLI_listbase.h"#include "BLI_utildefines.h"#include "bpy_capi_utils.h"#include "bpy_props.h"#include "bpy_rna.h"#include "BKE_idprop.h"#include "RNA_access.h"#include "RNA_define.h"#include "RNA_enum_types.h"#include "MEM_guardedalloc.h"#include "DNA_ID.h"#include "../generic/py_capi_utils.h"Go to the source code of this file.
Classes | |
| struct | BPyPropStore |
Macros | |
| #define | PY_SSIZE_T_CLEAN |
| #define | ASSIGN_STATIC(_name) pymeth_##_name = PyDict_GetItemString(submodule_dict, #_name) |
Shared Method Utilities | |
| #define | BPY_PROPDEF_HEAD(_func) |
| #define | BPY_PROPDEF_CHECK(_func, _property_flag_items, _property_flag_override_items) |
| #define | BPY_PROPDEF_SUBTYPE_CHECK(_func, _property_flag_items, _property_flag_override_items, _subtype) |
Shared Method Doc-Strings | |
| #define | BPY_PROPDEF_NAME_DOC |
| #define | BPY_PROPDEF_DESC_DOC |
| #define | BPY_PROPDEF_UNIT_DOC |
| #define | BPY_PROPDEF_NUM_MIN_DOC |
| #define | BPY_PROPDEF_NUM_MAX_DOC |
| #define | BPY_PROPDEF_NUM_SOFTMIN_DOC |
| #define | BPY_PROPDEF_NUM_SOFTMAX_DOC |
| #define | BPY_PROPDEF_VECSIZE_DOC |
| #define | BPY_PROPDEF_INT_STEP_DOC |
| #define | BPY_PROPDEF_FLOAT_STEP_DOC |
| #define | BPY_PROPDEF_FLOAT_PREC_DOC |
| #define | BPY_PROPDEF_UPDATE_DOC |
| #define | BPY_PROPDEF_POLL_DOC |
| #define | BPY_PROPDEF_GET_DOC |
| #define | BPY_PROPDEF_SET_DOC |
| #define | BPY_PROPDEF_TYPE_DOC |
| #define | BPY_PROPDEF_TAGS_DOC |
Functions | |
| static PyObject * | pyrna_struct_as_instance (PointerRNA *ptr) |
| static void | bpy_prop_assign_flag (PropertyRNA *prop, const int flag) |
| static void | bpy_prop_assign_flag_override (PropertyRNA *prop, const int flag_override) |
Shared Property Callbacks | |
Unique data is accessed via RNA_property_py_data_get | |
| static void | bpy_prop_update_fn (struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop) |
Boolean Property Callbacks | |
| static bool | bpy_prop_boolean_get_fn (struct PointerRNA *ptr, struct PropertyRNA *prop) |
| static void | bpy_prop_boolean_set_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, bool value) |
| static void | bpy_prop_boolean_array_get_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, bool *values) |
| static void | bpy_prop_boolean_array_set_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, const bool *values) |
Int Property Callbacks | |
| static int | bpy_prop_int_get_fn (struct PointerRNA *ptr, struct PropertyRNA *prop) |
| static void | bpy_prop_int_set_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, int value) |
| static void | bpy_prop_int_array_get_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, int *values) |
| static void | bpy_prop_int_array_set_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, const int *values) |
Float Property Callbacks | |
| static float | bpy_prop_float_get_fn (struct PointerRNA *ptr, struct PropertyRNA *prop) |
| static void | bpy_prop_float_set_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, float value) |
| static void | bpy_prop_float_array_get_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, float *values) |
| static void | bpy_prop_float_array_set_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, const float *values) |
String Property Callbacks | |
| static void | bpy_prop_string_get_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, char *value) |
| static int | bpy_prop_string_length_fn (struct PointerRNA *ptr, struct PropertyRNA *prop) |
| static void | bpy_prop_string_set_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, const char *value) |
Pointer Property Callbacks | |
| static bool | bpy_prop_pointer_poll_fn (struct PointerRNA *self, PointerRNA candidate, struct PropertyRNA *prop) |
Enum Property Callbacks | |
| static int | bpy_prop_enum_get_fn (struct PointerRNA *ptr, struct PropertyRNA *prop) |
| static void | bpy_prop_enum_set_fn (struct PointerRNA *ptr, struct PropertyRNA *prop, int value) |
| static bool | py_long_as_int (PyObject *py_long, int *r_int) |
| static int | icon_id_from_name (const char *name) |
| static const EnumPropertyItem * | enum_items_from_py (PyObject *seq_fast, PyObject *def, int *defvalue, const bool is_enum_flag) |
| static const EnumPropertyItem * | bpy_prop_enum_itemf_fn (struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) |
| static int | bpy_prop_callback_check (PyObject *py_func, const char *keyword, int argcount) |
Shared Callback Assignment | |
| static void | bpy_prop_callback_assign_update (struct PropertyRNA *prop, PyObject *update_fn) |
| static void | bpy_prop_callback_assign_pointer (struct PropertyRNA *prop, PyObject *poll_fn) |
| static void | bpy_prop_callback_assign_boolean (struct PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) |
| static void | bpy_prop_callback_assign_boolean_array (struct PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) |
| static void | bpy_prop_callback_assign_int (struct PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) |
| static void | bpy_prop_callback_assign_int_array (struct PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) |
| static void | bpy_prop_callback_assign_float (struct PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) |
| static void | bpy_prop_callback_assign_float_array (struct PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) |
| static void | bpy_prop_callback_assign_string (struct PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) |
| static void | bpy_prop_callback_assign_enum (struct PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *itemf_fn) |
Module Methods | |
| PyDoc_STRVAR (BPy_BoolProperty_doc, ".. function:: BoolProperty(name=\"\", " "description=\"\", " "default=False, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new boolean property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC) | |
| static PyObject * | BPy_BoolProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_BoolVectorProperty_doc, ".. function:: BoolVectorProperty(name=\"\", " "description=\"\", " "default=(False, False, False), " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "size=3, " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new vector boolean property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: sequence of booleans the length of *size*.\n" " :type default: sequence\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_ARRAY_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC) | |
| static PyObject * | BPy_BoolVectorProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_IntProperty_doc, ".. function:: IntProperty(name=\"\", " "description=\"\", " "default=0, " "min=-2**31, max=2**31-1, " "soft_min=-2**31, soft_max=2**31-1, " "step=1, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new int property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_NUM_MIN_DOC " :type min: int\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: int\n" BPY_PROPDEF_NUM_SOFTMAX_DOC " :type soft_min: int\n" BPY_PROPDEF_NUM_SOFTMIN_DOC " :type soft_max: int\n" BPY_PROPDEF_INT_STEP_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC) | |
| static PyObject * | BPy_IntProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_IntVectorProperty_doc, ".. function:: IntVectorProperty(name=\"\", " "description=\"\", " "default=(0, 0, 0), min=-2**31, max=2**31-1, " "soft_min=-2**31, " "soft_max=2**31-1, " "step=1, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "size=3, " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new vector int property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: sequence of ints the length of *size*.\n" " :type default: sequence\n" BPY_PROPDEF_NUM_MIN_DOC " :type min: int\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: int\n" BPY_PROPDEF_NUM_SOFTMIN_DOC " :type soft_min: int\n" BPY_PROPDEF_NUM_SOFTMAX_DOC " :type soft_max: int\n" BPY_PROPDEF_INT_STEP_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_ARRAY_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC) | |
| static PyObject * | BPy_IntVectorProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_FloatProperty_doc, ".. function:: FloatProperty(name=\"\", " "description=\"\", " "default=0.0, " "min=-3.402823e+38, max=3.402823e+38, " "soft_min=-3.402823e+38, soft_max=3.402823e+38, " "step=3, " "precision=2, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "unit='NONE', " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new float (single precision) property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_NUM_MIN_DOC " :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC " :type soft_min: float\n" BPY_PROPDEF_NUM_SOFTMAX_DOC " :type soft_max: float\n" BPY_PROPDEF_FLOAT_STEP_DOC BPY_PROPDEF_FLOAT_PREC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC) | |
| static PyObject * | BPy_FloatProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_FloatVectorProperty_doc, ".. function:: FloatVectorProperty(name=\"\", " "description=\"\", " "default=(0.0, 0.0, 0.0), " "min=sys.float_info.min, max=sys.float_info.max, " "soft_min=sys.float_info.min, soft_max=sys.float_info.max, " "step=3, " "precision=2, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "unit='NONE', " "size=3, " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new vector float property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: sequence of floats the length of *size*.\n" " :type default: sequence\n" BPY_PROPDEF_NUM_MIN_DOC " :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC " :type soft_min: float\n" BPY_PROPDEF_NUM_SOFTMAX_DOC " :type soft_max: float\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_FLOAT_STEP_DOC BPY_PROPDEF_FLOAT_PREC_DOC BPY_PROPDEF_SUBTYPE_ARRAY_DOC BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC) | |
| static PyObject * | BPy_FloatVectorProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_StringProperty_doc, ".. function:: StringProperty(name=\"\", " "description=\"\", " "default=\"\", " "maxlen=0, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new string property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: initializer string.\n" " :type default: string\n" " :arg maxlen: maximum length of the string.\n" " :type maxlen: int\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_STRING_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC) | |
| static PyObject * | BPy_StringProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_EnumProperty_doc, ".. function:: EnumProperty(items, " "name=\"\", " "description=\"\", " "default=None, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new enumerator property definition.\n" "\n" " :arg items: sequence of enum items formatted:\n" " ``[(identifier, name, description, icon, number), ...]``.\n" "\n" " The first three elements of the tuples are mandatory.\n" "\n" " :identifier: The identifier is used for Python access.\n" " :name: Name for the interface.\n" " :description: Used for documentation and tooltips.\n" " :icon: An icon string identifier or integer icon value\n" " (e.g. returned by :class:`bpy.types.UILayout.icon`)\n" " :number: Unique value used as the identifier for this item (stored in file data).\n" " Use when the identifier may need to change. If the *ENUM_FLAG* option is used,\n" " the values are bitmasks and should be powers of two.\n" "\n" " When an item only contains 4 items they define ``(identifier, name, description, " "number)``.\n" "\n" " Separators may be added using None instead of a tuple." "\n" " For dynamic values a callback can be passed which returns a list in\n" " the same format as the static list.\n" " This function must take 2 arguments ``(self, context)``, **context may be None**.\n" "\n" " .. warning::\n" "\n" " There is a known bug with using a callback,\n" " Python must keep a reference to the strings returned by the callback or Blender\n" " will misbehave or even crash." "\n" " :type items: sequence of string tuples or a function\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: The default value for this enum, a string from the identifiers used in " "*items*, or integer matching an item number.\n" " If the *ENUM_FLAG* option is used this must be a set of such string identifiers " "instead.\n" " WARNING: Strings can not be specified for dynamic enums\n" " (i.e. if a callback function is given as *items* parameter).\n" " :type default: string, integer or set\n" BPY_PROPDEF_OPTIONS_ENUM_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC BPY_PROPDEF_SET_DOC) | |
| static PyObject * | BPy_EnumProperty (PyObject *self, PyObject *args, PyObject *kw) |
| StructRNA * | pointer_type_from_py (PyObject *value, const char *error_prefix) |
| PyDoc_STRVAR (BPy_PointerProperty_doc, ".. function:: PointerProperty(type=None, " "name=\"\", " "description=\"\", " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "poll=None, " "update=None)\n" "\n" " Returns a new pointer property definition.\n" "\n" BPY_PROPDEF_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_POLL_DOC BPY_PROPDEF_UPDATE_DOC) | |
| PyObject * | BPy_PointerProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_CollectionProperty_doc, ".. function:: CollectionProperty(type=None, " "name=\"\", " "description=\"\", " "options={'ANIMATABLE'}, " "override=set(), " "tags=set())\n" "\n" " Returns a new collection property definition.\n" "\n" BPY_PROPDEF_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC BPY_PROPDEF_TAGS_DOC) | |
| PyObject * | BPy_CollectionProperty (PyObject *self, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (BPy_RemoveProperty_doc, ".. function:: RemoveProperty(cls, attr)\n" "\n" " Removes a dynamically defined property.\n" "\n" " :arg cls: The class containing the property (must be a positional argument).\n" " :type cls: type\n" " :arg attr: Property name (must be passed as a keyword).\n" " :type attr: string\n" "\n" ".. note:: Typically this function doesn't need to be accessed directly.\n" " Instead use ``del cls.attr``\n") | |
| static PyObject * | BPy_RemoveProperty (PyObject *self, PyObject *args, PyObject *kw) |
Variables | |
| static PyObject * | pymeth_BoolProperty = NULL |
| static PyObject * | pymeth_BoolVectorProperty = NULL |
| static PyObject * | pymeth_IntProperty = NULL |
| static PyObject * | pymeth_IntVectorProperty = NULL |
| static PyObject * | pymeth_FloatProperty = NULL |
| static PyObject * | pymeth_FloatVectorProperty = NULL |
| static PyObject * | pymeth_StringProperty = NULL |
| static PyObject * | pymeth_EnumProperty = NULL |
| static PyObject * | pymeth_PointerProperty = NULL |
| static PyObject * | pymeth_CollectionProperty = NULL |
| static PyObject * | pymeth_RemoveProperty = NULL |
Shared Enums & Doc-Strings | |
| #define | BPY_PROPDEF_OPTIONS_DOC |
| #define | BPY_PROPDEF_OPTIONS_ENUM_DOC |
| #define | BPY_PROPDEF_OPTIONS_OVERRIDE_DOC |
| #define | BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC |
| #define | BPY_PROPDEF_SUBTYPE_STRING_DOC |
| #define | BPY_PROPDEF_SUBTYPE_NUMBER_DOC |
| #define | BPY_PROPDEF_SUBTYPE_ARRAY_DOC |
| static const EnumPropertyItem | property_flag_items [] |
| static const EnumPropertyItem | property_flag_enum_items [] |
| static const EnumPropertyItem | property_flag_override_items [] |
| static const EnumPropertyItem | property_flag_override_collection_items [] |
| static const EnumPropertyItem | property_subtype_string_items [] |
| static const EnumPropertyItem | property_subtype_number_items [] |
| static const EnumPropertyItem | property_subtype_array_items [] |
Python Property Storage API | |
Functionality needed to use Python native callbacks from generic C RNA callbacks. | |
| #define | BPY_PROP_STORE_PY_DATA_SIZE (sizeof(((struct BPyPropStore *)NULL)->py_data) / sizeof(PyObject *)) |
| #define | ASSIGN_PYOBJECT_INCREF(a, b) |
| static ListBase | g_bpy_prop_store_list = {NULL, NULL} |
| static struct BPyPropStore * | bpy_prop_py_data_ensure (struct PropertyRNA *prop) |
| static void | bpy_prop_py_data_remove (PropertyRNA *prop) |
Deferred Property Type | |
Operators and classes use this so it can store the arguments given but defer running it until the operator runs where these values are used to setup the default arguments for that operator instance. | |
| static PyGetSetDef | bpy_prop_deferred_getset [] |
| PyTypeObject | bpy_prop_deferred_Type |
| static void | bpy_prop_deferred_dealloc (BPy_PropDeferred *self) |
| static int | bpy_prop_deferred_traverse (BPy_PropDeferred *self, visitproc visit, void *arg) |
| static int | bpy_prop_deferred_clear (BPy_PropDeferred *self) |
| static PyObject * | bpy_prop_deferred_repr (BPy_PropDeferred *self) |
| static PyObject * | bpy_prop_deferred_call (BPy_PropDeferred *UNUSED(self), PyObject *UNUSED(args), PyObject *UNUSED(kw)) |
| static PyObject * | bpy_prop_deferred_function_get (BPy_PropDeferred *self, void *UNUSED(closure)) |
| static PyObject * | bpy_prop_deferred_keywords_get (BPy_PropDeferred *self, void *UNUSED(closure)) |
| PyDoc_STRVAR (bpy_prop_deferred_doc, "Intermediate storage for properties before registration.\n" "\n" ".. note::\n" "\n" " This is not part of the stable API and may change between releases.") | |
| static PyObject * | bpy_prop_deferred_data_CreatePyObject (PyObject *fn, PyObject *kw) |
Main Module <tt>bpy.props</tt> | |
| static struct PyMethodDef | props_methods [] |
| static struct PyModuleDef | props_module |
| static int | props_visit (PyObject *UNUSED(self), visitproc visit, void *arg) |
| static int | props_clear (PyObject *UNUSED(self)) |
| PyObject * | BPY_rna_props (void) |
| void | BPY_rna_props_clear_all (void) |
This file defines 'bpy.props' module used so scripts can define their own rna properties for use with python operators or adding new properties to existing blender types.
Definition in file bpy_props.c.
| #define ASSIGN_PYOBJECT_INCREF | ( | a, | |
| b | |||
| ) |
Definition at line 265 of file bpy_props.c.
| #define ASSIGN_STATIC | ( | _name | ) | pymeth_##_name = PyDict_GetItemString(submodule_dict, #_name) |
| #define BPY_PROP_STORE_PY_DATA_SIZE (sizeof(((struct BPyPropStore *)NULL)->py_data) / sizeof(PyObject *)) |
Definition at line 262 of file bpy_props.c.
| #define BPY_PROPDEF_CHECK | ( | _func, | |
| _property_flag_items, | |||
| _property_flag_override_items | |||
| ) |
Definition at line 2247 of file bpy_props.c.
| #define BPY_PROPDEF_DESC_DOC |
Definition at line 2310 of file bpy_props.c.
| #define BPY_PROPDEF_FLOAT_PREC_DOC |
Definition at line 2349 of file bpy_props.c.
| #define BPY_PROPDEF_FLOAT_STEP_DOC |
Definition at line 2344 of file bpy_props.c.
| #define BPY_PROPDEF_GET_DOC |
Definition at line 2365 of file bpy_props.c.
| #define BPY_PROPDEF_HEAD | ( | _func | ) |
Definition at line 2223 of file bpy_props.c.
| #define BPY_PROPDEF_INT_STEP_DOC |
Definition at line 2339 of file bpy_props.c.
| #define BPY_PROPDEF_NAME_DOC |
Definition at line 2306 of file bpy_props.c.
| #define BPY_PROPDEF_NUM_MAX_DOC |
Definition at line 2323 of file bpy_props.c.
| #define BPY_PROPDEF_NUM_MIN_DOC |
Definition at line 2319 of file bpy_props.c.
| #define BPY_PROPDEF_NUM_SOFTMAX_DOC |
Definition at line 2331 of file bpy_props.c.
| #define BPY_PROPDEF_NUM_SOFTMIN_DOC |
Definition at line 2327 of file bpy_props.c.
| #define BPY_PROPDEF_OPTIONS_DOC |
Definition at line 69 of file bpy_props.c.
| #define BPY_PROPDEF_OPTIONS_ENUM_DOC |
Definition at line 84 of file bpy_props.c.
| #define BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC |
Definition at line 121 of file bpy_props.c.
| #define BPY_PROPDEF_OPTIONS_OVERRIDE_DOC |
Definition at line 98 of file bpy_props.c.
| #define BPY_PROPDEF_POLL_DOC |
Definition at line 2359 of file bpy_props.c.
| #define BPY_PROPDEF_SET_DOC |
Definition at line 2370 of file bpy_props.c.
| #define BPY_PROPDEF_SUBTYPE_ARRAY_DOC |
Definition at line 186 of file bpy_props.c.
| #define BPY_PROPDEF_SUBTYPE_CHECK | ( | _func, | |
| _property_flag_items, | |||
| _property_flag_override_items, | |||
| _subtype | |||
| ) |
Definition at line 2284 of file bpy_props.c.
| #define BPY_PROPDEF_SUBTYPE_NUMBER_DOC |
Definition at line 160 of file bpy_props.c.
| #define BPY_PROPDEF_SUBTYPE_STRING_DOC |
Definition at line 139 of file bpy_props.c.
| #define BPY_PROPDEF_TAGS_DOC |
Definition at line 2379 of file bpy_props.c.
| #define BPY_PROPDEF_TYPE_DOC |
Definition at line 2375 of file bpy_props.c.
| #define BPY_PROPDEF_UNIT_DOC |
Definition at line 2314 of file bpy_props.c.
| #define BPY_PROPDEF_UPDATE_DOC |
Definition at line 2353 of file bpy_props.c.
| #define BPY_PROPDEF_VECSIZE_DOC |
Definition at line 2335 of file bpy_props.c.
| #define PY_SSIZE_T_CLEAN |
Definition at line 26 of file bpy_props.c.
|
static |
Definition at line 2418 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_boolean(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_HEAD, BPY_PROPDEF_SUBTYPE_CHECK, BPyPropStore::get_fn, NULL, PROP_BOOLEAN, PROP_NONE, property_flag_items, property_flag_override_items, property_subtype_number_items, PyC_ParseBool(), RNA_def_property(), RNA_def_property_boolean_default(), RNA_def_property_duplicate_pointers(), RNA_def_property_tags(), RNA_def_property_ui_text(), BPyPropStore::set_fn, and BPyPropStore::update_fn.
|
static |
Definition at line 2534 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_boolean_array(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_HEAD, BPY_PROPDEF_SUBTYPE_CHECK, BPyPropStore::get_fn, NULL, PROP_BOOLEAN, PROP_NONE, property_flag_items, property_flag_override_items, property_subtype_array_items, PyC_AsArray(), PYRNA_STACK_ARRAY, RNA_def_boolean_array(), RNA_def_property(), RNA_def_property_array(), RNA_def_property_boolean_array_default(), RNA_def_property_duplicate_pointers(), RNA_def_property_tags(), RNA_def_property_ui_text(), BPyPropStore::set_fn, size(), STRINGIFY, and BPyPropStore::update_fn.
| PyObject* BPy_CollectionProperty | ( | PyObject * | self, |
| PyObject * | args, | ||
| PyObject * | kw | ||
| ) |
Definition at line 3693 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), BPY_PROPDEF_CHECK, BPY_PROPDEF_HEAD, NULL, pointer_type_from_py(), property_flag_items, property_flag_override_collection_items, RNA_def_collection_runtime(), RNA_def_property_duplicate_pointers(), RNA_def_property_tags(), RNA_def_struct_flag(), RNA_PropertyGroup, RNA_struct_idprops_contains_datablock(), RNA_struct_is_a(), RNA_struct_ui_name(), STRUCT_CONTAINS_DATABLOCK_IDPROPERTIES, and type.
Referenced by deferred_register_prop().
|
static |
Definition at line 3397 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_enum(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_CHECK, BPY_PROPDEF_HEAD, DummyRNA_NULL_items, enum_items_from_py(), BPyPropStore::get_fn, MEM_freeN, NULL, PROP_ENUM_FLAG, property_flag_enum_items, property_flag_override_items, py_long_as_int(), RNA_def_enum(), RNA_def_enum_flag(), RNA_def_property_duplicate_pointers(), RNA_def_property_tags(), BPyPropStore::set_fn, and BPyPropStore::update_fn.
|
static |
Definition at line 2964 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_float(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_HEAD, BPY_PROPDEF_SUBTYPE_CHECK, BPyPropStore::get_fn, max, MAX2, min, MIN2, NULL, PROP_FLOAT, PROP_NONE, PROP_UNIT_NONE, property_flag_items, property_flag_override_items, property_subtype_number_items, RNA_def_property(), RNA_def_property_duplicate_pointers(), RNA_def_property_float_default(), RNA_def_property_range(), RNA_def_property_tags(), RNA_def_property_ui_range(), RNA_def_property_ui_text(), rna_enum_property_unit_items, RNA_enum_value_from_id(), BPyPropStore::set_fn, and BPyPropStore::update_fn.
|
static |
Definition at line 3096 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_float_array(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_HEAD, BPY_PROPDEF_SUBTYPE_CHECK, BPyPropStore::get_fn, max, MAX2, min, MIN2, NULL, PROP_FLOAT, PROP_NONE, PROP_UNIT_NONE, property_flag_items, property_flag_override_items, property_subtype_array_items, PyC_AsArray(), PYRNA_STACK_ARRAY, RNA_def_property(), RNA_def_property_array(), RNA_def_property_duplicate_pointers(), RNA_def_property_float_array_default(), RNA_def_property_range(), RNA_def_property_tags(), RNA_def_property_ui_range(), RNA_def_property_ui_text(), rna_enum_property_unit_items, RNA_enum_value_from_id(), BPyPropStore::set_fn, size(), STRINGIFY, and BPyPropStore::update_fn.
|
static |
Definition at line 2677 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_int(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_HEAD, BPY_PROPDEF_SUBTYPE_CHECK, BPyPropStore::get_fn, max, MAX2, min, MIN2, NULL, PROP_INT, PROP_NONE, property_flag_items, property_flag_override_items, property_subtype_number_items, RNA_def_property(), RNA_def_property_duplicate_pointers(), RNA_def_property_int_default(), RNA_def_property_range(), RNA_def_property_tags(), RNA_def_property_ui_range(), RNA_def_property_ui_text(), BPyPropStore::set_fn, and BPyPropStore::update_fn.
|
static |
Definition at line 2810 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_int_array(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_HEAD, BPY_PROPDEF_SUBTYPE_CHECK, BPyPropStore::get_fn, max, MAX2, min, MIN2, NULL, PROP_INT, PROP_NONE, property_flag_items, property_flag_override_items, property_subtype_array_items, PyC_AsArray(), PYRNA_STACK_ARRAY, RNA_def_property(), RNA_def_property_array(), RNA_def_property_duplicate_pointers(), RNA_def_property_int_array_default(), RNA_def_property_range(), RNA_def_property_tags(), RNA_def_property_ui_range(), RNA_def_property_ui_text(), BPyPropStore::set_fn, size(), STRINGIFY, and BPyPropStore::update_fn.
| PyObject* BPy_PointerProperty | ( | PyObject * | self, |
| PyObject * | args, | ||
| PyObject * | kw | ||
| ) |
Definition at line 3587 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_pointer(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_CHECK, BPY_PROPDEF_HEAD, NULL, pointer_type_from_py(), BPyPropStore::poll_fn, property_flag_items, property_flag_override_items, RNA_def_pointer_runtime(), RNA_def_property_duplicate_pointers(), RNA_def_property_tags(), RNA_def_struct_flag(), RNA_ID, RNA_PropertyGroup, RNA_struct_idprops_contains_datablock(), RNA_struct_is_a(), RNA_struct_is_ID(), RNA_struct_ui_name(), STRUCT_CONTAINS_DATABLOCK_IDPROPERTIES, type, and BPyPropStore::update_fn.
Referenced by deferred_register_prop().
|
static |
Definition at line 464 of file bpy_props.c.
References PROP_ANIMATABLE, RNA_def_property_clear_flag(), and RNA_def_property_flag().
Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_CollectionProperty(), BPy_EnumProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), and BPy_StringProperty().
|
static |
Definition at line 477 of file bpy_props.c.
References RNA_def_property_override_flag().
Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_CollectionProperty(), BPy_EnumProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), and BPy_StringProperty().
|
static |
Definition at line 668 of file bpy_props.c.
References BLI_assert, BPyPropStore::get_fn, len, NULL, ptr, BPyPropStore::py_data, PyC_AsArray(), PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_array_length(), and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_boolean_array().
|
static |
Definition at line 731 of file bpy_props.c.
References BLI_assert, len, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), PyC_Tuple_PackArray_Bool(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_array_length(), RNA_property_py_data_get(), and BPyPropStore::set_fn.
Referenced by bpy_prop_callback_assign_boolean_array().
|
static |
Definition at line 549 of file bpy_props.c.
References BLI_assert, BPyPropStore::get_fn, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), PyC_Long_AsBool(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_boolean().
|
static |
Definition at line 612 of file bpy_props.c.
References BLI_assert, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_py_data_get(), and BPyPropStore::set_fn.
Referenced by bpy_prop_callback_assign_boolean().
|
static |
Definition at line 2013 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_boolean_get_fn(), bpy_prop_boolean_set_fn(), bpy_prop_py_data_ensure(), BPyPropStore::get_fn, NULL, BPyPropStore::py_data, RNA_def_property_boolean_funcs_runtime(), and BPyPropStore::set_fn.
Referenced by BPy_BoolProperty().
|
static |
Definition at line 2037 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_boolean_array_get_fn(), bpy_prop_boolean_array_set_fn(), bpy_prop_py_data_ensure(), BPyPropStore::get_fn, NULL, BPyPropStore::py_data, RNA_def_property_boolean_array_funcs_runtime(), and BPyPropStore::set_fn.
Referenced by BPy_BoolVectorProperty().
|
static |
Definition at line 2183 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_enum_get_fn(), bpy_prop_enum_itemf_fn(), bpy_prop_enum_set_fn(), bpy_prop_py_data_ensure(), BPyPropStore::enum_data, BPyPropStore::get_fn, BPyPropStore::itemf_fn, NULL, BPyPropStore::py_data, RNA_def_property_enum_funcs_runtime(), and BPyPropStore::set_fn.
Referenced by BPy_EnumProperty().
|
static |
Definition at line 2109 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_float_get_fn(), bpy_prop_float_set_fn(), bpy_prop_py_data_ensure(), BPyPropStore::get_fn, NULL, BPyPropStore::py_data, RNA_def_property_float_funcs_runtime(), and BPyPropStore::set_fn.
Referenced by BPy_FloatProperty().
|
static |
Definition at line 2133 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_float_array_get_fn(), bpy_prop_float_array_set_fn(), bpy_prop_py_data_ensure(), BPyPropStore::get_fn, NULL, BPyPropStore::py_data, RNA_def_property_float_array_funcs_runtime(), and BPyPropStore::set_fn.
Referenced by BPy_FloatVectorProperty().
|
static |
Definition at line 2061 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_int_get_fn(), bpy_prop_int_set_fn(), bpy_prop_py_data_ensure(), BPyPropStore::get_fn, NULL, BPyPropStore::py_data, RNA_def_property_int_funcs_runtime(), and BPyPropStore::set_fn.
Referenced by BPy_IntProperty().
|
static |
Definition at line 2085 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_int_array_get_fn(), bpy_prop_int_array_set_fn(), bpy_prop_py_data_ensure(), BPyPropStore::get_fn, NULL, BPyPropStore::py_data, RNA_def_property_int_array_funcs_runtime(), and BPyPropStore::set_fn.
Referenced by BPy_IntVectorProperty().
|
static |
Definition at line 2003 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_pointer_poll_fn(), bpy_prop_py_data_ensure(), BPyPropStore::pointer_data, BPyPropStore::poll_fn, BPyPropStore::py_data, and RNA_def_property_poll_runtime().
Referenced by BPy_PointerProperty().
|
static |
Definition at line 2157 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_py_data_ensure(), bpy_prop_string_get_fn(), bpy_prop_string_length_fn(), bpy_prop_string_set_fn(), BPyPropStore::get_fn, NULL, BPyPropStore::py_data, RNA_def_property_string_funcs_runtime(), and BPyPropStore::set_fn.
Referenced by BPy_StringProperty().
|
static |
Definition at line 1990 of file bpy_props.c.
References ASSIGN_PYOBJECT_INCREF, bpy_prop_py_data_ensure(), bpy_prop_update_fn(), PROP_CONTEXT_PROPERTY_UPDATE, BPyPropStore::py_data, RNA_def_property_flag(), RNA_def_property_update_runtime(), and BPyPropStore::update_fn.
Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_EnumProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), and BPy_StringProperty().
|
static |
Definition at line 1959 of file bpy_props.c.
Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_EnumProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), and BPy_StringProperty().
|
static |
HACK: needed by typing.get_type_hints with from __future__ import annotations enabled or when using Python 3.10 or newer.
When callable this object type passes the test for being an acceptable annotation.
Definition at line 347 of file bpy_props.c.
|
static |
Definition at line 330 of file bpy_props.c.
References self.
|
static |
Definition at line 410 of file bpy_props.c.
References bpy_prop_deferred_Type, and NULL.
|
static |
Definition at line 317 of file bpy_props.c.
References self.
|
static |
Expose the function in case scripts need to introspect this information (not currently used by Blender it's self).
Definition at line 361 of file bpy_props.c.
References ret.
|
static |
Expose keywords in case scripts need to introspect this information (not currently used by Blender it's self).
Definition at line 372 of file bpy_props.c.
References ret.
|
static |
Definition at line 336 of file bpy_props.c.
References self.
|
static |
Definition at line 324 of file bpy_props.c.
References self.
|
static |
Definition at line 1540 of file bpy_props.c.
References BLI_assert, BPyPropStore::get_fn, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_enum_get_default(), and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_enum().
|
static |
Definition at line 1874 of file bpy_props.c.
References bpy_context_clear(), bpy_context_module, bpy_context_set(), C, DummyRNA_NULL_items, BPyPropStore::enum_data, enum_items_from_py(), err, NULL, PROP_ENUM_FLAG, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), RNA_property_flag(), and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_enum().
|
static |
Definition at line 1600 of file bpy_props.c.
References BLI_assert, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_py_data_get(), and BPyPropStore::set_fn.
Referenced by bpy_prop_callback_assign_enum().
|
static |
Definition at line 1160 of file bpy_props.c.
References BLI_assert, BPyPropStore::get_fn, len, NULL, ptr, BPyPropStore::py_data, PyC_AsArray(), PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_array_length(), and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_float_array().
|
static |
Definition at line 1223 of file bpy_props.c.
References BLI_assert, len, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), PyC_Tuple_PackArray_F32(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_array_length(), RNA_property_py_data_get(), and BPyPropStore::set_fn.
Referenced by bpy_prop_callback_assign_float_array().
|
static |
Definition at line 1044 of file bpy_props.c.
References BLI_assert, BPyPropStore::get_fn, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_float().
|
static |
Definition at line 1104 of file bpy_props.c.
References BLI_assert, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_py_data_get(), and BPyPropStore::set_fn.
Referenced by bpy_prop_callback_assign_float().
|
static |
Definition at line 914 of file bpy_props.c.
References BLI_assert, BPyPropStore::get_fn, len, NULL, ptr, BPyPropStore::py_data, PyC_AsArray(), PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_array_length(), and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_int_array().
|
static |
Definition at line 977 of file bpy_props.c.
References BLI_assert, len, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), PyC_Tuple_PackArray_I32(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_array_length(), RNA_property_py_data_get(), and BPyPropStore::set_fn.
Referenced by bpy_prop_callback_assign_int_array().
|
static |
Definition at line 798 of file bpy_props.c.
References BLI_assert, BPyPropStore::get_fn, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_int().
|
static |
Definition at line 858 of file bpy_props.c.
References BLI_assert, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_py_data_get(), and BPyPropStore::set_fn.
Referenced by bpy_prop_callback_assign_int().
|
static |
Definition at line 1485 of file bpy_props.c.
References BLI_assert, NULL, BPyPropStore::pointer_data, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), result, ret, and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_pointer().
|
static |
Definition at line 279 of file bpy_props.c.
References BLI_addtail(), g_bpy_prop_store_list, MEM_callocN, NULL, RNA_def_py_data(), and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_boolean(), bpy_prop_callback_assign_boolean_array(), bpy_prop_callback_assign_enum(), bpy_prop_callback_assign_float(), bpy_prop_callback_assign_float_array(), bpy_prop_callback_assign_int(), bpy_prop_callback_assign_int_array(), bpy_prop_callback_assign_pointer(), bpy_prop_callback_assign_string(), and bpy_prop_callback_assign_update().
|
static |
Perform all removal actions except for freeing, which is handled by RNA.
Definition at line 293 of file bpy_props.c.
References BLI_remlink(), BPY_PROP_STORE_PY_DATA_SIZE, g_bpy_prop_store_list, NULL, BPyPropStore::py_data, and RNA_property_py_data_get().
Referenced by BPY_rna_props().
|
static |
Definition at line 1290 of file bpy_props.c.
References BLI_assert, buffer, BPyPropStore::get_fn, length(), NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_string().
|
static |
Definition at line 1350 of file bpy_props.c.
References BLI_assert, BPyPropStore::get_fn, length(), NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, and RNA_property_py_data_get().
Referenced by bpy_prop_callback_assign_string().
|
static |
Definition at line 1413 of file bpy_props.c.
References BLI_assert, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_py_data_get(), and BPyPropStore::set_fn.
Referenced by bpy_prop_callback_assign_string().
|
static |
Definition at line 491 of file bpy_props.c.
References BLI_assert, bpy_context_clear(), bpy_context_module, bpy_context_set(), C, NULL, ptr, BPyPropStore::py_data, PyC_Err_PrintWithFunc(), pyrna_struct_as_instance(), pyrna_write_check(), pyrna_write_set(), ret, RNA_property_py_data_get(), and BPyPropStore::update_fn.
Referenced by bpy_prop_callback_assign_update().
|
static |
Definition at line 3788 of file bpy_props.c.
References NULL, ret, RNA_def_property_free_identifier(), and srna_from_self().
| PyObject* BPY_rna_props | ( | void | ) |
Definition at line 3927 of file bpy_props.c.
References ASSIGN_STATIC, bpy_prop_deferred_Type, bpy_prop_py_data_remove(), NULL, props_module, and RNA_def_property_free_pointers_set_py_data_callback().
Referenced by BPy_init_modules().
| void BPY_rna_props_clear_all | ( | void | ) |
Run this on exit, clearing all Python callback users and disable the RNA callback, as it would be called after Python has already finished.
Definition at line 3967 of file bpy_props.c.
References BLI_listbase_clear(), g_bpy_prop_store_list, NULL, props_clear(), and RNA_def_property_free_pointers_set_py_data_callback().
Referenced by BPY_python_end().
|
static |
Definition at line 3240 of file bpy_props.c.
References bpy_prop_assign_flag(), bpy_prop_assign_flag_override(), bpy_prop_callback_assign_string(), bpy_prop_callback_assign_update(), bpy_prop_callback_check(), BPY_PROPDEF_HEAD, BPY_PROPDEF_SUBTYPE_CHECK, BPyPropStore::get_fn, NULL, PROP_NONE, PROP_STRING, property_flag_items, property_flag_override_items, property_subtype_string_items, RNA_def_property(), RNA_def_property_duplicate_pointers(), RNA_def_property_string_default(), RNA_def_property_string_maxlength(), RNA_def_property_tags(), RNA_def_property_ui_text(), BPyPropStore::set_fn, and BPyPropStore::update_fn.
|
static |
Definition at line 1700 of file bpy_props.c.
References EnumPropertyItem::description, EnumPropertyItem::icon, icon_id_from_name(), EnumPropertyItem::identifier, MEM_callocN, MEM_freeN, MEM_mallocN, EnumPropertyItem::name, NULL, py_long_as_int(), RNA_ENUM_BITFLAG_SIZE, STREQ, STRINGIFY, and EnumPropertyItem::value.
Referenced by BPy_EnumProperty(), and bpy_prop_enum_itemf_fn().
|
static |
Definition at line 1684 of file bpy_props.c.
References id, EnumPropertyItem::identifier, EnumPropertyItem::name, rna_enum_icon_items, STREQ, and EnumPropertyItem::value.
Referenced by enum_items_from_py().
| StructRNA* pointer_type_from_py | ( | PyObject * | value, |
| const char * | error_prefix | ||
| ) |
Definition at line 3548 of file bpy_props.c.
References NULL, PyC_ExceptionBuffer(), and srna_from_self().
Referenced by BPy_CollectionProperty(), and BPy_PointerProperty().
|
static |
Definition at line 3899 of file bpy_props.c.
References BPY_PROP_STORE_PY_DATA_SIZE, g_bpy_prop_store_list, and LISTBASE_FOREACH.
Referenced by BPY_rna_props_clear_all().
|
static |
Definition at line 3888 of file bpy_props.c.
References BPY_PROP_STORE_PY_DATA_SIZE, g_bpy_prop_store_list, and LISTBASE_FOREACH.
|
static |
Definition at line 1657 of file bpy_props.c.
Referenced by BPy_EnumProperty(), and enum_items_from_py().
| PyDoc_STRVAR | ( | BPy_BoolProperty_doc | , |
| ".. function:: BoolProperty(name=\"\", " "description=\"\", " "default=False, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new boolean property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC | BPY_PROPDEF_SET_DOC | ||
| ) |
| PyDoc_STRVAR | ( | BPy_BoolVectorProperty_doc | , |
| ".. function:: BoolVectorProperty(name=\"\", " "description=\"\", " "default=(False, False, False), " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "size=3, " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new vector boolean property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: sequence of booleans the length of *size*.\n" " :type default: sequence\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_ARRAY_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC | BPY_PROPDEF_SET_DOC | ||
| ) |
| PyDoc_STRVAR | ( | BPy_CollectionProperty_doc | , |
| ".. function:: CollectionProperty(type=None, " "name=\"\", " "description=\"\", " "options={'ANIMATABLE'}, " "override=set(), " "tags=set())\n" "\n" " Returns a new collection property definition.\n" "\n" BPY_PROPDEF_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC | BPY_PROPDEF_TAGS_DOC | ||
| ) |
| PyDoc_STRVAR | ( | BPy_EnumProperty_doc | , |
| ".. function:: EnumProperty(items, " "name=\"\", " "description=\"\", " "default=None, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new enumerator property definition.\n" "\n" " :arg items: sequence of enum items formatted:\n" " ````.\n" "\n" " The first three elements of the tuples are mandatory.\n" "\n" " :identifier: The identifier is used for Python access.\n" " :name: Name for the interface.\n" " :description: Used for documentation and tooltips.\n" " :icon: An icon string identifier or integer icon value\n" " (e.g. returned by :class:`bpy.types.UILayout.icon`)\n" " :number: Unique value used as the identifier for this item (stored in file data).\n" " Use when the identifier may need to change. If the *ENUM_FLAG* option is | used[(identifier, name, description, icon, number),...], | ||
| \n" " the values are bitmasks and should be powers of two.\n" "\n" " When an item only contains 4 items they define ``(identifier, name, description, " "number)``.\n" "\n" " Separators may be added using None instead of a tuple." "\n" " For dynamic values a callback can be passed which returns a list in\n" " the same format as the static list.\n" " This function must take 2 arguments ``(self, context)`` | , | ||
| **context may be None **.\n" "\n" " .. warning::\n" "\n" " There is a known bug with using a | callback, | ||
| \n" " Python must keep a reference to the strings returned by the callback or Blender\n" " will misbehave or even crash." "\n" " :type items:sequence of string tuples or a function\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default:The default value for this | enum, | ||
| a string from the identifiers used in " " *items * | , | ||
| or integer matching an item number.\n" " If the *ENUM_FLAG *option is used this must be a set of such string identifiers " "instead.\n" " WARNING:Strings can not be specified for dynamic enums\n" "(i.e. if a callback function is given as *items *parameter).\n" " :type default:string | , | ||
| integer or set\n" BPY_PROPDEF_OPTIONS_ENUM_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC | BPY_PROPDEF_SET_DOC | ||
| ) |
| PyDoc_STRVAR | ( | BPy_FloatProperty_doc | , |
| ".. function:: FloatProperty(name=\"\", " "description=\"\", " "default=0.0, " "min=-3.402823e+38, max=3.402823e+38, " "soft_min=-3.402823e+38, soft_max=3.402823e+38, " "step=3, " "precision=2, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "unit='NONE', " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new float (single precision) property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_NUM_MIN_DOC " :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC " :type soft_min: float\n" BPY_PROPDEF_NUM_SOFTMAX_DOC " :type soft_max: float\n" BPY_PROPDEF_FLOAT_STEP_DOC BPY_PROPDEF_FLOAT_PREC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC | BPY_PROPDEF_SET_DOC | ||
| ) |
| PyDoc_STRVAR | ( | BPy_FloatVectorProperty_doc | , |
| ".. function:: FloatVectorProperty(name=\"\", " "description=\"\", " "default=(0.0, 0.0, 0.0), " "min=sys.float_info.min, max=sys.float_info.max, " "soft_min=sys.float_info.min, soft_max=sys.float_info.max, " "step=3, " "precision=2, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "unit='NONE', " "size=3, " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new vector float property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: sequence of floats the length of *size*.\n" " :type default: sequence\n" BPY_PROPDEF_NUM_MIN_DOC " :type min: float\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: float\n" BPY_PROPDEF_NUM_SOFTMIN_DOC " :type soft_min: float\n" BPY_PROPDEF_NUM_SOFTMAX_DOC " :type soft_max: float\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_FLOAT_STEP_DOC BPY_PROPDEF_FLOAT_PREC_DOC BPY_PROPDEF_SUBTYPE_ARRAY_DOC BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC | BPY_PROPDEF_SET_DOC | ||
| ) |
| PyDoc_STRVAR | ( | BPy_IntProperty_doc | , |
| ".. function:: IntProperty(name=\"\", " "description=\"\", " "default=0, " "min=-2**31, max=2**31-1, " "soft_min=-2**31, soft_max=2**31-1, " "step=1, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new int property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_NUM_MIN_DOC " :type min: int\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: int\n" BPY_PROPDEF_NUM_SOFTMAX_DOC " :type soft_min: int\n" BPY_PROPDEF_NUM_SOFTMIN_DOC " :type soft_max: int\n" BPY_PROPDEF_INT_STEP_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC | BPY_PROPDEF_SET_DOC | ||
| ) |
| PyDoc_STRVAR | ( | BPy_IntVectorProperty_doc | , |
| ".. function:: IntVectorProperty(name=\"\", " "description=\"\", " "default=(0, 0, 0), min=-2**31, max=2**31-1, " "soft_min=-2**31, " "soft_max=2**31-1, " "step=1, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "size=3, " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new vector int property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: sequence of ints the length of *size*.\n" " :type default: sequence\n" BPY_PROPDEF_NUM_MIN_DOC " :type min: int\n" BPY_PROPDEF_NUM_MAX_DOC " :type max: int\n" BPY_PROPDEF_NUM_SOFTMIN_DOC " :type soft_min: int\n" BPY_PROPDEF_NUM_SOFTMAX_DOC " :type soft_max: int\n" BPY_PROPDEF_INT_STEP_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_ARRAY_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC | BPY_PROPDEF_SET_DOC | ||
| ) |
| PyDoc_STRVAR | ( | BPy_PointerProperty_doc | , |
| ".. function:: PointerProperty(type=None, " "name=\"\", " "description=\"\", " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "poll=None, " "update=None)\n" "\n" " Returns a new pointer property definition.\n" "\n" BPY_PROPDEF_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_POLL_DOC | BPY_PROPDEF_UPDATE_DOC | ||
| ) |
| PyDoc_STRVAR | ( | bpy_prop_deferred_doc | , |
| "Intermediate storage for properties before registration.\n" "\n" ".. note::\n" "\n" " This is not part of the stable API and may change between releases." | |||
| ) |
| PyDoc_STRVAR | ( | BPy_RemoveProperty_doc | , |
| ".. function:: RemoveProperty(cls, attr)\n" "\n" " Removes a dynamically defined property.\n" "\n" " :arg cls: The class containing the property (must be a positional argument).\n" " :type cls: type\n" " :arg attr: Property name (must be passed as a keyword).\n" " :type attr: string\n" "\n" ".. note:: Typically this function doesn't need to be accessed directly.\n" " Instead use ``del cls.attr``\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_StringProperty_doc | , |
| ".. function:: StringProperty(name=\"\", " "description=\"\", " "default=\"\", " "maxlen=0, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "update=None, " "get=None, " "set=None)\n" "\n" " Returns a new string property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC " :arg default: initializer string.\n" " :type default: string\n" " :arg maxlen: maximum length of the string.\n" " :type maxlen: int\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_STRING_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_GET_DOC | BPY_PROPDEF_SET_DOC | ||
| ) |
|
static |
Definition at line 440 of file bpy_props.c.
References PointerRNA::data, NULL, ptr, pyrna_struct_CreatePyObject(), and RNA_struct_instance().
Referenced by bpy_prop_boolean_array_get_fn(), bpy_prop_boolean_array_set_fn(), bpy_prop_boolean_get_fn(), bpy_prop_boolean_set_fn(), bpy_prop_enum_get_fn(), bpy_prop_enum_itemf_fn(), bpy_prop_enum_set_fn(), bpy_prop_float_array_get_fn(), bpy_prop_float_array_set_fn(), bpy_prop_float_get_fn(), bpy_prop_float_set_fn(), bpy_prop_int_array_get_fn(), bpy_prop_int_array_set_fn(), bpy_prop_int_get_fn(), bpy_prop_int_set_fn(), bpy_prop_pointer_poll_fn(), bpy_prop_string_get_fn(), bpy_prop_string_length_fn(), bpy_prop_string_set_fn(), and bpy_prop_update_fn().
|
static |
Definition at line 379 of file bpy_props.c.
| PyTypeObject bpy_prop_deferred_Type |
Definition at line 392 of file bpy_props.c.
Referenced by bpy_prop_deferred_data_CreatePyObject(), and BPY_rna_props().
Maintain a list of Python defined properties, so the GC can visit them, and so they can be cleared on exit.
Definition at line 277 of file bpy_props.c.
Referenced by bpy_prop_py_data_ensure(), bpy_prop_py_data_remove(), BPY_rna_props_clear_all(), props_clear(), and props_visit().
|
static |
|
static |
Definition at line 55 of file bpy_props.c.
Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_CollectionProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), and BPy_StringProperty().
|
static |
Definition at line 102 of file bpy_props.c.
Referenced by BPy_CollectionProperty().
|
static |
Definition at line 89 of file bpy_props.c.
Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_EnumProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), and BPy_StringProperty().
|
static |
Definition at line 165 of file bpy_props.c.
Referenced by BPy_BoolVectorProperty(), BPy_FloatVectorProperty(), and BPy_IntVectorProperty().
|
static |
Definition at line 144 of file bpy_props.c.
Referenced by BPy_BoolProperty(), BPy_FloatProperty(), and BPy_IntProperty().
|
static |
|
static |
Definition at line 3788 of file bpy_props.c.
|
static |
Definition at line 3899 of file bpy_props.c.
Referenced by BPY_rna_props().
|
static |
Definition at line 428 of file bpy_props.c.
|
static |
Definition at line 429 of file bpy_props.c.
|
static |
Definition at line 437 of file bpy_props.c.
|
static |
Definition at line 435 of file bpy_props.c.
|
static |
Definition at line 432 of file bpy_props.c.
|
static |
Definition at line 433 of file bpy_props.c.
|
static |
Definition at line 430 of file bpy_props.c.
|
static |
Definition at line 431 of file bpy_props.c.
|
static |
Definition at line 436 of file bpy_props.c.
|
static |
Definition at line 438 of file bpy_props.c.
|
static |
Definition at line 434 of file bpy_props.c.