Blender V2.61 - r43446
Defines | Functions | Variables

bpy_props.c File Reference

#include <Python.h>
#include "RNA_types.h"
#include "bpy_props.h"
#include "bpy_rna.h"
#include "bpy_util.h"
#include "BLI_utildefines.h"
#include "BKE_idprop.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "MEM_guardedalloc.h"
#include "../generic/py_capi_utils.h"

Go to the source code of this file.

Defines

#define BPY_DATA_CB_SLOT_SIZE   1
#define BPY_DATA_CB_SLOT_UPDATE   0
#define BPY_PROPDEF_HEAD(_func)
#define BPY_PROPDEF_CHECK(_func, _property_flag_items)
#define BPY_PROPDEF_SUBTYPE_CHECK(_func, _property_flag_items, _subtype)
#define BPY_PROPDEF_NAME_DOC
#define BPY_PROPDEF_DESC_DOC
#define BPY_PROPDEF_UNIT_DOC
#define BPY_PROPDEF_UPDATE_DOC
#define ASSIGN_STATIC(_name)   pymeth_##_name = PyDict_GetItemString(submodule_dict, #_name)

Functions

static PyObject * pyrna_struct_as_instance (PointerRNA *ptr)
static void printf_func_error (PyObject *py_func)
static PyObject * bpy_prop_deferred_return (PyObject *func, PyObject *kw)
static void bpy_prop_update_cb (struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
static int bpy_prop_callback_check (PyObject *py_func, int argcount)
static int bpy_prop_callback_assign (struct PropertyRNA *prop, PyObject *update_cb)
static int py_long_as_int (PyObject *py_long, int *r_int)
 PyDoc_STRVAR (BPy_BoolProperty_doc,".. function:: BoolProperty(name=\"\", description=\"\", default=False, options={'ANIMATABLE'}, subtype='NONE', update=None)\n""\n"" Returns a new boolean property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n"" :arg subtype: Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].\n"" :type subtype: string\n"BPY_PROPDEF_UPDATE_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'}, subtype='NONE', size=3, update=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"" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n"" :arg subtype: Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].\n"" :type subtype: string\n"" :arg size: Vector dimensions in [1, and "STRINGIFY(PYRNA_STACK_ARRAY)"].\n"" :type size: int\n"BPY_PROPDEF_UPDATE_DOC)
static PyObject * BPy_BoolVectorProperty (PyObject *self, PyObject *args, PyObject *kw)
 PyDoc_STRVAR (BPy_IntProperty_doc,".. function:: IntProperty(name=\"\", description=\"\", default=0, min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, step=1, options={'ANIMATABLE'}, subtype='NONE', update=None)\n""\n"" Returns a new int property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n"" :arg subtype: Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].\n"" :type subtype: string\n"BPY_PROPDEF_UPDATE_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=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, options={'ANIMATABLE'}, subtype='NONE', size=3, update=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"" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n"" :arg subtype: Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].\n"" :type subtype: string\n"" :arg size: Vector dimensions in [1, and "STRINGIFY(PYRNA_STACK_ARRAY)"].\n"" :type size: int\n"BPY_PROPDEF_UPDATE_DOC)
static PyObject * BPy_IntVectorProperty (PyObject *self, PyObject *args, PyObject *kw)
 PyDoc_STRVAR (BPy_FloatProperty_doc,".. function:: FloatProperty(name=\"\", description=\"\", default=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'}, subtype='NONE', unit='NONE', update=None)\n""\n"" Returns a new float property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n"" :arg subtype: Enumerator in ['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].\n"" :type subtype: string\n"BPY_PROPDEF_UNIT_DOC BPY_PROPDEF_UPDATE_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'}, subtype='NONE', size=3, update=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"" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n"" :arg subtype: Enumerator in ['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'].\n"" :type subtype: string\n"BPY_PROPDEF_UNIT_DOC" :arg size: Vector dimensions in [1, and "STRINGIFY(PYRNA_STACK_ARRAY)"].\n"" :type size: int\n"BPY_PROPDEF_UPDATE_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'}, subtype='NONE', update=None)\n""\n"" Returns a new string property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n"" :arg subtype: Enumerator in ['FILE_PATH', 'DIR_PATH', 'FILENAME', 'NONE'].\n"" :type subtype: string\n"BPY_PROPDEF_UPDATE_DOC)
static PyObject * BPy_StringProperty (PyObject *self, PyObject *args, PyObject *kw)
static EnumPropertyItemenum_items_from_py (PyObject *seq_fast, PyObject *def, int *defvalue, const short is_enum_flag)
static EnumPropertyItembpy_props_enum_itemf (struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int *free)
 PyDoc_STRVAR (BPy_EnumProperty_doc,".. function:: EnumProperty(items, name=\"\", description=\"\", default=\"\", options={'ANIMATABLE'}, update=None)\n""\n"" Returns a new enumerator property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg default: The default value for this enum, A string when *ENUM_FLAG*\n"" is disabled otherwise a set which may only contain string identifiers\n"" used in *items*.\n"" :type default: string or set\n"" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'ENUM_FLAG'].\n"" :type options: set\n"" :arg items: sequence of enum items formatted:\n"" [(identifier, name, description, number), ...] where the identifier is used\n"" for python access and other values are used for the interface.\n"" Note the item is optional.\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)\n"" :type items: sequence of string triplets or a function\n"BPY_PROPDEF_UPDATE_DOC)
static PyObject * BPy_EnumProperty (PyObject *self, PyObject *args, PyObject *kw)
static StructRNApointer_type_from_py (PyObject *value, const char *error_prefix)
 PyDoc_STRVAR (BPy_PointerProperty_doc,".. function:: PointerProperty(type=\"\", description=\"\", options={'ANIMATABLE'}, update=None)\n""\n"" Returns a new pointer property definition.\n""\n"" :arg type: A subclass of :class:`bpy.types.PropertyGroup`.\n"" :type type: class\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n"BPY_PROPDEF_UPDATE_DOC)
static PyObject * BPy_PointerProperty (PyObject *self, PyObject *args, PyObject *kw)
 PyDoc_STRVAR (BPy_CollectionProperty_doc,".. function:: CollectionProperty(items, type=\"\", description=\"\", default=\"\", options={'ANIMATABLE'})\n""\n"" Returns a new collection property definition.\n""\n"" :arg type: A subclass of :class:`bpy.types.PropertyGroup`.\n"" :type type: class\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'].\n"" :type options: set\n")
static PyObject * BPy_CollectionProperty (PyObject *self, PyObject *args, PyObject *kw)
 PyDoc_STRVAR (BPy_RemoveProperty_doc,".. function:: RemoveProperty(attr)\n""\n"" Removes a dynamically defined property.\n""\n"" :arg attr: Property name.\n"" :type attr: string\n")
static PyObject * BPy_RemoveProperty (PyObject *self, PyObject *args, PyObject *kw)
PyObject * BPY_rna_props (void)

Variables

BPy_StructRNAbpy_context_module
static EnumPropertyItem property_flag_items []
static EnumPropertyItem property_flag_enum_items []
static EnumPropertyItem property_subtype_string_items []
static EnumPropertyItem property_subtype_number_items []
static EnumPropertyItem property_subtype_array_items []
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
static struct PyMethodDef props_methods []
static struct PyModuleDef props_module

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.


Define Documentation

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

Referenced by BPY_rna_props().

#define BPY_DATA_CB_SLOT_SIZE   1

Definition at line 53 of file bpy_props.c.

Referenced by bpy_prop_callback_assign().

#define BPY_DATA_CB_SLOT_UPDATE   0

Definition at line 55 of file bpy_props.c.

Referenced by bpy_prop_callback_assign(), and bpy_prop_update_cb().

#define BPY_PROPDEF_CHECK (   _func,
  _property_flag_items 
)
Value:
if (id_len >= MAX_IDPROP_NAME) {                                          \
        PyErr_Format(PyExc_TypeError,                                         \
                     #_func"(): '%.200s' too long, max length is %d",         \
                     id, MAX_IDPROP_NAME - 1);                                \
        return NULL;                                                          \
    }                                                                         \
    if (RNA_def_property_free_identifier(srna, id) == -1) {                   \
        PyErr_Format(PyExc_TypeError,                                         \
                     #_func"(): '%s' is defined as a non-dynamic type",       \
                     id);                                                     \
        return NULL;                                                          \
    }                                                                         \
    if (pyopts && pyrna_set_to_enum_bitfield(_property_flag_items,            \
                                             pyopts,                          \
                                             &opts,                           \
                                             #_func"(options={ ...}):"))      \
    {                                                                         \
        return NULL;                                                          \
    }                                                                         \

Definition at line 309 of file bpy_props.c.

Referenced by BPy_CollectionProperty(), BPy_EnumProperty(), and BPy_PointerProperty().

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

Definition at line 348 of file bpy_props.c.

#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;                                                           \
    }                                                                         \
    else 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_return(pymeth_##_func, kw);                  \
    }                                                                         \

Definition at line 287 of file bpy_props.c.

Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_CollectionProperty(), BPy_EnumProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), and BPy_StringProperty().

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

Definition at line 343 of file bpy_props.c.

#define BPY_PROPDEF_SUBTYPE_CHECK (   _func,
  _property_flag_items,
  _subtype 
)
Value:
BPY_PROPDEF_CHECK(_func, _property_flag_items)                            \
    if (pysubtype && RNA_enum_value_from_id(_subtype,                         \
                                            pysubtype,                        \
                                            &subtype) == 0)                   \
    {                                                                         \
        PyErr_Format(PyExc_TypeError,                                         \
                     #_func"(subtype='%s'): invalid subtype",                 \
                     pysubtype);                                              \
        return NULL;                                                          \
    }                                                                         \

Definition at line 330 of file bpy_props.c.

Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), and BPy_StringProperty().

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

Definition at line 353 of file bpy_props.c.

#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" \
"   :type update: function\n" \

Definition at line 358 of file bpy_props.c.


Function Documentation

static PyObject* BPy_BoolProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static PyObject* BPy_BoolVectorProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static PyObject* BPy_CollectionProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static PyObject* BPy_EnumProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static PyObject* BPy_FloatProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static PyObject* BPy_FloatVectorProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static PyObject* BPy_IntProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static PyObject* BPy_IntVectorProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static PyObject* BPy_PointerProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static int bpy_prop_callback_assign ( struct PropertyRNA prop,
PyObject *  update_cb 
) [static]
static int bpy_prop_callback_check ( PyObject *  py_func,
int  argcount 
) [static]
static PyObject* bpy_prop_deferred_return ( PyObject *  func,
PyObject *  kw 
) [static]

Definition at line 167 of file bpy_props.c.

References NULL.

static void bpy_prop_update_cb ( struct bContext C,
struct PointerRNA ptr,
struct PropertyRNA prop 
) [static]
static EnumPropertyItem* bpy_props_enum_itemf ( struct bContext C,
PointerRNA ptr,
PropertyRNA prop,
int *  free 
) [static]
static PyObject* BPy_RemoveProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
PyObject* BPY_rna_props ( void  )

Definition at line 1484 of file bpy_props.c.

References ASSIGN_STATIC.

Referenced by BPy_init_modules().

static PyObject* BPy_StringProperty ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
) [static]
static EnumPropertyItem* enum_items_from_py ( PyObject *  seq_fast,
PyObject *  def,
int *  defvalue,
const short  is_enum_flag 
) [static]
static StructRNA* pointer_type_from_py ( PyObject *  value,
const char *  error_prefix 
) [static]
static void printf_func_error ( PyObject *  py_func) [static]

Definition at line 149 of file bpy_props.c.

Referenced by bpy_prop_update_cb(), and bpy_props_enum_itemf().

static int py_long_as_int ( PyObject *  py_long,
int *  r_int 
) [static]

Definition at line 274 of file bpy_props.c.

Referenced by enum_items_from_py().

PyDoc_STRVAR ( BPy_EnumProperty_doc  ,
".. function:: EnumProperty(items, name=\"\", description=\"\", default=\"\", options={'ANIMATABLE'}, update=None)\n""\n"" Returns a new enumerator property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg default: The default value for this  enum,
A string when *ENUM_FLAG *\n""is disabled otherwise a set which may only contain string identifiers\n""used in *items *.\n"":type default:string or set\n"":arg options:Enumerator in.\n"":type options:set\n"":arg items:sequence of enum items formatted:\n""where the identifier is used\n""for python access and other values are used for the interface.\n""Note the item is optional.\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)\n"":type items:sequence of string triplets or a function\n"  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'ENUM_FLAG'][(identifier, name, description, number),...] 
)
PyDoc_STRVAR ( BPy_FloatProperty_doc  ,
".. function:: FloatProperty(name=\"\", description=\"\", default=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'}, subtype='NONE', unit='NONE', update=None)\n""\n"" Returns a new float property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in .\n"" :type options: set\n"" :arg subtype: Enumerator in .\n"" :type subtype: string\n"BPY_PROPDEF_UNIT_DOC  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE']['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'] 
)
PyDoc_STRVAR ( BPy_BoolProperty_doc  ,
".. function:: BoolProperty(name=\"\", description=\"\", default=False, options={'ANIMATABLE'}, subtype='NONE', update=None)\n""\n"" Returns a new boolean property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in .\n"" :type options: set\n"" :arg subtype: Enumerator in .\n"" :type subtype: string\n"  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE']['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'] 
)
PyDoc_STRVAR ( BPy_CollectionProperty_doc  ,
".. function:: CollectionProperty(items, type=\"\", description=\"\", default=\"\", options={'ANIMATABLE'})\n""\n"" Returns a new collection property definition.\n""\n"" :arg type: A subclass of :class:`bpy.types.PropertyGroup`.\n"" :type type: class\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in .\n"" :type options: set\n"  ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'] 
)
PyDoc_STRVAR ( BPy_BoolVectorProperty_doc  ,
".. function:: BoolVectorProperty(name=\"\", description=\"\", default=(False, False, False), options={'ANIMATABLE'}, subtype='NONE', size=3, update=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"" :arg options: Enumerator in .\n"" :type options: set\n"" :arg subtype: Enumerator in .\n"" :type subtype: string\n"" :arg size: Vector dimensions in .\n"" :type size: int\n"  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE']['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'][1, and"STRINGIFY(PYRNA_STACK_ARRAY)"] 
)
PyDoc_STRVAR ( BPy_StringProperty_doc  ,
".. function:: StringProperty(name=\"\", description=\"\", default=\"\", maxlen=0, options={'ANIMATABLE'}, subtype='NONE', update=None)\n""\n"" Returns a new string property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in .\n"" :type options: set\n"" :arg subtype: Enumerator in .\n"" :type subtype: string\n"  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE']['FILE_PATH', 'DIR_PATH', 'FILENAME', 'NONE'] 
)
PyDoc_STRVAR ( BPy_PointerProperty_doc  ,
".. function:: PointerProperty(type=\"\", description=\"\", options={'ANIMATABLE'}, update=None)\n""\n"" Returns a new pointer property definition.\n""\n"" :arg type: A subclass of :class:`bpy.types.PropertyGroup`.\n"" :type type: class\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in .\n"" :type options: set\n"  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE'] 
)
PyDoc_STRVAR ( BPy_RemoveProperty_doc  ,
".. function:: RemoveProperty(attr)\n""\n"" Removes a dynamically defined property.\n""\n"" :arg attr: Property name.\n"" :type attr: string\n"   
)
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'}, subtype='NONE', size=3, update=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"" :arg options: Enumerator in .\n"" :type options: set\n"" :arg subtype: Enumerator in .\n"" :type subtype: string\n"BPY_PROPDEF_UNIT_DOC" :arg size: Vector dimensions in .\n"" :type size: int\n"  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE']['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'][1, and"STRINGIFY(PYRNA_STACK_ARRAY)"] 
)
PyDoc_STRVAR ( BPy_IntProperty_doc  ,
".. function:: IntProperty(name=\"\", description=\"\", default=0, min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, step=1, options={'ANIMATABLE'}, subtype='NONE', update=None)\n""\n"" Returns a new int property definition.\n""\n"BPY_PROPDEF_NAME_DOC BPY_PROPDEF_DESC_DOC" :arg options: Enumerator in .\n"" :type options: set\n"" :arg subtype: Enumerator in .\n"" :type subtype: string\n"  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE']['UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'] 
)
PyDoc_STRVAR ( BPy_IntVectorProperty_doc  ,
".. function:: IntVectorProperty(name=\"\", description=\"\", default=(0, 0, 0), min=-sys.maxint, max=sys.maxint, soft_min=-sys.maxint, soft_max=sys.maxint, options={'ANIMATABLE'}, subtype='NONE', size=3, update=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"" :arg options: Enumerator in .\n"" :type options: set\n"" :arg subtype: Enumerator in .\n"" :type subtype: string\n"" :arg size: Vector dimensions in .\n"" :type size: int\n"  BPY_PROPDEF_UPDATE_DOC['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE']['COLOR', 'TRANSLATION', 'DIRECTION', 'VELOCITY', 'ACCELERATION', 'MATRIX', 'EULER', 'QUATERNION', 'AXISANGLE', 'XYZ', 'COLOR_GAMMA', 'LAYER', 'NONE'][1, and"STRINGIFY(PYRNA_STACK_ARRAY)"] 
)
static PyObject* pyrna_struct_as_instance ( PointerRNA ptr) [static]

Variable Documentation

Definition at line 81 of file bpy_interface.c.

Referenced by BPy_init_modules().

Initial value:
 {
    {PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
    {PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
    {PROP_ANIMATABLE, "ANIMATABLE", 0, "Animateable", ""},
    {PROP_ENUM_FLAG, "ENUM_FLAG", 0, "Enum Flag", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 65 of file bpy_props.c.

Initial value:
 {
    {PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
    {PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
    {PROP_ANIMATABLE, "ANIMATABLE", 0, "Animateable", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 59 of file bpy_props.c.

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_COLOR_GAMMA, "COLOR_GAMMA", 0, "Color Gamma", ""},
    {PROP_LAYER, "LAYER", 0, "Layer", ""},

    {PROP_NONE, "NONE", 0, "None", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 94 of file bpy_props.c.

Initial value:
 {
    {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_NONE, "NONE", 0, "None", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 83 of file bpy_props.c.

Initial value:
 {
    {PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
    {PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""},
    {PROP_FILENAME, "FILENAME", 0, "Filename", ""},
    {PROP_BYTESTRING, "BYTE_STRING", 0, "Byte String", ""},
    {PROP_TRANSLATE, "TRANSLATE", 0, "Translate", ""},

    {PROP_NONE, "NONE", 0, "None", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 73 of file bpy_props.c.

struct PyMethodDef props_methods[] [static]
Initial value:
 {
    {"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, BPy_BoolProperty_doc},
    {"BoolVectorProperty", (PyCFunction)BPy_BoolVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_BoolVectorProperty_doc},
    {"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, BPy_IntProperty_doc},
    {"IntVectorProperty", (PyCFunction)BPy_IntVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_IntVectorProperty_doc},
    {"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, BPy_FloatProperty_doc},
    {"FloatVectorProperty", (PyCFunction)BPy_FloatVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_FloatVectorProperty_doc},
    {"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, BPy_StringProperty_doc},
    {"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, BPy_EnumProperty_doc},
    {"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, BPy_PointerProperty_doc},
    {"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, BPy_CollectionProperty_doc},

    {"RemoveProperty", (PyCFunction)BPy_RemoveProperty, METH_VARARGS|METH_KEYWORDS, BPy_RemoveProperty_doc},
    {NULL, NULL, 0, NULL}
}

Definition at line 1458 of file bpy_props.c.

struct PyModuleDef props_module [static]
Initial value:
 {
    PyModuleDef_HEAD_INIT,
    "bpy.props",
    "This module defines properties to extend blenders internal data, the result of these functions"
    " is used to assign properties to classes registered with blender and can't be used directly.",
    -1,
    props_methods,
    NULL, NULL, NULL, NULL
}

Definition at line 1474 of file bpy_props.c.

PyObject* pymeth_BoolProperty = NULL [static]

Definition at line 112 of file bpy_props.c.

PyObject* pymeth_BoolVectorProperty = NULL [static]

Definition at line 113 of file bpy_props.c.

PyObject* pymeth_CollectionProperty = NULL [static]

Definition at line 121 of file bpy_props.c.

PyObject* pymeth_EnumProperty = NULL [static]

Definition at line 119 of file bpy_props.c.

PyObject* pymeth_FloatProperty = NULL [static]

Definition at line 116 of file bpy_props.c.

PyObject* pymeth_FloatVectorProperty = NULL [static]

Definition at line 117 of file bpy_props.c.

PyObject* pymeth_IntProperty = NULL [static]

Definition at line 114 of file bpy_props.c.

PyObject* pymeth_IntVectorProperty = NULL [static]

Definition at line 115 of file bpy_props.c.

PyObject* pymeth_PointerProperty = NULL [static]

Definition at line 120 of file bpy_props.c.

PyObject* pymeth_RemoveProperty = NULL [static]

Definition at line 122 of file bpy_props.c.

PyObject* pymeth_StringProperty = NULL [static]

Definition at line 118 of file bpy_props.c.