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-10-25 14:30:44 +0300
committerJulian Eisel <julian@blender.org>2021-10-25 14:33:16 +0300
commite7bea3fb6ed00f5eb9e332d1d5162097e865a1c0 (patch)
tree930a0476914435eaee873b8a37768e7c61a86dc9 /source/blender/makesdna/DNA_object_types.h
parent60e2103507b2d89a64771e969294272dd23b83e6 (diff)
Assets/IDs: Don't generate previews for object types with no real geometry
Object types like empties, cameras or lamps will just end up as empty preview images. We can think about ways to visualize them still, but meanwhile, don't create such an empty preview. Differential Revision: https://developer.blender.org/D10334 Reviewed by: Bastien Montagne, Sybren Stüvel
Diffstat (limited to 'source/blender/makesdna/DNA_object_types.h')
-rw-r--r--source/blender/makesdna/DNA_object_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 5a88ce7c9f5..e94541fdc7f 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -501,6 +501,9 @@ enum {
/* check if the object type supports materials */
#define OB_TYPE_SUPPORT_MATERIAL(_type) \
(((_type) >= OB_MESH && (_type) <= OB_MBALL) || ((_type) >= OB_GPENCIL && (_type) <= OB_VOLUME))
+/** Does the object have some render-able geometry (unlike empties, cameras, etc.). */
+#define OB_TYPE_IS_GEOMETRY(_type) \
+ (ELEM(_type, OB_MESH, OB_SURF, OB_FONT, OB_MBALL, OB_GPENCIL, OB_HAIR, OB_POINTCLOUD, OB_VOLUME))
#define OB_TYPE_SUPPORT_VGROUP(_type) (ELEM(_type, OB_MESH, OB_LATTICE, OB_GPENCIL))
#define OB_TYPE_SUPPORT_EDITMODE(_type) \
(ELEM(_type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE))