diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-06 21:50:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-06 21:50:20 +0400 |
commit | 8cee3285460b82a5f64901a8610b07b63bd95701 (patch) | |
tree | 755e2eb20837a6a015168ddd5b6df77e64885137 /source/blender/makesrna/RNA_access.h | |
parent | 0c1298f9727a2de61dd0d28944f4af5873a65668 (diff) |
Support for update callbacks in python defined RNA properties as discussed last meeting.
This means script authors can perform actions using these callbacks rather then on drawing which puts blender in a readonly state.
Simple example:
import bpy
def up_func(self, context):
print("test")
bpy.types.Scene.testprop = bpy.props.FloatProperty(update=up_func)
bpy.context.scene.testprop = 11
# prints -> test
Diffstat (limited to 'source/blender/makesrna/RNA_access.h')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index e0feba3f2fd..ca19a86e42c 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -650,6 +650,7 @@ PropertyType RNA_property_type(PropertyRNA *prop); PropertySubType RNA_property_subtype(PropertyRNA *prop); PropertyUnit RNA_property_unit(PropertyRNA *prop); int RNA_property_flag(PropertyRNA *prop); +void *RNA_property_py_data_get(PropertyRNA *prop); int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop); int RNA_property_array_check(PointerRNA *ptr, PropertyRNA *prop); |