Would run register() twice causing warning with `register_module()`
which expects new classes to be defined.
Now run unregister() before re-registering.
bpy.path.clean_name() and AddPresetBase.as_filename() were doing
inefficient search-replace of individual characters.
Use cached replacement table instead.
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.
Enum's itemf callback can be called without context in some cases (UI, doc generation...).
Python's enum properties did not handle this at all - it's kind of odd this did not cause
more trouble and wasn't notice earlier... Probably dynamic enums using context are not
much used in py code.
Note about nodes: those are heavy users of dynamic enum with context. Now,
we expect `NodeCategory.poll()` and `NodeItem.poll()` to always be called with
a valid context (since when there is no context available, we can assume `poll()`
is always True). `NodeCategory.items()`, however, must accept NULL context, so if
you use custom `items` callable for your custom node categories, you may need
to update it (as was done here for builtin `node_group_items()`).
- check for class/static methods assumed nonzero args.
- subclass references and set-flag items are now sorted.
- use 'order' for Py operator mix-ins,
so operator settings don't show in random order.
This commit mainly:
* Exposes PreviewImage struct in RNA, including ways for user to set images data.
* Adds a new kind of PreviewImage, using a file path and IMB_thumb to get image.
* Adds a new kind of custom icon using PreviewImage, unrelated to ID previews system.
* Adds a python API (utils.previews) to allow python scripts to access those custom previews/icons.
Note that loading image from files' thumbnails is done when needed (deferred loading), not
when defining the custom preview/icon.
WARNING: for release addons who would want to use this, please keep it to a strict minimum, really needed level.
We do not want our UI to explode under hundreds of different flashy icons!
For more info, see also the release notes of Blender 2.75 (http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.75/Addons)
and the example/templates featured with Blender.
Patch by Campbell (ideasman42), Inês (brita) and Bastien (mont29).
Differential Revision: https://developer.blender.org/D1255
Transformed 'OrientationHelper' class into 'orientation_helper_factory' function,
which returns an OrientationHelper customized class with specified default axes.
loading 'readline' module could crash blender if 'libedit' was already linked (via LLVM).
Workaround the problem for now since we don't even need readline,
a _real_ fix likely involves changing how LLVM or Python are built.
Adds bpy.app.sdl to expose SDL version information.
When SDL is not available on a Linux system, certain Blender features
are silently disabled (like joystick support in the BGE). This change
is the first step towards making it more obvious why something isn't
working.
SDL information is exposed to Python via bpy.app.sdl, in the same way
as OCIO and OIIO information is exposed.
Generated system-info.txt contains SDL loading method (linked or
dynamically loaded by Blender) and SDL version number.
Reviewed by: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D1112
Caused by own rBfb7ff31315a1c9 - not surprising code using Object.matrix_local
in other contexts than mere Object parenting fails, since it was using a broken
implementation before...
Note that whole NLA_OT_Bake op would need some love, it is quite brittle in many aspects.
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.