Fix #123538: Crossfade sounds sets volume to 0
The issue was that the Python keyframing code was already resolving the RNA path fully to the owning ID, but then erroneously passing the non-ID RNA pointer (in this case the sound sequence pointer) to the keyframing code with that fully resolved path. Notably, it wasn't just the VSE keyframing that was broken: keying any non-ID structs via the Python API was broken. A good example is pose bones: the Python keyframing code was resolving e.g. "location" on the bone to "pose.bones["Bone"].location", but then passing that path along with the pose bone struct to the keyframing code. Since that fully resolved path of course doesn't exist on the bone itself, keying would fail. This fixes it by simply passing the owning ID's RNA pointer instead, which it should have been doing in the first place. Pull Request: https://projects.blender.org/blender/blender/pulls/123719
This commit is contained in:
committed by
Nathan Vegdahl
parent
2034884a81
commit
38f889d07a
@@ -407,8 +407,9 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
|
||||
const std::optional<blender::StringRefNull> channel_group = group_name ?
|
||||
std::optional(group_name) :
|
||||
std::nullopt;
|
||||
PointerRNA id_pointer = RNA_id_pointer_create(self->ptr.owner_id);
|
||||
CombinedKeyingResult combined_result = insert_keyframes(G_MAIN,
|
||||
&self->ptr,
|
||||
&id_pointer,
|
||||
channel_group,
|
||||
{{path_full, {}, index}},
|
||||
std::nullopt,
|
||||
|
||||
Reference in New Issue
Block a user