So with some inspiration from Wegg in the #blender irc channel, I decided to make this Addon. With Script Shortcut, you can set simple python scripts as buttons in customizable panels.
You can add as many buttons as you like, add labels and spacers between the buttons, and make buttons conditional on a python true/false statement included in the script.
So far, there isnāt much, but I would like to have a bit of a repository of buttons in the future - if anyone comes up with a useful one, let me know!
I have not been able to try this yet but this is exactly the type of addons that Blender should be working on fulltime for the next 5 years to come. I am using a similar scripts but for pie menus that you can find here:
Is it possible to add buttons from just copt commands inside Blender instead of linking to an external script?
what kind of buttons are supported? It would be great with on/off icons (like the display face normal in the n panel for example) , value sliders,checkboxes etc. I actually have not tried this yet so i will get back to you with more feedback. I would love to chat some with you on Skype to see what you are up to GREAT WORK!
ps. why donāt you team up with the creator of āTune upā? seems like you could do some cool stuff together.
Thanks for the kind words! If you guys make any useful scripts, post them here and iāll add them to directory on my website.
Hmm, hadnt thought about that, actually.
Honestly, that is not really what i envisioned this script was geared towards: its more for implementing commands that arent already in blender, without having to deal with an entire addon.
In truth tho, any internal command in blender should be able to be implemented through a script file (like how i used the duplicate and delete functions in the demo video), and i might include a few of those in the script files. Which commands were you thinking about adding?
It just does basic ādo somethingā buttons right now, tho it might be useful to have the ability to add properties as well (sliders/checkboxes/values), ill have to give that some thought. anyone else interested in that feature?
I dont use skype, but im on irc all the time, freenode network #blender and #blendercoders
Havnt heard of tune up, ill take a look at it, but im kindof more of a lone ranger coder
Also a little todo im thinking about:
Im thinking of adding a drop-down menu at the top of the panel to switch between multiple layouts, gotta figure out the logistics a bit on it, but I think it would be a nice addition.
I want to add the ability to have multiple buttons/labels per row
I also really need to add a way to switch the script file for a buttonā¦
I updated the script some to version 0.4:
Added popup menu with the shortcut ctrl-shift-space that pops up the current panel for an area
Added a change script button to the button editor dialog
Implemented stored panel presets through a drop-down menu
Were you thinking of the popup shortcut like I just added, or direct shortcuts to each button? I could map shortcuts to Alt-1, Alt-2, etc to the first second and so on buttons, but Iām not sure how to add custom shortcuts without reimplementing blenderās keymap editorā¦
Updated to version 0.5
Not a huge update, but a couple nice additions:
Made panel settings into addon preferences, they no longer clog up the window view menu with a settings menu
Resolved error messages when loading script
The script should save the panel settings to the current scene, if you want the buttons to be on a new file, start a new file, set up the buttons, and save as your startup .blend file.
Also, you can save and load your button layouts at any time
Hi thanks for sharing ! Can I use it also with addons? For example instead of installing an addon, add it to a button?
That would also be great since I expect that some addons are causing problems, and this way I can just load easily only what I need at that moment.
Hmm, i think it would probably work, but I canāt confirm or guarantee itā¦ itās possible that some addons wonāt work right like that, and menus might get added more than once if you run it again.
worth trying out tho, let me know if there are any problems.