2011-02-18 14:27:18 +00:00
|
|
|
"""
|
|
|
|
Assigning to Existing Classes
|
|
|
|
+++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
Custom properties can be added to any subclass of an :class:`ID`,
|
|
|
|
:class:`Bone` and :class:`PoseBone`.
|
|
|
|
|
|
|
|
These properties can be animated, accessed by the user interface and python
|
2015-04-24 13:08:31 +00:00
|
|
|
like Blender's existing properties.
|
2011-02-18 14:27:18 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
|
|
# Assign a custom property to an existing type.
|
|
|
|
bpy.types.Material.custom_float = bpy.props.FloatProperty(name="Test Prob")
|
|
|
|
|
|
|
|
# Test the property is there.
|
|
|
|
bpy.data.materials[0].custom_float = 5.0
|