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:
Diffstat (limited to 'release/scripts/modules/bpy/utils/previews.py')
-rw-r--r--release/scripts/modules/bpy/utils/previews.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy/utils/previews.py b/release/scripts/modules/bpy/utils/previews.py
index 511df853d66..7402dbb6c0c 100644
--- a/release/scripts/modules/bpy/utils/previews.py
+++ b/release/scripts/modules/bpy/utils/previews.py
@@ -65,6 +65,10 @@ class ImagePreviewCollection(dict):
# Internal notes:
# - Blender's internal 'PreviewImage' struct uses 'self._uuid' prefix.
+ # - Blender's preview.new/load return the data if it exists,
+ # don't do this for the Python API as it allows accidental re-use of names,
+ # anyone who wants to reuse names can use dict.get() to check if it exists.
+ # We could use this for the C API too (would need some investigation).
def __init__(self):
super().__init__()