Refactor: delete_keyframe function arguments
No functional changes intended. This simplifies the arguments for the `delete_keyframe` function. The `bAction *` was always a `nullptr` so I just removed it. The rna path char array and the array index were merged into the `RNAPath` struct. Pull Request: https://projects.blender.org/blender/blender/pulls/125479
This commit is contained in:
committed by
Christoph Lendenfeld
parent
2bf5a12e3b
commit
ebd123c90b
@@ -551,8 +551,12 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb
|
||||
}
|
||||
}
|
||||
else {
|
||||
RNAPath rna_path = {path_full, std::nullopt, index};
|
||||
if (index < 0) {
|
||||
rna_path.index = std::nullopt;
|
||||
}
|
||||
result = (blender::animrig::delete_keyframe(
|
||||
G.main, &reports, self->ptr.owner_id, nullptr, path_full, index, cfra) != 0);
|
||||
G.main, &reports, self->ptr.owner_id, rna_path, cfra) != 0);
|
||||
}
|
||||
|
||||
MEM_freeN((void *)path_full);
|
||||
|
||||
Reference in New Issue
Block a user