Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-01-12 16:44:54 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-01-12 17:13:46 +0300
commit3027ff8b13fb29e9249382ef400331783b2e06f6 (patch)
tree9be96ddc513ccd325dc6463c5f3ec828ff0490be /release/scripts/startup/bl_ui/space_info.py
parent51779d9407a307475c72f0df7ec012fea8ab1d76 (diff)
Second try to fix missing previews of mat/tex/etc. in .blend files.
This time, it's a dedicated operator user has to run before saving the file. And it recursively check all IDs linked from each scene, therefore rendering materials etc. previews using a scene they are used in. Note the renderengine issue is not completely addressed this way (existing code for icon previews seems to ignore completely other engines, and IDs not linked anywhere (fake-user ones) will be rendered with current scene's engine as fallback, also you can get a material linked to an hidden object in a scene, etc.). Reviewers: sergey, campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D980
Diffstat (limited to 'release/scripts/startup/bl_ui/space_info.py')
-rw-r--r--release/scripts/startup/bl_ui/space_info.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 2b075128fef..b642b61fcdc 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -132,6 +132,7 @@ class INFO_MT_file(Menu):
layout.operator_context = 'INVOKE_AREA'
layout.operator("wm.link", text="Link", icon='LINK_BLEND')
layout.operator("wm.append", text="Append", icon='APPEND_BLEND')
+ layout.menu("INFO_MT_file_previews")
layout.separator()
@@ -195,6 +196,15 @@ class INFO_MT_file_external_data(Menu):
layout.operator("file.find_missing_files")
+class INFO_MT_file_previews(Menu):
+ bl_label = "Data Previews"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("wm.previews_ensure")
+
+
class INFO_MT_game(Menu):
bl_label = "Game"