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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user