Docs: update examples for 2.8x

Use fields for properties
This commit is contained in:
2019-03-22 00:07:06 +11:00
parent bd1299f6a4
commit dd1132416e
13 changed files with 90 additions and 60 deletions

View File

@@ -12,7 +12,7 @@ like Blender's existing properties.
import bpy
# Assign a custom property to an existing type.
bpy.types.Material.custom_float = bpy.props.FloatProperty(name="Test Prob")
bpy.types.Material.custom_float = bpy.props.FloatProperty(name="Test Property")
# Test the property is there.
bpy.data.materials[0].custom_float = 5.0