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.
This commit is contained in:
2016-07-30 16:34:01 +10:00
parent 362b3bbe58
commit 4e845e0670
16 changed files with 261 additions and 108 deletions

View File

@@ -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);
}