Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2011-09-07 19:34:04 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2011-09-07 19:34:04 +0400
commitdbd6658d737b1592a633ddf6397be14e50e434d9 (patch)
tree57081721d70622a3c3141909b258f9bce8a5b1e3 /doc/python_api/examples/bpy.props.py
parentb5bd86e5907c3fa98546dabeda9703dfb15862f4 (diff)
parent884fc84793be1c5fdd6643ad267331381f8e1c6b (diff)
svn merge -r 37306:39975 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'doc/python_api/examples/bpy.props.py')
-rw-r--r--doc/python_api/examples/bpy.props.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/python_api/examples/bpy.props.py b/doc/python_api/examples/bpy.props.py
new file mode 100644
index 00000000000..f6bc55d6824
--- /dev/null
+++ b/doc/python_api/examples/bpy.props.py
@@ -0,0 +1,18 @@
+"""
+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
+like blenders existing properties.
+"""
+
+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