Blender Git Commit Log

Git Commits -> Revision e8b415b

Revision e8b415b by Lukas Toenne (master)
January 5, 2013, 14:56 (GMT)
This patch adds support in bpy.props for getter/setter callback functions. We already have update callbacks, but generic get/set functions can come in handy in some cases where the functionality is too complex to use a single value.

The current C callback functions are too simple allow a straightforward implementation, in particular they don't receive the PropertyRNA pointer itself as an argument, which means the callback cannot directly access the PropertyRNA's py_data pointers which store the python function objects. For this reason a second runtime variant of these callbacks has been added. It is only used for runtime callbacks and not in makesrna, but otherwise works the same way.

Commit Details:

Full Hash: e8b415bdb4ba282e3574cad1463bf2512fe5eb8f
SVN Revision: 53587
Parent Commit: 5ee3cd6
Lines Changed: +1755, -328

9 Modified Paths:

/source/blender/makesrna/intern/makesrna.c (+27, -8) (Diff)
/source/blender/makesrna/intern/rna_access.c (+74, -4) (Diff)
/source/blender/makesrna/intern/rna_define.c (+138, -6) (Diff)
/source/blender/makesrna/intern/rna_internal_types.h (+47, -5) (Diff)
/source/blender/makesrna/RNA_define.h (+11, -1) (Diff)
/source/blender/makesrna/RNA_types.h (+21, -1) (Diff)
/source/blender/python/generic/py_capi_utils.c (+48, -0) (Diff)
/source/blender/python/generic/py_capi_utils.h (+2, -0) (Diff)
/source/blender/python/intern/bpy_props.c (+1387, -303) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021