Property Definitions (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.

bpy.props.BoolProperty(name="", description="", default=False, options={'ANIMATABLE'}, subtype='NONE')

Returns a new boolean property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • subtype (string) – Enumerator in [‘UNSIGNED’, ‘PERCENTAGE’, ‘FACTOR’, ‘ANGLE’, ‘TIME’, ‘DISTANCE’, ‘NONE’].
bpy.props.BoolVectorProperty(name="", description="", default=(False, False, False), options={'ANIMATABLE'}, subtype='NONE', size=3)

Returns a new vector boolean property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • subtype (string) – Enumerator in [‘COLOR’, ‘TRANSLATION’, ‘DIRECTION’, ‘VELOCITY’, ‘ACCELERATION’, ‘MATRIX’, ‘EULER’, ‘QUATERNION’, ‘AXISANGLE’, ‘XYZ’, ‘COLOR_GAMMA’, ‘LAYER’, ‘NONE’].
bpy.props.CollectionProperty(items, type="", description="", default="", options={'ANIMATABLE'})

Returns a new collection property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • type (class) – Dynamic type from bpy.types.
bpy.props.EnumProperty(items, name="", description="", default="", options={'ANIMATABLE'})

Returns a new enumerator property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • items (sequence of string triplets) – The items that make up this enumerator.
bpy.props.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')

Returns a new float property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • subtype (string) – Enumerator in [‘UNSIGNED’, ‘PERCENTAGE’, ‘FACTOR’, ‘ANGLE’, ‘TIME’, ‘DISTANCE’, ‘NONE’].
  • unit (string) – Enumerator in [‘NONE’, ‘LENGTH’, ‘AREA’, ‘VOLUME’, ‘ROTATION’, ‘TIME’, ‘VELOCITY’, ‘ACCELERATION’].
bpy.props.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)

Returns a new vector float property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • subtype (string) – Enumerator in [‘COLOR’, ‘TRANSLATION’, ‘DIRECTION’, ‘VELOCITY’, ‘ACCELERATION’, ‘MATRIX’, ‘EULER’, ‘QUATERNION’, ‘AXISANGLE’, ‘XYZ’, ‘COLOR_GAMMA’, ‘LAYER’, ‘NONE’].
bpy.props.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')

Returns a new int property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • subtype (string) – Enumerator in [‘UNSIGNED’, ‘PERCENTAGE’, ‘FACTOR’, ‘ANGLE’, ‘TIME’, ‘DISTANCE’, ‘NONE’].
bpy.props.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)

Returns a new vector int property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • subtype (string) – Enumerator in [‘COLOR’, ‘TRANSLATION’, ‘DIRECTION’, ‘VELOCITY’, ‘ACCELERATION’, ‘MATRIX’, ‘EULER’, ‘QUATERNION’, ‘AXISANGLE’, ‘XYZ’, ‘COLOR_GAMMA’, ‘LAYER’, ‘NONE’].
bpy.props.PointerProperty(items, type="", description="", default="", options={'ANIMATABLE'})

Returns a new pointer property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • type (class) – Dynamic type from bpy.types.
bpy.props.RemoveProperty(attr)

Removes a dynamically defined property.

Parameters:
  • attr (string) – Property name.
bpy.props.StringProperty(name="", description="", default="", maxlen=0, options={'ANIMATABLE'}, subtype='NONE')

Returns a new string property definition.

Parameters:
  • options (set) – Enumerator in [‘HIDDEN’, ‘ANIMATABLE’].
  • subtype (string) – Enumerator in [‘FILE_PATH’, ‘DIR_PATH’, ‘FILENAME’, ‘NONE’].

Previous topic

Application Data (bpy.app)

Next topic

Math Types & Utilities (mathutils)