diff options
author | Brecht Van Lommel <brecht> | 2020-03-03 19:21:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-03-03 19:22:30 +0300 |
commit | 19785b96c43f6dc19906f4b39a18a656684826b1 (patch) | |
tree | 72aac82ebd54ffda9cca137d87e3da6bd304d819 /release/scripts/modules/bl_previews_utils/bl_previews_render.py | |
parent | 0c603cffd123689c3021862a9d76dad9fbe13f4d (diff) |
IDs: modify wm.previews_clear operator to make space for new ID types
Use a regular enum, to avoid running out of bits.
Differential Revision: https://developer.blender.org/D7003
Diffstat (limited to 'release/scripts/modules/bl_previews_utils/bl_previews_render.py')
-rw-r--r-- | release/scripts/modules/bl_previews_utils/bl_previews_render.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/release/scripts/modules/bl_previews_utils/bl_previews_render.py b/release/scripts/modules/bl_previews_utils/bl_previews_render.py index 8d1a782bc54..b79c0b744d0 100644 --- a/release/scripts/modules/bl_previews_utils/bl_previews_render.py +++ b/release/scripts/modules/bl_previews_utils/bl_previews_render.py @@ -31,7 +31,6 @@ from mathutils import ( ) -INTERN_PREVIEW_TYPES = {'MATERIAL', 'LIGHT', 'WORLD', 'TEXTURE', 'IMAGE'} OBJECT_TYPES_RENDER = {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'} @@ -315,7 +314,7 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern): do_save = True if do_data_intern: - bpy.ops.wm.previews_clear(id_type=INTERN_PREVIEW_TYPES) + bpy.ops.wm.previews_clear(id_type='SHADING') bpy.ops.wm.previews_ensure() render_contexts = {} @@ -440,7 +439,7 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern): def do_clear_previews(do_objects, do_collections, do_scenes, do_data_intern): if do_data_intern: - bpy.ops.wm.previews_clear(id_type=INTERN_PREVIEW_TYPES) + bpy.ops.wm.previews_clear(id_type='SHADING') if do_objects: for ob in ids_nolib(bpy.data.objects): |