Commit Graph

61 Commits

Author SHA1 Message Date
d937d06c02 WorkSpace: UI filtering for add-ons
Allows for each workspace to have it's own add-ons on display.

Filtering for: Panels, Menus, Keymaps & Manipulators.
Automatically applies to add-ons at the moment.

Access from workspace, toggled off by default
once enabled, add-ons can be white-listed.

See D3076
2018-03-01 01:31:07 +11:00
10fec1f153 Cleanup: Python code-style (addons, wm) 2018-02-01 13:58:44 +11:00
9af6f40e4d addon_utils: add disable_all function 2017-03-24 05:20:26 +11:00
112e4de885 Improve add-on UI error message
Show the paths of the duplicate addons

D791 by @gregzaal
2017-02-27 03:57:11 +11:00
ca983d1825 Cleanup: pep8 2016-07-30 09:00:41 +10:00
3ad1e4fab9 addon_utils: improve docstrings
Also make error handler take the exception as its argument.
2016-01-07 23:33:51 +11:00
f7b8bc45b2 Python: use keyword only args for addon_utils 2015-11-16 09:41:42 +11:00
74f7ef1240 Missed changing default arg in addon_utils.disable 2015-06-23 07:25:10 +10:00
eb0310950c Fix error enabling an already enabled addon
Would run register() twice causing warning with `register_module()`
which expects new classes to be defined.

Now run unregister() before re-registering.
2015-06-14 22:26:42 +10:00
b9fe261255 Fix addon_utils.check
Second return value could be None instead of False.
2015-06-14 21:47:02 +10:00
d63615272c Use context manager for reading addon headers 2015-06-08 21:21:54 +10:00
07d51141ae Fix: a broken symlink to an addon resulted in a blank addon tab
The addons tab in the User Settings window would be empty, due to
a FileNotFound error. This error can be caused by a broken symlink,
which is now treated the same was as a file that misses its bl_info
dictionary.
2015-06-08 12:08:43 +02:00
f5a471ef86 Python: avoid mutable default param values
D1328 by @yedpodtrzitko
2015-05-31 15:58:58 +10:00
e408e632a1 Addons: print short message if an addons missing
Was printing full traceback, harmless but verbose.
2015-02-12 23:44:37 +11:00
3ff3f563e5 PyAPI: don't adjust prefs when an fails to load
Recent addons commit meant that addons would be enabled even if they weren't found.
This would give an error (which is fine), but also remove from preferences.
2015-01-23 21:18:35 +11:00
7733bd5efc PyAPI: avoid scanning all addons on startup
Gives small speedup
2015-01-23 16:38:29 +11:00
783b4cd1ca PyAPI: use set.discard instead of set-subtraction 2015-01-23 16:37:56 +11:00
3e8c0027a3 Cleanup: replace deprecated imp -> importlib 2015-01-23 12:37:58 +11:00
88222fac63 Remove 'addons_extern' was used before git move 2015-01-21 12:56:03 +11:00
a15be34389 Code cleanup: unused python vars & imports
Use frosted rather then pyflakes
2014-04-25 05:36:16 +10:00
1ea47c9af9 Code Cleanup: style, spelling and pep8 edits 2013-11-20 03:40:10 +11:00
f546c7a889 Addons: remove tracker URL from addon template, as this is no longer used,
and link to the new Addons bug reporting page.
2013-11-16 03:15:17 +01:00
58db4b70f3 make the message for addons failing to parse a little more descriptive (suggested in report [#37196]). 2013-10-24 20:17:30 +00:00
Lukas Toenne
771906bc09 Fix for #36387, User Preferences "Addons" panel bogs down the whole interface.
The addons panel draw function calls addon_utils.modules() which in turn retrieves a list of fake modules from the script paths every time. This can become costly when network paths are included for
addons. Solution is to put the scanning process into a dedicated "refresh" function and disable it in frequently called draw and filter functions, i.e. in these cases the cached addons_fake_modules list
will be used instead.

Note that this may lead to invalid addon lists if script paths are changed (which is not working 100% without restart anyway according to Campbell). For this there is now a "Refresh" operator button in
the addons preferences. If necessary and feasible such forced refreshes can be added later too.
2013-08-28 06:36:54 +00:00
ffaebe2237 reduce imports on startup 2013-07-03 01:20:32 +00:00
841c200767 report exceptions when enabling and disabling modules in blenders interface.
so if pressing the addon checkbox fails it tells why rather then failing silently.
2013-06-19 05:17:31 +00:00
5460e31d56 now an addons preference are available when it start,
this change is made so addons may initialize their own settings.
2013-05-27 16:12:06 +00:00
858ff6b696 Fix for [#34898] Typo in error message of mathutils.Vector
* Also fixed some more cases of "more then" -> "more than".
2013-04-07 15:09:06 +00:00
97d62f0183 style cleanup 2013-01-15 23:15:32 +00:00
423994bf39 py api: add restrict state context manager (thats python's context not blenders context),
which restricts bpy.context and bpy.data.

enable this for loading scripts in 'startup' too.
2012-12-20 03:56:22 +00:00
ef665b3d18 dissallow access to the context while addons import and register.
Since the window manager is needed for keymaps this is kept as an exception.

some addons will need updating, but in every case I've seen addons should not be accessing the context while registering.
(bad stuff! - declaring the scene as a global variable - which crashes when the users loads a new file, manipulating the active object or scene... tsk tsk)
2012-12-19 07:27:23 +00:00
b867f9f17e style cleanup: comments & spelling 2012-11-18 01:22:31 +00:00
ee67123748 code cleanup: minor edits on recent commit. 2012-10-13 11:23:04 +00:00
3fa24c7d5f differenciate log message for enabled/disabled modules 2012-10-13 10:31:35 +00:00
844916d46e check addons are enabled before disabling them (would cause python exceptions when removing a disabled addon). 2012-10-10 11:37:38 +00:00
8a51d235e6 pep8 cleanup 2012-09-26 21:19:51 +00:00
dba5ef3ba8 code cleanup: python - pass multiple args to string startswith() / endswith() functions rather than calling multiple times. 2012-09-04 20:26:42 +00:00
28b9576f4b error message when an addon was missing register/unregister functions whasnt very good (didnt point to file with the error) 2012-08-22 10:03:37 +00:00
acb0a50fb3 print warning if a script in the addons dir has no bl_info. 2012-06-28 19:22:13 +00:00
98e6912480 style cleanup 2012-06-19 22:17:19 +00:00
61752c926d Addons: "persistent" parameter for addon_utils.enable(), so that you can enable
addons from a startup script and keep them enabled after loading .blend files.
2012-04-28 09:00:09 +00:00
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
7f08c71f43 cleanup for redefined vars 2012-01-18 06:55:51 +00:00
9c2a58a811 remove api from addon bl_info, was never used. 2012-01-14 13:02:20 +00:00
616bf9bae3 check if an addon exists before getting its mtime 2011-11-26 17:41:56 +00:00
6e28ac2d7b pep8 edits and avoid naming conflicts with python builtins 2011-11-24 19:36:12 +00:00
a03e119db9 also list addons_extern as testing. 2011-11-21 14:19:34 +00:00
e7f52d9953 addons in contrib now have their own 'Testing' category which is off by default. 2011-11-17 20:11:20 +00:00
fda2045150 correct spelling errors in comments 2011-10-17 06:58:07 +00:00
c658b74db5 minor edits to recent fix for addons 2011-09-23 13:47:29 +00:00