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

bpy.props.py « examples « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f6bc55d6824c51a227576cf11f2deafa387195b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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