2
$\begingroup$

The plugin is simpletabs

Documentation has this problem

Sometimes, when I start Blender, SIMPLE TABS doesn’t load the correct order. 
As mentioned before, you can press the check button. This tends to happens when re-opening Blender from a crash.

But it doesn't solve the problem.

Can I make blender run the following command automatically when it starts?

bpy.ops.simpletabs.update()
$\endgroup$

1 Answer 1

3
$\begingroup$

There are several ways, but I'm not sure it will fix your issue since it depends when the "startup command" is run compared to the addon's registration.

First, you can have Blender to run a python file at startup, you can do this by running Blender via command line or via a script file (.bat on windows).

myScript.py:

import bpy
bpy.ops.simpletabs.update()

command:

blender -P path/to/myScript.py

Second method is to make a Startup Script that does it for you

import bpy
from bpy.app.handlers import persistent
@persistent
def refresh_simpletabs(dummy):
    bpy.ops.simpletabs.update()

def register():
    bpy.app.handlers.load_post.append(refresh_simpletabs)
def unregister():
    pass
if __name__ == "__main__":
    register()

Put that script into your scripts/startup/.The exact location of this directory depends on your installation. See the directory layout docs.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .