Commit Graph

4 Commits

Author SHA1 Message Date
Campbell Barton
f6dc0e918b Minor tweaks to preview templates 2015-05-12 18:29:06 +10:00
Campbell Barton
f727df6076 Doc: correct rst syntax
also remove some API docs from example
2015-05-12 18:23:29 +10:00
Campbell Barton
311f6cac92 Doc: replace addons -> scripts in docstring
Theres nothing add-on specific here.
2015-05-12 18:23:29 +10:00
Bastien Montagne
d30f664c04 Expose PreviewImage & custom icons to py API.
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
2015-05-11 16:37:15 +02:00