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:
authorJulian Eisel <julian@blender.org>2021-11-22 23:26:39 +0300
committerJulian Eisel <julian@blender.org>2021-11-22 23:26:39 +0300
commit456d5e14b841c5feb2a3e145a3d6ab12925c630b (patch)
tree9b5ce8f60f53275153bf8653d4c3d2c6dd35b7a0 /source/blender/blenkernel/intern/icons.cc
parent48c2b4012f788b25b3e1ac90f8626560a24987e6 (diff)
parent481f032f5cbe2cd3c36c9ef516670fd9e06db25f (diff)
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender/blenkernel/intern/icons.cc')
-rw-r--r--source/blender/blenkernel/intern/icons.cc32
1 files changed, 12 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc
index ffc39028400..c2250dd04f9 100644
--- a/source/blender/blenkernel/intern/icons.cc
+++ b/source/blender/blenkernel/intern/icons.cc
@@ -360,31 +360,23 @@ void BKE_previewimg_id_copy(ID *new_id, const ID *old_id)
PreviewImage **BKE_previewimg_id_get_p(const ID *id)
{
switch (GS(id->name)) {
- case ID_OB: {
- Object *ob = (Object *)id;
- /* Currently, only object types with real geometry can be rendered as preview. */
- if (!OB_TYPE_IS_GEOMETRY(ob->type)) {
- return nullptr;
- }
- return &ob->preview;
- }
-
#define ID_PRV_CASE(id_code, id_struct) \
case id_code: { \
return &((id_struct *)id)->preview; \
} \
((void)0)
- ID_PRV_CASE(ID_MA, Material);
- ID_PRV_CASE(ID_TE, Tex);
- ID_PRV_CASE(ID_WO, World);
- ID_PRV_CASE(ID_LA, Light);
- ID_PRV_CASE(ID_IM, Image);
- ID_PRV_CASE(ID_BR, Brush);
- ID_PRV_CASE(ID_GR, Collection);
- ID_PRV_CASE(ID_SCE, Scene);
- ID_PRV_CASE(ID_SCR, bScreen);
- ID_PRV_CASE(ID_AC, bAction);
- ID_PRV_CASE(ID_NT, bNodeTree);
+ ID_PRV_CASE(ID_OB, Object);
+ ID_PRV_CASE(ID_MA, Material);
+ ID_PRV_CASE(ID_TE, Tex);
+ ID_PRV_CASE(ID_WO, World);
+ ID_PRV_CASE(ID_LA, Light);
+ ID_PRV_CASE(ID_IM, Image);
+ ID_PRV_CASE(ID_BR, Brush);
+ ID_PRV_CASE(ID_GR, Collection);
+ ID_PRV_CASE(ID_SCE, Scene);
+ ID_PRV_CASE(ID_SCR, bScreen);
+ ID_PRV_CASE(ID_AC, bAction);
+ ID_PRV_CASE(ID_NT, bNodeTree);
#undef ID_PRV_CASE
default:
break;