Console on startup?

hi,

is there a way to open the console on blender startup ?

thanks

Yep- just make a startup script, and add
bpy.ops.wm.console_toggle()
to it :slight_smile:

What I mean by startup script is this: write your startup script in a new, default file. Turn Register on. Save this as your new startup file. Voila!

You don’t have to save it as your default, any file that has bpy.ops.wm.console_toggle() in the text editor, and that text is registered, will open the console on startup.

P.S. If you use the Stored Views add-on that comes packaged with Blender, I highly recommend adding bpy.ops.view3d.stored_views_initialize() to your startup script. I have no idea why you have to click a button to start using stored views, but by doing this, you’ll never have to worry about it again :slight_smile:

2 Likes

If you’re on Windows, simply create a .cmd or .bat file inside the directory that your Blender executable is in. Inside the script file, insert this code.

start blender.exe -con

If you wish to place the script elsewhere and still run the Blender executable, you can do this instead.

SET PATH=D:\Blender\Projects\RP\UPBGE_03_7_5_2022
start blender.exe -con

hmm, the problem is that I use windows tray latest opened files and I cannot change their links

Did you try my method? I use it myself and can assure you it works

I did as you recommended

image

image

on restart it asked for permanent permissions

but the console never showed up even after a restart

you need “import bpy” before that line

just figured it out , yes it works !
you’re a genius man

are you in charge of the Python Blender API dev?

1 Like

If I understood you correctly, you wish to edit your last opened files list? You can do this by editing this log file here.

C:\Users\%INSERT_USERNAME_HERE%\AppData\Roaming\Blender Foundation\Blender\%BLENDER_VERSION%\config\recent-files.txt

Be sure to replace %INSERT_USERNAME_HERE% with your own active, OS account username.
And likewise replace %BLENDER_VERSION% with your Blender version, such as 3.3 or something similar.

Thanks, you overstate it, I just have a bit of experience :slight_smile: I am not involved with Blender development at all, I prefer making my own add-ons to dealing with the hassle of getting things through the development pipeline