diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-30 09:34:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-30 09:46:13 +0300 |
commit | 4e845e06704bad3c11297ae8e86b400ef80b2a89 (patch) | |
tree | e26c66b90934e6230f5c4bc67f3fe7419b199ecf /source/blender/python/intern/bpy_rna_driver.c | |
parent | 362b3bbe58ae378d5e154dd1a27d55d913594a1a (diff) |
Py-Driver: add 'self' option
Drivers can use this to refer to the data which the driver is applied to,
useful for objects, bones, to avoid having to create a variable pointing to its self.
Diffstat (limited to 'source/blender/python/intern/bpy_rna_driver.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_driver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna_driver.c b/source/blender/python/intern/bpy_rna_driver.c index 482508a8d85..98fc372f2fc 100644 --- a/source/blender/python/intern/bpy_rna_driver.c +++ b/source/blender/python/intern/bpy_rna_driver.c @@ -77,3 +77,8 @@ PyObject *pyrna_driver_get_variable_value( return driver_arg; } + +PyObject *pyrna_driver_self_from_anim_rna(struct PathResolvedRNA *anim_rna) +{ + return pyrna_struct_CreatePyObject(&anim_rna->ptr); +} |