auto load favorite scripts at startup?

is there a way to automatically load my favorite scripts so they are sitting there open-up as soon as blender is started?

for example i would love it if my blender library and 3d cursor right-click script would already be initialized, rather than having to go to scripts and load them one at a time with my other favorite scripts…

Add an onload scriptlink that calls the scripts and save as your user default.

lol, a what?!!..dude, first of all cambo, thanks for all of your awesome scripts and helping so many others streamline their scripts, ur a genius

…but i have no idea what ur talkin about. i don’t know python…could u clarify a little bit? onload scriptlinks for dummies? thx.

Hey man, sorry for the total lack of details :wink:
heres how to do it.

  • Make a new text file in your default scene. add in some commend print “Hello World” for eg. just so you can see its running.
  • In the buttons panel Click on the scripts button
  • Make “Enable Script links” pressed. (WARNING, bve very carefull opening untrusted Blends with this saved as default, an evil blend could wipe your disk in a few lines of python)
  • At the bottom of the Scriptlinks panel click on “New” and select the text file you made.
  • With the dropdown that appiers, “Frame Changed” select “OnLoad”

Now save as user defaults with Ctrl+U

restart blender

On opening Blender see if “Hello World” is printed in teh console

If everything went right- it will be.

Now for running the scripts.
a quick and easy way is to do

import Blender
from Blender import Text, sys
txt= Text.Load(sys.join(Blender.Get('scriptsdir'), ''))

  • Blender.Get(‘uscriptsdir’) if the script is in your own scripts dir.

Probably fine for starting out. however its better to import the script and run it, but for that you need to know the main functions in a script that trigger it.
Its also bad because youll end up with Blends that have python scripts in them that may not ne updated to the latest version.

import import_obj

should work for obj import, must of my scripts havea main() function.

If you cant work out how to do this, contact the author asking them to see how their script can be imported and launched. or use the basic text loading method.

Hope this helps

awesome, thx man. - i’ll give it a go right away - how come this question doesnt come up more often? - i kinda assumed all the blenderpro’s were doin this.

there is another way that I use… rather than haveing the scripts load as the default script… I make my help button into a python script favorites folder.

the Help button is almost always visible, and verry rarely used (in my case)

what i do is after I download the python script, I will look at the script headder…
the headder has the section where the script will be located
here is an example from the sflender script:

""" Registration info Blender menues:
Blender: 236
Group: 'Export'

Where it says Group: ‘export’ , change it to Group: “Help”

it is case sensitive, so be sure to capitolize where needed…

After this you will have the script listed under your help menu :slight_smile: (if not goto the script window, and click scripts>update scripts to refresh the list

I will go a step further and remove al the help scripts except the hotkey list…
this way i truely have a nice dedicated “favorites script folder”

I have my OBJ importer/exporter there, along with my blender library script :slight_smile:

hope this helps :slight_smile: