Refactor: Anim: simplify ANIM_remove_driver()

Simplify `ANIM_remove_driver()` by removing unused parameters and handling
simple cases first.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/121655
This commit is contained in:
Sybren A. Stüvel
2024-05-10 15:43:31 +02:00
parent 40f2df1a81
commit 45bf2eae98
5 changed files with 39 additions and 49 deletions

View File

@@ -669,7 +669,7 @@ PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args)
BKE_reports_init(&reports, RPT_STORE);
result = ANIM_remove_driver(&reports, (ID *)self->ptr.owner_id, path_full, index, 0);
result = ANIM_remove_driver(self->ptr.owner_id, path_full, index);
if (path != path_full) {
MEM_freeN((void *)path_full);