Add rotation to a key frame I'm supporting blender 2.80, And I want to move to blender 2.81 - 2.83.
I encountered an issue while trying moving to blender 2.81
In my script for blender 2.80 I ran these command lines.
scn = bpy.context.scene
wd = scn.world
envnt = bpy.data.worlds[wd.name].node_tree
map_node = envnt.nodes['Mapping']
map_node.rotation.x = &lt;x value of rotation&gt;
map_node.rotation.y = &lt;y value of rotation&gt;
map_node.rotation.z = &lt;z value of rotation&gt;
map_node.keyframe_insert(data_path=&quot;rotation&quot;, frame=&lt;frame number&gt;)

But for blender 2.81 I needed to do some changes.
scn = bpy.context.scene
wd = scn.world
envnt = bpy.data.worlds[wd.name].node_tree
map_node = envnt.nodes['Mapping']
map_node.inputs['Rotation'].default_value.x = &lt;x value of rotation&gt;
map_node.inputs['Rotation'].default_value.y = &lt;y value of rotation&gt;
map_node.inputs['Rotation'].default_value.z = &lt;z value of rotation&gt;
map_node.keyframe_insert(data_path=&quot;rotation&quot;, frame=&lt;frame number&gt;) --&gt; problem

Here I didn't manage to add a rotation to the key frame.
In the end I need to save a scene file that include the rotation to each key frame.
What is the right command here?
scn = bpy.context.scene
wd = scn.world
envnt = bpy.data.worlds[wd.name].node_tree
map_node = envnt.nodes['Mapping']
map_node.inputs['Rotation'].default_value.x = &lt;x value of rotation&gt;
map_node.inputs['Rotation'].default_value.y = &lt;y value of rotation&gt;
map_node.inputs['Rotation'].default_value.z = &lt;z value of rotation&gt;
map_node.inputs['Rotation'].keyframe_insert(&quot;default_value&quot;, frame=&lt;frame number&gt;)