diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-12-23 15:49:58 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-12-23 15:49:58 +0300 |
commit | 025c9214165ca9e43d3c281c326bf4887c32d642 (patch) | |
tree | 8a73ba96b58bfdf5f71dbb2f676d27ee392ba82e /source/blender/blenkernel/intern/fcurve.c | |
parent | 00965c98cbf14871e822f9b0541caa8b09e0ad5e (diff) |
Cleanup: remove BKE_animdata_driver_path_hack
The `BKE_animdata_driver_path_hack()` function has had almost no effect
since rB51b796ff1528, and basically boils down to:
```
return base_path ? base_path : RNA_path_from_ID_to_property(ptr, prop);
```
Since `base_path` was `NULL` in the majority of cases, it's just been
replaced by a direct call to `RNA_path_from_ID_to_property()`. The
conditional now just appears in one remaining case.
This relates to T91387.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D13646
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 5bbfc0913a1..f7a547543af 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -412,7 +412,7 @@ FCurve *BKE_fcurve_find_by_rna_context_ui(bContext *C, char *path = NULL; if (!adt && C) { - path = BKE_animdata_driver_path_hack(C, &tptr, prop, NULL); + path = RNA_path_from_ID_to_property(&tptr, prop); adt = BKE_animdata_from_id(tptr.owner_id); step--; } @@ -463,7 +463,7 @@ FCurve *BKE_fcurve_find_by_rna_context_ui(bContext *C, } if (step) { - char *tpath = BKE_animdata_driver_path_hack(C, &tptr, prop, path); + char *tpath = path ? path : RNA_path_from_ID_to_property(&tptr, prop); if (tpath && tpath != path) { MEM_freeN(path); path = tpath; |