Support for update callbacks in python defined RNA properties as discussed last meeting.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 6 Jun 2011 17:50:20 +0000 (17:50 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 6 Jun 2011 17:50:20 +0000 (17:50 +0000)
commit8cee3285460b82a5f64901a8610b07b63bd95701
tree755e2eb20837a6a015168ddd5b6df77e64885137
parent0c1298f9727a2de61dd0d28944f4af5873a65668
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
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_define.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_internal_types.h
source/blender/python/intern/bpy_props.c