Commit Graph

32 Commits

Author SHA1 Message Date
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
f7c8ea702f * Some more fixes for recent move operator commit. 2011-09-23 13:29:28 +00:00
38280ba38e fix [#28172] Cannot restore Add-ons tab in user preferences after a failed attempt to install an add-on.
non utf8 addons would make the addon UI vanish, now give a message in the console and UI.
2011-08-07 04:55:58 +00:00
f4293067c1 py api: sphinx doc corrections, pep8 cleanup and style edits, also added __all__ to some modules which were missing it. 2011-07-31 03:15:37 +00:00
2658949752 pep8 cleanup, also print message when attempting to run in animation player mode. 2011-07-29 01:24:03 +00:00
8dd72c476e fix [#28005] Python Add-Ons are constantly reloaded if twice in the path
Addons are checked for their timestamps and reloaded when it changes but this failed when, 2 addons had the same name since different times caused 2 reloads on every redraw.

Now when duplicate addons are in the path now give a error message in the UI and print path conflict in the console and don't thrash reloading.
2011-07-18 05:41:46 +00:00
b62a956cc8 cleanup for python scripts - unused vars and imports 2011-07-10 12:51:37 +00:00
c8652b301f pep8 checker, mostly pedantic style changes but also found an error in mesh_utils.mesh_linked_faces() 2011-04-01 02:41:15 +00:00
3598882f0e Proper traceback when addons fails AST parsing setp 2011-03-27 20:52:50 +00:00
b25db7c8cb pep8 cleanup 2011-02-25 16:06:14 +00:00
2fd60d9719 error in own recent moving addons functions into its own module. addon_utils.reset_all failed. 2011-02-22 22:24:50 +00:00
eee4a62e87 move addon utilities into their own module, these were getting mixed between bpy.utils and space_userpref. 2011-02-21 07:07:44 +00:00