Blender  V2.93
Classes | Macros | Functions | Variables
bpy_props.c File Reference
#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 EnumPropertyItemenum_items_from_py (PyObject *seq_fast, PyObject *def, int *defvalue, const bool is_enum_flag)
 
static const EnumPropertyItembpy_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)
 
StructRNApointer_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 BPyPropStorebpy_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)
 

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

Macro Definition Documentation

◆ ASSIGN_PYOBJECT_INCREF

#define ASSIGN_PYOBJECT_INCREF (   a,
 
)
Value:
{ \
BLI_assert((a) == NULL); \
Py_INCREF(b); \
a = b; \
} \
((void)0)
static unsigned a[3]
Definition: RandGen.cpp:92

Definition at line 265 of file bpy_props.c.

◆ ASSIGN_STATIC

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

◆ BPY_PROP_STORE_PY_DATA_SIZE

#define BPY_PROP_STORE_PY_DATA_SIZE    (sizeof(((struct BPyPropStore *)NULL)->py_data) / sizeof(PyObject *))

Definition at line 262 of file bpy_props.c.

◆ BPY_PROPDEF_CHECK

#define BPY_PROPDEF_CHECK (   _func,
  _property_flag_items,
  _property_flag_override_items 
)

Definition at line 2247 of file bpy_props.c.

◆ BPY_PROPDEF_DESC_DOC

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

Definition at line 2310 of file bpy_props.c.

◆ BPY_PROPDEF_FLOAT_PREC_DOC

#define BPY_PROPDEF_FLOAT_PREC_DOC
Value:
" :arg precision: Maximum number of decimal digits to display, in [0, 6].\n" \
" :type precision: int\n"

Definition at line 2349 of file bpy_props.c.

◆ BPY_PROPDEF_FLOAT_STEP_DOC

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

Definition at line 2344 of file bpy_props.c.

◆ BPY_PROPDEF_GET_DOC

#define BPY_PROPDEF_GET_DOC
Value:
" :arg get: Function to be called when this value is 'read',\n" \
" This function must take 1 value (self) and return the value of the property.\n" \
" :type get: function\n"

Definition at line 2365 of file bpy_props.c.

◆ BPY_PROPDEF_HEAD

#define BPY_PROPDEF_HEAD (   _func)
Value:
if (PyTuple_GET_SIZE(args) == 1) { \
PyObject *ret; \
self = PyTuple_GET_ITEM(args, 0); \
args = PyTuple_New(0); \
ret = BPy_##_func(self, args, kw); \
Py_DECREF(args); \
return ret; \
} \
if (PyTuple_GET_SIZE(args) > 1) { \
PyErr_SetString(PyExc_ValueError, "all args must be keywords"); \
return NULL; \
} \
srna = srna_from_self(self, #_func "(...):"); \
if (srna == NULL) { \
if (PyErr_Occurred()) { \
return NULL; \
} \
return bpy_prop_deferred_data_CreatePyObject(pymeth_##_func, kw); \
} \
(void)0
static PyObject * bpy_prop_deferred_data_CreatePyObject(PyObject *fn, PyObject *kw)
Definition: bpy_props.c:410
StructRNA * srna_from_self(PyObject *self, const char *error_prefix)
Definition: bpy_rna.c:7906
return ret

Definition at line 2223 of file bpy_props.c.

◆ BPY_PROPDEF_INT_STEP_DOC

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

Definition at line 2339 of file bpy_props.c.

◆ BPY_PROPDEF_NAME_DOC

#define BPY_PROPDEF_NAME_DOC
Value:
" :arg name: Name used in the user interface.\n" \
" :type name: string\n"

Definition at line 2306 of file bpy_props.c.

◆ BPY_PROPDEF_NUM_MAX_DOC

#define BPY_PROPDEF_NUM_MAX_DOC
Value:
" :arg max: Hard maximum, trying to assign a value above will silently assign this maximum " \
"instead.\n"

Definition at line 2323 of file bpy_props.c.

◆ BPY_PROPDEF_NUM_MIN_DOC

#define BPY_PROPDEF_NUM_MIN_DOC
Value:
" :arg min: Hard minimum, trying to assign a value below will silently assign this minimum " \
"instead.\n"

Definition at line 2319 of file bpy_props.c.

◆ BPY_PROPDEF_NUM_SOFTMAX_DOC

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

Definition at line 2331 of file bpy_props.c.

◆ BPY_PROPDEF_NUM_SOFTMIN_DOC

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

Definition at line 2327 of file bpy_props.c.

◆ BPY_PROPDEF_OPTIONS_DOC

#define BPY_PROPDEF_OPTIONS_DOC
Value:
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE', " \
"'PROPORTIONAL'," \
"'TEXTEDIT_UPDATE'].\n" \
" :type options: set\n"

Definition at line 69 of file bpy_props.c.

◆ BPY_PROPDEF_OPTIONS_ENUM_DOC

#define BPY_PROPDEF_OPTIONS_ENUM_DOC
Value:
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'ENUM_FLAG', " \
"'LIBRARY_EDITABLE'].\n" \
" :type options: set\n"

Definition at line 84 of file bpy_props.c.

◆ BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC

#define BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC
Value:
" :arg override: Enumerator in ['LIBRARY_OVERRIDABLE', 'NO_PROPERTY_NAME', " \
"'USE_INSERTION'].\n" \
" :type override: set\n"

Definition at line 121 of file bpy_props.c.

◆ BPY_PROPDEF_OPTIONS_OVERRIDE_DOC

#define BPY_PROPDEF_OPTIONS_OVERRIDE_DOC
Value:
" :arg override: Enumerator in ['LIBRARY_OVERRIDABLE'].\n" \
" :type override: set\n"

Definition at line 98 of file bpy_props.c.

◆ BPY_PROPDEF_POLL_DOC

#define BPY_PROPDEF_POLL_DOC
Value:
" :arg poll: function to be called to determine whether an item is valid for this " \
"property.\n" \
" The function must take 2 values (self, object) and return Bool.\n" \
" :type poll: function\n"

Definition at line 2359 of file bpy_props.c.

◆ BPY_PROPDEF_SET_DOC

#define BPY_PROPDEF_SET_DOC
Value:
" :arg set: Function to be called when this value is 'written',\n" \
" This function must take 2 values (self, value) and return None.\n" \
" :type set: function\n"

Definition at line 2370 of file bpy_props.c.

◆ BPY_PROPDEF_SUBTYPE_ARRAY_DOC

#define BPY_PROPDEF_SUBTYPE_ARRAY_DOC
Value:
" :arg subtype: Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', " \
"'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', " \
"'XYZ', 'XYZ_LENGTH', 'COLOR_GAMMA', 'COORDINATES', 'LAYER', 'LAYER_MEMBER', 'NONE'].\n" \
" :type subtype: string\n"

Definition at line 186 of file bpy_props.c.

◆ BPY_PROPDEF_SUBTYPE_CHECK

#define BPY_PROPDEF_SUBTYPE_CHECK (   _func,
  _property_flag_items,
  _property_flag_override_items,
  _subtype 
)
Value:
BPY_PROPDEF_CHECK(_func, _property_flag_items, _property_flag_override_items); \
if (UNLIKELY(pysubtype && RNA_enum_value_from_id(_subtype, pysubtype, &subtype) == 0)) { \
const char *enum_str = BPy_enum_as_string(_subtype); \
PyErr_Format(PyExc_TypeError, \
#_func \
"(subtype='%s'): " \
"subtype not found in (%s)", \
pysubtype, \
enum_str); \
MEM_freeN((void *)enum_str); \
return NULL; \
} \
(void)0
#define UNLIKELY(x)
char * BPy_enum_as_string(const EnumPropertyItem *item)
#define BPY_PROPDEF_CHECK(_func, _property_flag_items, _property_flag_override_items)
Definition: bpy_props.c:2247
bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value)
Definition: rna_access.c:6474

Definition at line 2284 of file bpy_props.c.

◆ BPY_PROPDEF_SUBTYPE_NUMBER_DOC

#define BPY_PROPDEF_SUBTYPE_NUMBER_DOC
Value:
" :arg subtype: Enumerator in ['PIXEL', 'UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', " \
"'TIME', 'DISTANCE', 'DISTANCE_CAMERA', 'POWER', 'TEMPERATURE', 'NONE'].\n" \
" :type subtype: string\n"

Definition at line 160 of file bpy_props.c.

◆ BPY_PROPDEF_SUBTYPE_STRING_DOC

#define BPY_PROPDEF_SUBTYPE_STRING_DOC
Value:
" :arg subtype: Enumerator in ['FILE_PATH', 'DIR_PATH', 'FILE_NAME', 'BYTE_STRING', " \
"'PASSWORD', 'NONE'].\n" \
" :type subtype: string\n"

Definition at line 139 of file bpy_props.c.

◆ BPY_PROPDEF_TAGS_DOC

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

Definition at line 2379 of file bpy_props.c.

◆ BPY_PROPDEF_TYPE_DOC

#define BPY_PROPDEF_TYPE_DOC
Value:
" :arg type: A subclass of :class:`bpy.types.PropertyGroup` or :class:`bpy.types.ID`.\n" \
" :type type: class\n"

Definition at line 2375 of file bpy_props.c.

◆ BPY_PROPDEF_UNIT_DOC

#define BPY_PROPDEF_UNIT_DOC
Value:
" :arg unit: Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', " \
"'VELOCITY', 'ACCELERATION', 'MASS', 'CAMERA', 'POWER'].\n" \
" :type unit: string\n"

Definition at line 2314 of file bpy_props.c.

◆ BPY_PROPDEF_UPDATE_DOC

#define BPY_PROPDEF_UPDATE_DOC
Value:
" :arg 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: function\n"

Definition at line 2353 of file bpy_props.c.

◆ BPY_PROPDEF_VECSIZE_DOC

#define BPY_PROPDEF_VECSIZE_DOC
Value:
" :arg size: Vector dimensions in [1, " STRINGIFY(PYRNA_STACK_ARRAY) "].\n" \
" :type size: int\n"
#define STRINGIFY(x)
#define PYRNA_STACK_ARRAY
Definition: bpy_props.h:44

Definition at line 2335 of file bpy_props.c.

◆ PY_SSIZE_T_CLEAN

#define PY_SSIZE_T_CLEAN

Definition at line 26 of file bpy_props.c.

Function Documentation

◆ BPy_BoolProperty()

static PyObject* BPy_BoolProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

◆ BPy_BoolVectorProperty()

static PyObject* BPy_BoolVectorProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

◆ BPy_CollectionProperty()

PyObject* BPy_CollectionProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)

◆ BPy_EnumProperty()

static PyObject* BPy_EnumProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

◆ BPy_FloatProperty()

static PyObject* BPy_FloatProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

◆ BPy_FloatVectorProperty()

static PyObject* BPy_FloatVectorProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

◆ BPy_IntProperty()

static PyObject* BPy_IntProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

◆ BPy_IntVectorProperty()

static PyObject* BPy_IntVectorProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

◆ BPy_PointerProperty()

PyObject* BPy_PointerProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)

◆ bpy_prop_assign_flag()

static void bpy_prop_assign_flag ( PropertyRNA prop,
const int  flag 
)
static

◆ bpy_prop_assign_flag_override()

static void bpy_prop_assign_flag_override ( PropertyRNA prop,
const int  flag_override 
)
static

◆ bpy_prop_boolean_array_get_fn()

static void bpy_prop_boolean_array_get_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
bool *  values 
)
static

◆ bpy_prop_boolean_array_set_fn()

static void bpy_prop_boolean_array_set_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
const bool *  values 
)
static

◆ bpy_prop_boolean_get_fn()

static bool bpy_prop_boolean_get_fn ( struct PointerRNA ptr,
struct PropertyRNA prop 
)
static

◆ bpy_prop_boolean_set_fn()

static void bpy_prop_boolean_set_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
bool  value 
)
static

◆ bpy_prop_callback_assign_boolean()

static void bpy_prop_callback_assign_boolean ( struct PropertyRNA prop,
PyObject *  get_fn,
PyObject *  set_fn 
)
static

◆ bpy_prop_callback_assign_boolean_array()

static void bpy_prop_callback_assign_boolean_array ( struct PropertyRNA prop,
PyObject *  get_fn,
PyObject *  set_fn 
)
static

◆ bpy_prop_callback_assign_enum()

static void bpy_prop_callback_assign_enum ( struct PropertyRNA prop,
PyObject *  get_fn,
PyObject *  set_fn,
PyObject *  itemf_fn 
)
static

◆ bpy_prop_callback_assign_float()

static void bpy_prop_callback_assign_float ( struct PropertyRNA prop,
PyObject *  get_fn,
PyObject *  set_fn 
)
static

◆ bpy_prop_callback_assign_float_array()

static void bpy_prop_callback_assign_float_array ( struct PropertyRNA prop,
PyObject *  get_fn,
PyObject *  set_fn 
)
static

◆ bpy_prop_callback_assign_int()

static void bpy_prop_callback_assign_int ( struct PropertyRNA prop,
PyObject *  get_fn,
PyObject *  set_fn 
)
static

◆ bpy_prop_callback_assign_int_array()

static void bpy_prop_callback_assign_int_array ( struct PropertyRNA prop,
PyObject *  get_fn,
PyObject *  set_fn 
)
static

◆ bpy_prop_callback_assign_pointer()

static void bpy_prop_callback_assign_pointer ( struct PropertyRNA prop,
PyObject *  poll_fn 
)
static

◆ bpy_prop_callback_assign_string()

static void bpy_prop_callback_assign_string ( struct PropertyRNA prop,
PyObject *  get_fn,
PyObject *  set_fn 
)
static

◆ bpy_prop_callback_assign_update()

static void bpy_prop_callback_assign_update ( struct PropertyRNA prop,
PyObject *  update_fn 
)
static

◆ bpy_prop_callback_check()

static int bpy_prop_callback_check ( PyObject *  py_func,
const char *  keyword,
int  argcount 
)
static

◆ bpy_prop_deferred_call()

static PyObject* bpy_prop_deferred_call ( BPy_PropDeferred UNUSEDself,
PyObject *  UNUSEDargs,
PyObject *  UNUSEDkw 
)
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.

◆ bpy_prop_deferred_clear()

static int bpy_prop_deferred_clear ( BPy_PropDeferred self)
static

Definition at line 330 of file bpy_props.c.

References self.

◆ bpy_prop_deferred_data_CreatePyObject()

static PyObject* bpy_prop_deferred_data_CreatePyObject ( PyObject *  fn,
PyObject *  kw 
)
static

Definition at line 410 of file bpy_props.c.

References bpy_prop_deferred_Type, and NULL.

◆ bpy_prop_deferred_dealloc()

static void bpy_prop_deferred_dealloc ( BPy_PropDeferred self)
static

Definition at line 317 of file bpy_props.c.

References self.

◆ bpy_prop_deferred_function_get()

static PyObject* bpy_prop_deferred_function_get ( BPy_PropDeferred self,
void *  UNUSEDclosure 
)
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.

◆ bpy_prop_deferred_keywords_get()

static PyObject* bpy_prop_deferred_keywords_get ( BPy_PropDeferred self,
void *  UNUSEDclosure 
)
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.

◆ bpy_prop_deferred_repr()

static PyObject* bpy_prop_deferred_repr ( BPy_PropDeferred self)
static

Definition at line 336 of file bpy_props.c.

References self.

◆ bpy_prop_deferred_traverse()

static int bpy_prop_deferred_traverse ( BPy_PropDeferred self,
visitproc  visit,
void *  arg 
)
static

Definition at line 324 of file bpy_props.c.

References self.

◆ bpy_prop_enum_get_fn()

static int bpy_prop_enum_get_fn ( struct PointerRNA ptr,
struct PropertyRNA prop 
)
static

◆ bpy_prop_enum_itemf_fn()

static const EnumPropertyItem* bpy_prop_enum_itemf_fn ( struct bContext C,
PointerRNA ptr,
PropertyRNA prop,
bool *  r_free 
)
static

◆ bpy_prop_enum_set_fn()

static void bpy_prop_enum_set_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
int  value 
)
static

◆ bpy_prop_float_array_get_fn()

static void bpy_prop_float_array_get_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
float values 
)
static

◆ bpy_prop_float_array_set_fn()

static void bpy_prop_float_array_set_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
const float values 
)
static

◆ bpy_prop_float_get_fn()

static float bpy_prop_float_get_fn ( struct PointerRNA ptr,
struct PropertyRNA prop 
)
static

◆ bpy_prop_float_set_fn()

static void bpy_prop_float_set_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
float  value 
)
static

◆ bpy_prop_int_array_get_fn()

static void bpy_prop_int_array_get_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
int *  values 
)
static

◆ bpy_prop_int_array_set_fn()

static void bpy_prop_int_array_set_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
const int *  values 
)
static

◆ bpy_prop_int_get_fn()

static int bpy_prop_int_get_fn ( struct PointerRNA ptr,
struct PropertyRNA prop 
)
static

◆ bpy_prop_int_set_fn()

static void bpy_prop_int_set_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
int  value 
)
static

◆ bpy_prop_pointer_poll_fn()

static bool bpy_prop_pointer_poll_fn ( struct PointerRNA self,
PointerRNA  candidate,
struct PropertyRNA prop 
)
static

◆ bpy_prop_py_data_ensure()

static struct BPyPropStore* bpy_prop_py_data_ensure ( struct PropertyRNA prop)
static

◆ bpy_prop_py_data_remove()

static void bpy_prop_py_data_remove ( PropertyRNA prop)
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().

◆ bpy_prop_string_get_fn()

static void bpy_prop_string_get_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
char *  value 
)
static

◆ bpy_prop_string_length_fn()

static int bpy_prop_string_length_fn ( struct PointerRNA ptr,
struct PropertyRNA prop 
)
static

◆ bpy_prop_string_set_fn()

static void bpy_prop_string_set_fn ( struct PointerRNA ptr,
struct PropertyRNA prop,
const char *  value 
)
static

◆ bpy_prop_update_fn()

static void bpy_prop_update_fn ( struct bContext C,
struct PointerRNA ptr,
struct PropertyRNA prop 
)
static

◆ BPy_RemoveProperty()

static PyObject* BPy_RemoveProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

Definition at line 3788 of file bpy_props.c.

References NULL, ret, RNA_def_property_free_identifier(), and srna_from_self().

◆ BPY_rna_props()

PyObject* BPY_rna_props ( void  )

◆ BPY_rna_props_clear_all()

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().

◆ BPy_StringProperty()

static PyObject* BPy_StringProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static

◆ enum_items_from_py()

static const EnumPropertyItem* enum_items_from_py ( PyObject *  seq_fast,
PyObject *  def,
int *  defvalue,
const bool  is_enum_flag 
)
static

◆ icon_id_from_name()

static int icon_id_from_name ( const char *  name)
static

◆ pointer_type_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().

◆ props_clear()

static int props_clear ( PyObject *  UNUSEDself)
static

◆ props_visit()

static int props_visit ( PyObject *  UNUSEDself,
visitproc  visit,
void *  arg 
)
static

◆ py_long_as_int()

static bool py_long_as_int ( PyObject *  py_long,
int *  r_int 
)
static

Definition at line 1657 of file bpy_props.c.

Referenced by BPy_EnumProperty(), and enum_items_from_py().

◆ PyDoc_STRVAR() [1/12]

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() [2/12]

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() [3/12]

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() [4/12]

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() [5/12]

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() [6/12]

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() [7/12]

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() [8/12]

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() [9/12]

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() [10/12]

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() [11/12]

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() [12/12]

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 
)

◆ pyrna_struct_as_instance()

static PyObject* pyrna_struct_as_instance ( PointerRNA ptr)
static

Variable Documentation

◆ bpy_prop_deferred_getset

PyGetSetDef bpy_prop_deferred_getset[]
static
Initial value:
= {
{"function", (getter)bpy_prop_deferred_function_get, (setter)NULL, NULL, NULL},
{"keywords", (getter)bpy_prop_deferred_keywords_get, (setter)NULL, NULL, NULL},
}
static PyObject * bpy_prop_deferred_function_get(BPy_PropDeferred *self, void *UNUSED(closure))
Definition: bpy_props.c:361
static PyObject * bpy_prop_deferred_keywords_get(BPy_PropDeferred *self, void *UNUSED(closure))
Definition: bpy_props.c:372

Definition at line 379 of file bpy_props.c.

◆ bpy_prop_deferred_Type

PyTypeObject bpy_prop_deferred_Type
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "_PropertyDeferred",
.tp_basicsize = sizeof(BPy_PropDeferred),
.tp_dealloc = (destructor)bpy_prop_deferred_dealloc,
.tp_repr = (reprfunc)bpy_prop_deferred_repr,
.tp_call = (ternaryfunc)bpy_prop_deferred_call,
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
.tp_doc = bpy_prop_deferred_doc,
.tp_traverse = (traverseproc)bpy_prop_deferred_traverse,
.tp_clear = (inquiry)bpy_prop_deferred_clear,
}
static PyGetSetDef bpy_prop_deferred_getset[]
Definition: bpy_props.c:379
static int bpy_prop_deferred_clear(BPy_PropDeferred *self)
Definition: bpy_props.c:330
static void bpy_prop_deferred_dealloc(BPy_PropDeferred *self)
Definition: bpy_props.c:317
static int bpy_prop_deferred_traverse(BPy_PropDeferred *self, visitproc visit, void *arg)
Definition: bpy_props.c:324
static PyObject * bpy_prop_deferred_call(BPy_PropDeferred *UNUSED(self), PyObject *UNUSED(args), PyObject *UNUSED(kw))
Definition: bpy_props.c:347
static PyObject * bpy_prop_deferred_repr(BPy_PropDeferred *self)
Definition: bpy_props.c:336

Definition at line 392 of file bpy_props.c.

Referenced by bpy_prop_deferred_data_CreatePyObject(), and BPY_rna_props().

◆ g_bpy_prop_store_list

ListBase g_bpy_prop_store_list = {NULL, NULL}
static

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().

◆ property_flag_enum_items

const EnumPropertyItem property_flag_enum_items[]
static
Initial value:
= {
{PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
{PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animatable", ""},
{PROP_LIB_EXCEPTION, "LIBRARY_EDITABLE", 0, "Library Editable", ""},
{PROP_ENUM_FLAG, "ENUM_FLAG", 0, "Enum Flag", ""},
{0, NULL, 0, NULL, NULL},
}
@ PROP_ANIMATABLE
Definition: RNA_types.h:188
@ PROP_ENUM_FLAG
Definition: RNA_types.h:251
@ PROP_LIB_EXCEPTION
Definition: RNA_types.h:181
@ PROP_SKIP_SAVE
Definition: RNA_types.h:204
@ PROP_HIDDEN
Definition: RNA_types.h:202

Definition at line 75 of file bpy_props.c.

Referenced by BPy_EnumProperty().

◆ property_flag_items

const EnumPropertyItem property_flag_items[]
static
Initial value:
= {
{PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
{PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animatable", ""},
{PROP_LIB_EXCEPTION, "LIBRARY_EDITABLE", 0, "Library Editable", ""},
{PROP_PROPORTIONAL, "PROPORTIONAL", 0, "Adjust values proportionally to eachother", ""},
"TEXTEDIT_UPDATE",
0,
"Update on every keystroke in textedit 'mode'",
""},
{0, NULL, 0, NULL, NULL},
}
@ PROP_PROPORTIONAL
Definition: RNA_types.h:209
@ PROP_TEXTEDIT_UPDATE
Definition: RNA_types.h:195

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().

◆ property_flag_override_collection_items

const EnumPropertyItem property_flag_override_collection_items[]
static
Initial value:
= {
"LIBRARY_OVERRIDABLE",
0,
"Library Overridable",
"Make that property editable in library overrides of linked data-blocks"},
"NO_PROPERTY_NAME",
0,
"No Name",
"Do not use the names of the items, only their indices in the collection"},
"USE_INSERTION",
0,
"Use Insertion",
"Allow users to add new items in that collection in library overrides"},
{0, NULL, 0, NULL, NULL},
}
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
Definition: RNA_types.h:297
@ PROPOVERRIDE_LIBRARY_INSERTION
Definition: RNA_types.h:322
@ PROPOVERRIDE_NO_PROP_NAME
Definition: RNA_types.h:329

Definition at line 102 of file bpy_props.c.

Referenced by BPy_CollectionProperty().

◆ property_flag_override_items

const EnumPropertyItem property_flag_override_items[]
static
Initial value:
= {
"LIBRARY_OVERRIDABLE",
0,
"Library Overridable",
"Make that property editable in library overrides of linked data-blocks"},
{0, NULL, 0, NULL, NULL},
}

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().

◆ property_subtype_array_items

const EnumPropertyItem property_subtype_array_items[]
static
Initial value:
= {
{PROP_COLOR, "COLOR", 0, "Color", ""},
{PROP_TRANSLATION, "TRANSLATION", 0, "Translation", ""},
{PROP_DIRECTION, "DIRECTION", 0, "Direction", ""},
{PROP_VELOCITY, "VELOCITY", 0, "Velocity", ""},
{PROP_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""},
{PROP_MATRIX, "MATRIX", 0, "Matrix", ""},
{PROP_EULER, "EULER", 0, "Euler", ""},
{PROP_QUATERNION, "QUATERNION", 0, "Quaternion", ""},
{PROP_AXISANGLE, "AXISANGLE", 0, "Axis Angle", ""},
{PROP_XYZ, "XYZ", 0, "XYZ", ""},
{PROP_XYZ_LENGTH, "XYZ_LENGTH", 0, "XYZ Length", ""},
{PROP_COLOR_GAMMA, "COLOR_GAMMA", 0, "Color Gamma", ""},
{PROP_COORDS, "COORDINATES", 0, "Vector Coordinates", ""},
{PROP_LAYER, "LAYER", 0, "Layer", ""},
{PROP_LAYER_MEMBER, "LAYER_MEMBER", 0, "Layer Member", ""},
{PROP_NONE, "NONE", 0, "None", ""},
{0, NULL, 0, NULL, NULL},
}
@ PROP_MATRIX
Definition: RNA_types.h:144
@ PROP_DIRECTION
Definition: RNA_types.h:141
@ PROP_XYZ
Definition: RNA_types.h:148
@ PROP_ACCELERATION
Definition: RNA_types.h:143
@ PROP_LAYER_MEMBER
Definition: RNA_types.h:157
@ PROP_COLOR
Definition: RNA_types.h:139
@ PROP_AXISANGLE
Definition: RNA_types.h:147
@ PROP_EULER
Definition: RNA_types.h:145
@ PROP_COORDS
Definition: RNA_types.h:153
@ PROP_NONE
Definition: RNA_types.h:113
@ PROP_COLOR_GAMMA
Definition: RNA_types.h:151
@ PROP_TRANSLATION
Definition: RNA_types.h:140
@ PROP_XYZ_LENGTH
Definition: RNA_types.h:149
@ PROP_LAYER
Definition: RNA_types.h:156
@ PROP_QUATERNION
Definition: RNA_types.h:146
@ PROP_VELOCITY
Definition: RNA_types.h:142

Definition at line 165 of file bpy_props.c.

Referenced by BPy_BoolVectorProperty(), BPy_FloatVectorProperty(), and BPy_IntVectorProperty().

◆ property_subtype_number_items

const EnumPropertyItem property_subtype_number_items[]
static
Initial value:
= {
{PROP_PIXEL, "PIXEL", 0, "Pixel", ""},
{PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned", ""},
{PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""},
{PROP_FACTOR, "FACTOR", 0, "Factor", ""},
{PROP_ANGLE, "ANGLE", 0, "Angle", ""},
{PROP_TIME, "TIME", 0, "Time", ""},
{PROP_DISTANCE, "DISTANCE", 0, "Distance", ""},
{PROP_DISTANCE_CAMERA, "DISTANCE_CAMERA", 0, "Camera Distance", ""},
{PROP_POWER, "POWER", 0, "Power", ""},
{PROP_TEMPERATURE, "TEMPERATURE", 0, "Temperature", ""},
{PROP_NONE, "NONE", 0, "None", ""},
{0, NULL, 0, NULL, NULL},
}
@ PROP_TIME
Definition: RNA_types.h:133
@ PROP_DISTANCE
Definition: RNA_types.h:135
@ PROP_TEMPERATURE
Definition: RNA_types.h:163
@ PROP_POWER
Definition: RNA_types.h:160
@ PROP_PIXEL
Definition: RNA_types.h:128
@ PROP_ANGLE
Definition: RNA_types.h:132
@ PROP_DISTANCE_CAMERA
Definition: RNA_types.h:136
@ PROP_PERCENTAGE
Definition: RNA_types.h:130
@ PROP_FACTOR
Definition: RNA_types.h:131
@ PROP_UNSIGNED
Definition: RNA_types.h:129

Definition at line 144 of file bpy_props.c.

Referenced by BPy_BoolProperty(), BPy_FloatProperty(), and BPy_IntProperty().

◆ property_subtype_string_items

const EnumPropertyItem property_subtype_string_items[]
static
Initial value:
= {
{PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
{PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""},
{PROP_FILENAME, "FILE_NAME", 0, "Filename", ""},
{PROP_BYTESTRING, "BYTE_STRING", 0, "Byte String", ""},
{PROP_PASSWORD, "PASSWORD", 0, "Password", "A string that is displayed hidden ('********')"},
{PROP_NONE, "NONE", 0, "None", ""},
{0, NULL, 0, NULL, NULL},
}
@ PROP_BYTESTRING
Definition: RNA_types.h:120
@ PROP_FILENAME
Definition: RNA_types.h:118
@ PROP_PASSWORD
Definition: RNA_types.h:123
@ PROP_DIRPATH
Definition: RNA_types.h:117
@ PROP_FILEPATH
Definition: RNA_types.h:116

Definition at line 128 of file bpy_props.c.

Referenced by BPy_StringProperty().

◆ props_methods

struct PyMethodDef props_methods[]
static

Definition at line 3788 of file bpy_props.c.

◆ props_module

struct PyModuleDef props_module
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"bpy.props",
"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",
-1,
}
static int props_visit(PyObject *UNUSED(self), visitproc visit, void *arg)
Definition: bpy_props.c:3888
static int props_clear(PyObject *UNUSED(self))
Definition: bpy_props.c:3899
static struct PyMethodDef props_methods[]
Definition: bpy_props.c:3839

Definition at line 3899 of file bpy_props.c.

Referenced by BPY_rna_props().

◆ pymeth_BoolProperty

PyObject* pymeth_BoolProperty = NULL
static

Definition at line 428 of file bpy_props.c.

◆ pymeth_BoolVectorProperty

PyObject* pymeth_BoolVectorProperty = NULL
static

Definition at line 429 of file bpy_props.c.

◆ pymeth_CollectionProperty

PyObject* pymeth_CollectionProperty = NULL
static

Definition at line 437 of file bpy_props.c.

◆ pymeth_EnumProperty

PyObject* pymeth_EnumProperty = NULL
static

Definition at line 435 of file bpy_props.c.

◆ pymeth_FloatProperty

PyObject* pymeth_FloatProperty = NULL
static

Definition at line 432 of file bpy_props.c.

◆ pymeth_FloatVectorProperty

PyObject* pymeth_FloatVectorProperty = NULL
static

Definition at line 433 of file bpy_props.c.

◆ pymeth_IntProperty

PyObject* pymeth_IntProperty = NULL
static

Definition at line 430 of file bpy_props.c.

◆ pymeth_IntVectorProperty

PyObject* pymeth_IntVectorProperty = NULL
static

Definition at line 431 of file bpy_props.c.

◆ pymeth_PointerProperty

PyObject* pymeth_PointerProperty = NULL
static

Definition at line 436 of file bpy_props.c.

◆ pymeth_RemoveProperty

PyObject* pymeth_RemoveProperty = NULL
static

Definition at line 438 of file bpy_props.c.

◆ pymeth_StringProperty

PyObject* pymeth_StringProperty = NULL
static

Definition at line 434 of file bpy_props.c.