The importer is not being able to bring in dataref value animations. It does create keyframes for them, but the value of the first keyframe is replicated to all the others, effectively loosing all the dataref animations.
triggers an internal view_layer.update(). This update happens before the control reaches the add_xplane_dataref_keyframe function, it is internal to Blender's machinery. The effect of the call is to reset the object to what was set in the previous keyframe. Therefore, the state of the first keyframe propagates to all that follow.
The proposed fix is to call view_layer.update() before writing the new keyframe information to blender_struct. This seems to work.
The importer is not being able to bring in dataref value animations. It does create keyframes for them, but the value of the first keyframe is replicated to all the others, effectively loosing all the dataref animations.
The root cause has to do with the mechanisms documented here: No updates after setting values
What happens in the addon is that the values are correctly read, but the following call:
triggers an internal
view_layer.update()
. This update happens before the control reaches theadd_xplane_dataref_keyframe
function, it is internal to Blender's machinery. The effect of the call is to reset the object to what was set in the previous keyframe. Therefore, the state of the first keyframe propagates to all that follow.The proposed fix is to call
view_layer.update()
before writing the new keyframe information toblender_struct
. This seems to work.