# Is there a way to auto-save generated python code in Blender?

Newbie here. I'm looking for a way to record or save the autogenerated python in the info editor (shown below)

I'm aware of the way to copy the required lines and then save it as a python file through the text editor.

The thing is I believe these lines of code are persistent only for a session and are not found in a saved .blend file. If there is a way to store/export these lines of code, it would make the job of re-creating the scene through code very easy. TIA.

There have been some attempts (notably: Macros Recorder ) to make an addon that can record the commands to a textfile. But nothing built in like you might be familiar with in programs like ZBrush, which lets you record a session from start-to-finish.

The info log panel itself

You'll find a lot of repeated commands, and some ommited commands, and some commands that won't work when purely executed from a Text Editor. So even if you get all the output saved, unfortunately, I don't think it will do what you want.

Copy them to Text Editor

You can store a massive amount of data in bpy.data.texts, which you can access from Blender Text Editor. When saved that data will persist in the .blend until you manually delete it.

With the mouse cursor inside the Info panel and when you have the desired lines selected:

• copy them to clipboard ( Ctrl + c )
• open Text Editor, press + on the UI to create new Text File
• Paste ( Ctrl + v )