Blender V5.3
bpy_props.cc File Reference
#include <algorithm>
#include <string>
#include <Python.h>
#include "RNA_types.hh"
#include "BLI_array.hh"
#include "BLI_listbase.hh"
#include "BLI_utildefines.hh"
#include "bpy_capi_utils.hh"
#include "bpy_props.hh"
#include "bpy_rna.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "RNA_prototypes.hh"
#include "MEM_guardedalloc.h"
#include "DNA_ID.h"
#include "../generic/py_capi_rna.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_compat.hh"
#include "../generic/python_utildefines.hh"

Go to the source code of this file.

Classes

struct  blender::BPyPropStore
struct  blender::BPyPropGIL_RNAWritable_State
struct  blender::BPyPropArrayLength
struct  blender::BPy_PropIDParse
struct  blender::BPy_EnumProperty_Parse_WithSRNA

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define PY_SSIZE_T_CLEAN
#define ASSIGN_STATIC(_name)
Shared Enums & Docstrings
#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_NUMBER_ARRAY_DOC
Shared Method Docstrings
#define BPY_PROPDEF_NAME_DOC
#define BPY_PROPDEF_DESC_DOC
#define BPY_PROPDEF_CTXT_DOC
#define BPY_PROPDEF_UNIT_DOC
#define BPY_PROPDEF_DEFAULT_DOC(ty)
#define BPY_PROPDEF_NUM_MIN_DOC_(ty)
#define BPY_PROPDEF_NUM_MAX_DOC_(ty)
#define BPY_PROPDEF_NUM_MINMAX_DOC(ty)
#define BPY_PROPDEF_NUM_SOFT_MIN_DOC_(ty)
#define BPY_PROPDEF_NUM_SOFT_MAX_DOC_(ty)
#define BPY_PROPDEF_NUM_SOFT_MINMAX_DOC(ty)
#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(ty)
#define BPY_PROPDEF_SET_DOC(ty)
#define BPY_PROPDEF_GET_TRANSFORM_DOC(ty)
#define BPY_PROPDEF_SET_TRANSFORM_DOC(ty)
#define BPY_PROPDEF_SEARCH_DOC
#define BPY_PROPDEF_POINTER_TYPE_DOC
#define BPY_PROPDEF_COLLECTION_TYPE_DOC
#define BPY_PROPDEF_TAGS_DOC
#define BPY_PROPDEF_RETURN_DOC

Functions

Multi-Dimensional Property Utilities
static int blender::bpy_prop_array_length_parse (PyObject *o, void *p)
static int blender::bpy_prop_array_from_py_with_dims (void *values, size_t values_elem_size, PyObject *py_values, const BPyPropArrayLength *array_len_info, const PyTypeObject *type, const char *error_str)
static PyObject * blender::bpy_py_object_from_prop_array_with_dims (const void *values, const BPyPropArrayLength &array_len_info, const PyTypeObject &type)
static bool blender::bpy_prop_array_is_matrix_compatible_ex (int subtype, const BPyPropArrayLength *array_len_info)
static bool blender::bpy_prop_array_is_matrix_compatible (PropertyRNA *prop, const BPyPropArrayLength *array_len_info)
static void blender::bpy_prop_array_matrix_swap_row_column_vn_vn (float *values_dst, const float *values_src, const BPyPropArrayLength *array_len_info)
static void blender::bpy_prop_array_matrix_swap_row_column_vn (float *values, const BPyPropArrayLength *array_len_info)
Shared Property Callbacks

Unique data is accessed via RNA_property_py_data_get

static void blender::bpy_prop_update_fn (bContext *C, PointerRNA *ptr, PropertyRNA *prop)
Boolean Property Callbacks
static bool blender::bpy_prop_boolean_get_fn (PointerRNA *ptr, PropertyRNA *prop)
static bool blender::bpy_prop_boolean_get_transform_fn (PointerRNA *ptr, PropertyRNA *prop, bool curr_value, bool is_set)
static void blender::bpy_prop_boolean_set_fn (PointerRNA *ptr, PropertyRNA *prop, bool value)
static bool blender::bpy_prop_boolean_set_transform_fn (PointerRNA *ptr, PropertyRNA *prop, bool new_value, bool curr_value, bool is_set)
static void blender::bpy_prop_boolean_array_from_callback_or_error (PyObject *bool_array_obj, const BPyPropArrayLength &array_len_info, PyObject *py_func, bool *r_values)
static void blender::bpy_prop_boolean_array_get_fn (PointerRNA *ptr, PropertyRNA *prop, bool *values)
static void blender::bpy_prop_boolean_array_get_transform_fn (PointerRNA *ptr, PropertyRNA *prop, const bool *curr_values, bool is_set, bool *r_values)
static void blender::bpy_prop_boolean_array_set_fn (PointerRNA *ptr, PropertyRNA *prop, const bool *values)
static void blender::bpy_prop_boolean_array_set_transform_fn (PointerRNA *ptr, PropertyRNA *prop, const bool *new_values, const bool *curr_values, bool is_set, bool *r_final_values)
Int Property Callbacks
static int blender::bpy_prop_int_get_fn (PointerRNA *ptr, PropertyRNA *prop)
static int blender::bpy_prop_int_get_transform_fn (PointerRNA *ptr, PropertyRNA *prop, int curr_value, bool is_set)
static void blender::bpy_prop_int_set_fn (PointerRNA *ptr, PropertyRNA *prop, int value)
static int blender::bpy_prop_int_set_transform_fn (PointerRNA *ptr, PropertyRNA *prop, int new_value, int curr_value, bool is_set)
static void blender::bpy_prop_int_array_from_callback_or_error (PyObject *int_array_obj, const BPyPropArrayLength &array_len_info, PyObject *py_func, int *r_values)
static void blender::bpy_prop_int_array_get_fn (PointerRNA *ptr, PropertyRNA *prop, int *values)
static void blender::bpy_prop_int_array_get_transform_fn (PointerRNA *ptr, PropertyRNA *prop, const int *curr_values, bool is_set, int *r_values)
static void blender::bpy_prop_int_array_set_fn (PointerRNA *ptr, PropertyRNA *prop, const int *values)
static void blender::bpy_prop_int_array_set_transform_fn (PointerRNA *ptr, PropertyRNA *prop, const int *new_values, const int *curr_values, bool is_set, int *r_final_values)
Float Property Callbacks
static float blender::bpy_prop_float_get_fn (PointerRNA *ptr, PropertyRNA *prop)
static float blender::bpy_prop_float_get_transform_fn (PointerRNA *ptr, PropertyRNA *prop, float curr_value, bool is_set)
static void blender::bpy_prop_float_set_fn (PointerRNA *ptr, PropertyRNA *prop, float value)
static float blender::bpy_prop_float_set_transform_fn (PointerRNA *ptr, PropertyRNA *prop, float new_value, float curr_value, bool is_set)
static void blender::bpy_prop_float_array_from_callback_or_error (PropertyRNA *prop, PyObject *float_array_obj, const BPyPropArrayLength &array_len_info, PyObject *py_func, const bool do_matrix_row_col_swap, float *r_values)
static void blender::bpy_prop_float_array_get_fn (PointerRNA *ptr, PropertyRNA *prop, float *values)
static void blender::bpy_prop_float_array_get_transform_fn (PointerRNA *ptr, PropertyRNA *prop, const float *curr_values, bool is_set, float *r_values)
static void blender::bpy_prop_float_array_set_fn (PointerRNA *ptr, PropertyRNA *prop, const float *values)
static void blender::bpy_prop_float_array_set_transform_fn (PointerRNA *ptr, PropertyRNA *prop, const float *new_values, const float *curr_values, bool is_set, float *r_final_values)
String Property Callbacks
static std::optional< std::string > blender::bpy_prop_string_from_callback_or_error (PyObject *str_obj, const size_t max_length, PyObject *py_func)
static std::string blender::bpy_prop_string_get_locked_fn (PointerRNA *ptr, PropertyRNA *prop)
static std::string blender::bpy_prop_string_get_fn (PointerRNA *ptr, PropertyRNA *prop)
static std::string blender::bpy_prop_string_get_transform_locked_fn (PointerRNA *ptr, PropertyRNA *prop, const std::string &curr_value, bool is_set)
static std::string blender::bpy_prop_string_get_transform_fn (PointerRNA *ptr, PropertyRNA *prop, const std::string &curr_value, bool is_set)
static int blender::bpy_prop_string_length_fn (PointerRNA *ptr, PropertyRNA *prop)
static void blender::bpy_prop_string_set_fn (PointerRNA *ptr, PropertyRNA *prop, const std::string &value)
static std::string blender::bpy_prop_string_set_transform_fn (PointerRNA *ptr, PropertyRNA *prop, const std::string &new_value, const std::string &curr_value, bool is_set)
static bool blender::bpy_prop_string_visit_fn_call (PyObject *py_func, PyObject *item, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
static void blender::bpy_prop_string_visit_for_search_fn (const bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
Pointer Property Callbacks
static bool blender::bpy_prop_pointer_poll_fn (PointerRNA *self, PointerRNA candidate, PropertyRNA *prop)
Enum Property Callbacks
static int blender::bpy_prop_enum_get_fn (PointerRNA *ptr, PropertyRNA *prop)
static int blender::bpy_prop_enum_get_transform_fn (PointerRNA *ptr, PropertyRNA *prop, int curr_value, bool is_set)
static void blender::bpy_prop_enum_set_fn (PointerRNA *ptr, PropertyRNA *prop, int value)
static int blender::bpy_prop_enum_set_transform_fn (PointerRNA *ptr, PropertyRNA *prop, int new_value, int curr_value, bool is_set)
static bool blender::py_long_as_int (PyObject *py_long, int *r_int)
static int blender::icon_id_from_name (const char *name)
static const EnumPropertyItem * blender::enum_items_from_py (PyObject *seq_fast, const bool is_enum_flag, PyObject *default_py, int *r_default_value)
static const EnumPropertyItem * blender::bpy_prop_enum_itemf_fn (bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
static int blender::bpy_prop_callback_check (PyObject *py_func, const char *keyword, int argcount)
Shared Callback Assignment
static void blender::bpy_prop_callback_assign_update (PropertyRNA *prop, PyObject *update_fn)
static void blender::bpy_prop_callback_assign_pointer (PropertyRNA *prop, PyObject *poll_fn)
static bool blender::bpy_prop_callback_assign_boolean (PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *get_transform_fn, PyObject *set_transform_fn)
static bool blender::bpy_prop_callback_assign_boolean_array (PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *get_transform_fn, PyObject *set_transform_fn)
static bool blender::bpy_prop_callback_assign_int (PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *get_transform_fn, PyObject *set_transform_fn)
static void blender::bpy_prop_callback_assign_int_array (PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *get_transform_fn, PyObject *set_transform_fn)
static bool blender::bpy_prop_callback_assign_float (PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *get_transform_fn, PyObject *set_transform_fn)
static void blender::bpy_prop_callback_assign_float_array (PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *get_transform_fn, PyObject *set_transform_fn)
static bool blender::bpy_prop_callback_assign_string (PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *get_transform_fn, PyObject *set_transform_fn, PyObject *search_fn, const eStringPropertySearchFlag search_flag)
static bool blender::bpy_prop_callback_assign_enum (PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *itemf_fn, PyObject *get_transform_fn, PyObject *set_transform_fn)
Shared Method Utilities
static StructRNA * blender::bpy_prop_deferred_data_or_srna (PyObject *self, PyObject *args, PyObject *kw, PyObject *method_object, PyObject **r_deferred_result)
static int blender::bpy_prop_arg_parse_id (PyObject *o, void *p)
static int blender::bpy_prop_arg_parse_tag_defines (PyObject *o, void *p)
Module Methods

Functions that register RNA.

Note
The self argument is nullptr when called from Python, but being abused from C so we can pass the srna along. This isn't incorrect since its a Python object - but be careful.
 blender::PyDoc_STRVAR (BPy_BoolProperty_doc, ".. function:: BoolProperty(" "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "default=False, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "update=None, " "get=None, " "set=None, " "get_transform=None, " "set_transform=None)\n" "\n" " Returns a new boolean property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_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_RETURN_DOC)
static PyObject * blender::BPy_BoolProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_BoolVectorProperty_doc, ".. function:: BoolVectorProperty(" "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "default=(False, False, False), " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "size=3, " "update=None, " "get=None, " "set=None, " "get_transform=None, " "set_transform=None)\n" "\n" " Returns a new vector boolean property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC " :param default: sequence of booleans the length of *size*.\n" " :type default: Sequence[bool]\n" BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_RETURN_DOC)
static PyObject * blender::BPy_BoolVectorProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_IntProperty_doc, ".. function:: IntProperty(" "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "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, " "get_transform=None, " "set_transform=None)\n" "\n" " Returns a new int property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC 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_RETURN_DOC)
static PyObject * blender::BPy_IntProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_IntVectorProperty_doc, ".. function:: IntVectorProperty(" "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "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, " "get_transform=None, " "set_transform=None)\n" "\n" " Returns a new vector int property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC " :param default: sequence of ints the length of *size*.\n" " :type default: Sequence[int]\n" BPY_PROPDEF_INT_STEP_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_RETURN_DOC)
static PyObject * blender::BPy_IntVectorProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_FloatProperty_doc, ".. function:: FloatProperty(" "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "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, " "get_transform=None, " "set_transform=None)\n" "\n" " Returns a new float (single precision) property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC 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_RETURN_DOC)
static PyObject * blender::BPy_FloatProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_FloatVectorProperty_doc, ".. function:: FloatVectorProperty(" "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "default=(0.0, 0.0, 0.0), " "min=-sys.float_info.max, max=sys.float_info.max, " "soft_min=-sys.float_info.max, 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, " "get_transform=None, " "set_transform=None)\n" "\n" " Returns a new vector float property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC " :param default: Sequence of floats the length of *size*.\n" " :type default: Sequence[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_ARRAY_DOC BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_VECSIZE_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_RETURN_DOC)
static PyObject * blender::BPy_FloatVectorProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_StringProperty_doc, ".. function:: StringProperty(" "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "default=\"\", " "maxlen=0, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "subtype='NONE', " "update=None, " "get=None, " "set=None, " "get_transform=None, " "set_transform=None, " "search=None, " "search_options={'SUGGESTION'})\n" "\n" " Returns a new string property definition.\n" "\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC " :param default: initializer string.\n" " :type default: str\n" " :param 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_SEARCH_DOC BPY_PROPDEF_RETURN_DOC)
static PyObject * blender::BPy_StringProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_EnumProperty_doc, ".. function:: EnumProperty(" "items, " "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "default=None, " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "update=None, " "get=None, " "set=None, " "get_transform=None, " "set_transform=None)\n" "\n" " Returns a new enumerator property definition.\n" "\n" " :param 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" " An empty identifier means that the item is a separator\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 bit-masks 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 either None (nameless separator),\n" " or a regular item tuple with an empty identifier string, in which case the name,\n" " if non-empty, will be displayed in the UI above the separator line." "\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: Iterable[" "tuple[str, str, str] | " "tuple[str, str, str, int] | " "tuple[str, str, str, str | int, int] | " "None] | " "Callable[[:class:`bpy.types.bpy_struct`, :class:`bpy.types.Context` | None], " "Iterable[" "tuple[str, str, str] | " "tuple[str, str, str, int] | " "tuple[str, str, str, str | int, int] | " "None]" "]\n" BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC " :param 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 cannot be specified for dynamic enums\n" " (i.e. if a callback function is given as *items* parameter).\n" " :type default: str | int | set[str] | None\n" BPY_PROPDEF_OPTIONS_ENUM_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_RETURN_DOC)
static PyObject * blender::BPy_EnumProperty (PyObject *self, PyObject *args, PyObject *kw)
StructRNA * blender::pointer_type_from_py (PyObject *value, const char *error_prefix)
 blender::PyDoc_STRVAR (BPy_PointerProperty_doc, ".. function:: PointerProperty(" "type, " "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "options={'ANIMATABLE'}, " "override=set(), " "tags=set(), " "poll=None, " "update=None)\n" "\n" " Returns a new pointer property definition.\n" "\n" BPY_PROPDEF_POINTER_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_POLL_DOC BPY_PROPDEF_UPDATE_DOC BPY_PROPDEF_RETURN_DOC "\n" ".. note:: Pointer properties do not support storing references to embedded IDs " "(e.g. :class:`bpy.types.Scene.collection`, :class:`bpy.types.Material.node_tree`).\n" " These should exclusively be referenced and accessed through their owner ID " "(e.g. the scene or material).\n")
PyObject * blender::BPy_PointerProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_CollectionProperty_doc, ".. function:: CollectionProperty(" "type, " "*, " "name=\"\", " "description=\"\", " "translation_context=\"*\", " "options={'ANIMATABLE'}, " "override=set(), " "tags=set())\n" "\n" " Returns a new collection property definition.\n" "\n" BPY_PROPDEF_COLLECTION_TYPE_DOC BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC BPY_PROPDEF_CTXT_DOC BPY_PROPDEF_OPTIONS_DOC BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC BPY_PROPDEF_TAGS_DOC BPY_PROPDEF_RETURN_DOC)
PyObject * blender::BPy_CollectionProperty (PyObject *self, PyObject *args, PyObject *kw)
 blender::PyDoc_STRVAR (BPy_RemoveProperty_doc, ".. function:: RemoveProperty(cls, attr)\n" "\n" " Removes a dynamically defined property.\n" "\n" " :param cls: The class containing the property (must be a positional argument).\n" " :type cls: type[:class:`bpy.types.bpy_struct`]\n" " :param attr: Property name (must be passed as a keyword).\n" " :type attr: str\n" "\n" " .. note::\n" "\n" " Typically this function doesn't need to be accessed directly.\n" " Instead use ``del cls.attr``\n")
static PyObject * blender::BPy_RemoveProperty (PyObject *self, PyObject *args, PyObject *kw)

Python Property Storage API

Functionality needed to use Python native callbacks from generic C RNA callbacks.

#define BPY_PROP_STORE_PY_DATA_SIZE   (sizeof(BPyPropStore::py_data) / sizeof(PyObject *))
#define ASSIGN_PYOBJECT_INCREF(a, b)
static ListBaseT< BPyPropStore > blender::g_bpy_prop_store_list = {nullptr, nullptr}
static BPyPropStore * blender::bpy_prop_py_data_ensure (PropertyRNA *prop)
static void blender::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 blender::bpy_prop_deferred_getset []
PyTypeObject blender::bpy_prop_deferred_Type
static void blender::bpy_prop_deferred_dealloc (BPy_PropDeferred *self)
static int blender::bpy_prop_deferred_traverse (BPy_PropDeferred *self, visitproc visit, void *arg)
static int blender::bpy_prop_deferred_clear (BPy_PropDeferred *self)
static PyObject * blender::bpy_prop_deferred_repr (BPy_PropDeferred *self)
static PyObject * blender::bpy_prop_deferred_call (BPy_PropDeferred *, PyObject *, PyObject *)
 blender::PyDoc_STRVAR (bpy_prop_deferred_function_doc, "The property registration function (e.g. :func:`bpy.props.IntProperty`).\n" "\n" ":type: Callable\n")
static PyObject * blender::bpy_prop_deferred_function_get (BPy_PropDeferred *self, void *)
 blender::PyDoc_STRVAR (bpy_prop_deferred_keywords_doc, "The keyword arguments passed to the property registration function.\n" "\n" ":type: dict[str, Any]\n")
static PyObject * blender::bpy_prop_deferred_keywords_get (BPy_PropDeferred *self, void *)
 blender::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.\n")
static PyObject * blender::bpy_prop_deferred_data_CreatePyObject (PyObject *fn, PyObject *kw)

Shared Property Utilities

static PyObject * blender::pymeth_BoolProperty = nullptr
static PyObject * blender::pymeth_BoolVectorProperty = nullptr
static PyObject * blender::pymeth_IntProperty = nullptr
static PyObject * blender::pymeth_IntVectorProperty = nullptr
static PyObject * blender::pymeth_FloatProperty = nullptr
static PyObject * blender::pymeth_FloatVectorProperty = nullptr
static PyObject * blender::pymeth_StringProperty = nullptr
static PyObject * blender::pymeth_EnumProperty = nullptr
static PyObject * blender::pymeth_PointerProperty = nullptr
static PyObject * blender::pymeth_CollectionProperty = nullptr
static PyObject * blender::pymeth_RemoveProperty = nullptr
static PyObject * blender::pyrna_struct_as_instance (PointerRNA *ptr)
static void blender::bpy_prop_assign_flag (PropertyRNA *prop, int flag)
static void blender::bpy_prop_assign_flag_override (PropertyRNA *prop, const int flag_override)
static BPyPropGIL_RNAWritable_State blender::bpy_prop_gil_rna_writable_begin ()
static void blender::bpy_prop_gil_rna_writable_end (const BPyPropGIL_RNAWritable_State &prop_state)

Main Module <tt>bpy.props</tt>

static PyMethodDef blender::props_methods []
static PyModuleDef blender::props_module
static int blender::props_visit (PyObject *, visitproc visit, void *arg)
static int blender::props_clear (PyObject *)
 blender::PyDoc_STRVAR (props_module_doc, "This module defines properties to extend Blender's internal data. The result of these " "functions" " is used to assign properties to classes registered with Blender and can't be used " "directly.\n" "\n" ".. note:: All parameters to these functions must be passed as keywords.\n")
PyObject * blender::BPY_rna_props ()
void blender::BPY_rna_props_clear_all ()

Detailed Description

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.cc.

Macro Definition Documentation

◆ ASSIGN_PYOBJECT_INCREF

◆ ASSIGN_STATIC

#define ASSIGN_STATIC ( _name)
Value:
pymeth_##_name = PyDict_GetItemString(submodule_dict, #_name)

Referenced by blender::BPY_rna_props().

◆ BPY_PROP_STORE_PY_DATA_SIZE

#define BPY_PROP_STORE_PY_DATA_SIZE   (sizeof(BPyPropStore::py_data) / sizeof(PyObject *))

◆ BPY_PROPDEF_COLLECTION_TYPE_DOC

#define BPY_PROPDEF_COLLECTION_TYPE_DOC
Value:
" :param type: A subclass of a property group.\n" \
" :type type: type[:class:`bpy.types.PropertyGroup`]\n"

Definition at line 3520 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_CTXT_DOC

#define BPY_PROPDEF_CTXT_DOC
Value:
" :param translation_context: Text used as context to disambiguate translations.\n" \
" :type translation_context: str\n"

Definition at line 3373 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_DEFAULT_DOC

#define BPY_PROPDEF_DEFAULT_DOC ( ty)
Value:
" :param default: The default value for this property.\n" \
" :type default: " ty "\n"

Definition at line 3381 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_DESC_DOC

#define BPY_PROPDEF_DESC_DOC
Value:
" :param description: Text used for the tooltip and api documentation.\n" \
" :type description: str\n"

Definition at line 3369 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_FLOAT_PREC_DOC

#define BPY_PROPDEF_FLOAT_PREC_DOC
Value:
" :param precision: Maximum number of decimal digits to display, in [0, 6]. Fraction is " \
"automatically hidden for exact integer values of fields with unit 'NONE' or 'TIME' (frame " \
"count) and step divisible by 100.\n" \
" :type precision: int\n"

Definition at line 3425 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_FLOAT_STEP_DOC

#define BPY_PROPDEF_FLOAT_STEP_DOC
Value:
" :param step: Step of increment/decrement in UI, " \
"in [1, 100], defaults to 3 (WARNING: actual value is /100).\n" \
" :type step: float\n"

Definition at line 3420 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_GET_DOC

#define BPY_PROPDEF_GET_DOC ( ty)
Value:
" :param get: Function to be called when this value is 'read', and the default,\n" \
" system-defined storage is not used for this property.\n" \
" This function must take 1 value (self) and return the value of the property.\n" \
"\n" \
" .. note:: Defining this callback without a matching ``set`` one will make " \
"the property read-only (even if ``READ_ONLY`` option is not set)." \
"\n" \
" :type get: Callable[[:class:`bpy.types.bpy_struct`], " ty "] | None\n"

Definition at line 3448 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_GET_TRANSFORM_DOC

#define BPY_PROPDEF_GET_TRANSFORM_DOC ( ty)
Value:
" :param get_transform: Function to be called when this value is 'read',\n" \
" if some additional processing must be performed on the stored value.\n" \
" This function must take three arguments (self, the stored value,\n" \
" and a boolean indicating if the property is currently set),\n" \
" and return the final, transformed value of the property.\n" \
"\n" \
" .. note:: The callback is responsible to ensure that value limits of the property " \
"(min/max, length...) are respected. Otherwise a ValueError exception is raised.\n" \
"\n" \
" :type get_transform: Callable[[:class:`bpy.types.bpy_struct`, " ty ", bool], " ty \
"] | None\n"

Definition at line 3467 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_INT_STEP_DOC

#define BPY_PROPDEF_INT_STEP_DOC
Value:
" :param step: Step of increment/decrement in UI, " \
"in [1, 100], defaults to 1 (WARNING: unused currently!).\n" \
" :type step: int\n"

Definition at line 3415 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_NAME_DOC

#define BPY_PROPDEF_NAME_DOC

◆ BPY_PROPDEF_NUM_MAX_DOC_

#define BPY_PROPDEF_NUM_MAX_DOC_ ( ty)
Value:
" :param max: Hard maximum, trying to assign a value above " \
"will silently assign this maximum instead.\n" \
" :type max: " ty "\n"

Definition at line 3390 of file bpy_props.cc.

◆ BPY_PROPDEF_NUM_MIN_DOC_

#define BPY_PROPDEF_NUM_MIN_DOC_ ( ty)
Value:
" :param min: Hard minimum, trying to assign a value below " \
"will silently assign this minimum instead.\n" \
" :type min: " ty "\n"

Definition at line 3385 of file bpy_props.cc.

◆ BPY_PROPDEF_NUM_MINMAX_DOC

#define BPY_PROPDEF_NUM_MINMAX_DOC ( ty)
Value:
#define BPY_PROPDEF_NUM_MIN_DOC_(ty)
#define BPY_PROPDEF_NUM_MAX_DOC_(ty)

Definition at line 3395 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_NUM_SOFT_MAX_DOC_

#define BPY_PROPDEF_NUM_SOFT_MAX_DOC_ ( ty)
Value:
" :param soft_max: Soft maximum (<= *max*), " \
"user won't be able to drag the widget above this value in the UI.\n" \
" :type soft_max: " ty "\n"

Definition at line 3402 of file bpy_props.cc.

◆ BPY_PROPDEF_NUM_SOFT_MIN_DOC_

#define BPY_PROPDEF_NUM_SOFT_MIN_DOC_ ( ty)
Value:
" :param soft_min: Soft minimum (>= *min*), " \
"user won't be able to drag the widget below this value in the UI.\n" \
" :type soft_min: " ty "\n"

Definition at line 3397 of file bpy_props.cc.

◆ BPY_PROPDEF_NUM_SOFT_MINMAX_DOC

#define BPY_PROPDEF_NUM_SOFT_MINMAX_DOC ( ty)
Value:
#define BPY_PROPDEF_NUM_SOFT_MAX_DOC_(ty)
#define BPY_PROPDEF_NUM_SOFT_MIN_DOC_(ty)

Definition at line 3407 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_OPTIONS_DOC

#define BPY_PROPDEF_OPTIONS_DOC
Value:
" :param options: Enumerator in :ref:`rna_enum_property_flag_items`.\n" \
" :type options: set[str]\n"

Definition at line 56 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_OPTIONS_ENUM_DOC

#define BPY_PROPDEF_OPTIONS_ENUM_DOC
Value:
" :param options: Enumerator in :ref:`rna_enum_property_flag_enum_items`.\n" \
" :type options: set[str]\n"

Definition at line 60 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC

#define BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC
Value:
" :param override: Enumerator in :ref:`rna_enum_property_override_flag_collection_items`.\n" \
" :type override: set[str]\n"

Definition at line 68 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_OPTIONS_OVERRIDE_DOC

#define BPY_PROPDEF_OPTIONS_OVERRIDE_DOC
Value:
" :param override: Enumerator in :ref:`rna_enum_property_override_flag_items`.\n" \
" :type override: set[str]\n"

Definition at line 64 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_POINTER_TYPE_DOC

#define BPY_PROPDEF_POINTER_TYPE_DOC
Value:
" :param type: A subclass of PropertyGroup or ID.\n" \
" :type type: type[:class:`bpy.types.PropertyGroup` | :class:`bpy.types.ID`]\n"

Definition at line 3516 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_POLL_DOC

#define BPY_PROPDEF_POLL_DOC
Value:
" :param poll: Function that determines whether an item is valid for this property.\n" \
" The function must take 2 values (self, object) and return a boolean.\n" \
"\n" \
" .. note:: The return value will be checked only when assigning an item from the UI, " \
"but it is still possible to assign an \"invalid\" item to the property directly.\n" \
"\n" \
" :type poll: Callable[[:class:`bpy.types.bpy_struct`, :class:`bpy.types.ID`], " \
"bool] | None\n"

Definition at line 3438 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_RETURN_DOC

#define BPY_PROPDEF_RETURN_DOC
Value:
" :return: Opaque type used for registration.\n" \
" :rtype: :class:`_PropertyDeferred`\n"

Definition at line 3528 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_SEARCH_DOC

#define BPY_PROPDEF_SEARCH_DOC
Value:
" :param search: Function to be called to show candidates " \
"for this string (shown in the UI).\n" \
" This function must take 3 values (self, context, edit_text)\n" \
" and return a sequence, iterator or generator where each item must be:\n" \
"\n" \
" - A single string (representing a candidate to display).\n" \
" - A tuple-pair of strings, where the first is a candidate and the second\n" \
" is additional information about the candidate.\n" \
" :type search: Callable[[:class:`bpy.types.bpy_struct`, :class:`bpy.types.Context`, str], " \
"Iterable[str | tuple[str, str]]" \
"] | None\n" \
" :param search_options: Set of strings in:\n" \
"\n" \
" - 'SORT' sorts the resulting items.\n" \
" - 'SUGGESTION' lets the user enter values not found in search candidates.\n" \
" **WARNING** disabling this flag causes the search callback to run on redraw,\n" \
" so only disable this flag if it's not likely to cause performance issues.\n" \
"\n" \
" :type search_options: set[str]\n"

Definition at line 3495 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_SET_DOC

#define BPY_PROPDEF_SET_DOC ( ty)
Value:
" :param set: Function to be called when this value is 'written', and the default,\n" \
" system-defined storage is not used for this property.\n" \
" This function must take 2 values (self, value) and return None.\n" \
"\n" \
" .. note:: Defining this callback without a matching ``get`` one is invalid." \
"\n" \
" :type set: Callable[[:class:`bpy.types.bpy_struct`, " ty "], None] | None\n"

Definition at line 3458 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_SET_TRANSFORM_DOC

#define BPY_PROPDEF_SET_TRANSFORM_DOC ( ty)
Value:
" :param set_transform: Function to be called when this value is 'written',\n" \
" if some additional processing must be performed on the given value before storing it.\n" \
" This function must take four arguments (self, the given value to store,\n" \
" the currently stored value ('raw' value, without any ``get_transform`` applied to " \
"it),\n" \
" and a boolean indicating if the property is currently set),\n" \
" and return the final, transformed value of the property.\n" \
"\n" \
" .. note:: The callback is responsible to ensure that value limits (min/max, " \
"length...) are respected. Otherwise a ValueError exception is raised.\n" \
"\n" \
" :type set_transform: " \
"Callable[[:class:`bpy.types.bpy_struct`, " ty ", " ty ", bool], " ty "] | None\n"

Definition at line 3480 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC

#define BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC
Value:
" :param subtype: Enumerator in :ref:`rna_enum_property_subtype_number_array_items`.\n" \
" :type subtype: str\n"

Definition at line 80 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_SUBTYPE_NUMBER_DOC

#define BPY_PROPDEF_SUBTYPE_NUMBER_DOC
Value:
" :param subtype: Enumerator in :ref:`rna_enum_property_subtype_number_items`.\n" \
" :type subtype: str\n"

Definition at line 76 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_SUBTYPE_STRING_DOC

#define BPY_PROPDEF_SUBTYPE_STRING_DOC
Value:
" :param subtype: Enumerator in :ref:`rna_enum_property_subtype_string_items`.\n" \
" :type subtype: str\n"

Definition at line 72 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_TAGS_DOC

#define BPY_PROPDEF_TAGS_DOC
Value:
" :param tags: Enumerator of tags that are defined by parent class.\n" \
" :type tags: set[str]\n"

Definition at line 3524 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_UNIT_DOC

#define BPY_PROPDEF_UNIT_DOC
Value:
" :param unit: Enumerator in :ref:`rna_enum_property_unit_items`.\n" \
" :type unit: str\n"

Definition at line 3377 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_UPDATE_DOC

#define BPY_PROPDEF_UPDATE_DOC
Value:
" :param update: Function to be called when this value is modified,\n" \
" This function must take 2 values (self, context) and return None.\n" \
" *Warning* there are no safety checks to avoid infinite recursion.\n" \
" :type update: Callable[[:class:`bpy.types.bpy_struct`, :class:`bpy.types.Context`], " \
"None] | None\n"

Definition at line 3431 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ BPY_PROPDEF_VECSIZE_DOC

#define BPY_PROPDEF_VECSIZE_DOC
Value:
" :param size: Vector dimensions in [1, " STRINGIFY(PYRNA_STACK_ARRAY) "]. " \
"An int sequence can be used to define multi-dimension arrays.\n" \
" :type size: int | Sequence[int]\n"
#define STRINGIFY(x)
#define PYRNA_STACK_ARRAY
Definition bpy_props.hh:41

Definition at line 3410 of file bpy_props.cc.

Referenced by blender::PyDoc_STRVAR(), blender::PyDoc_STRVAR(), and blender::PyDoc_STRVAR().

◆ PY_SSIZE_T_CLEAN

#define PY_SSIZE_T_CLEAN

Definition at line 14 of file bpy_props.cc.