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

DNA_ID_enums.h « makesdna « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5999af8bf5c5cf1b5967b990e27baf0a57032b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* SPDX-License-Identifier: GPL-2.0-or-later */

/** \file
 * \ingroup DNA
 * \brief Enumerations for `DNA_ID.h`.
 */

#pragma once

#ifdef __cplusplus
extern "C" {
#endif

enum eIconSizes {
  ICON_SIZE_ICON = 0,
  ICON_SIZE_PREVIEW = 1,

  NUM_ICON_SIZES,
};

/**
 * Defines for working with IDs.
 *
 * The tags represent types! This is a dirty way of enabling RTTI. The
 * sig_byte end endian defines aren't really used much.
 */

#ifdef __BIG_ENDIAN__
/* big endian */
#  define MAKE_ID2(c, d) ((c) << 8 | (d))
#else
/* little endian */
#  define MAKE_ID2(c, d) ((d) << 8 | (c))
#endif

/**
 * ID from database.
 *
 * Written to #BHead.code (for file IO)
 * and the first 2 bytes of #ID.name (for runtime checks, see #GS macro).
 *
 * Update #ID_TYPE_IS_DEPRECATED() when deprecating types.
 */
typedef enum ID_Type {
  ID_SCE = MAKE_ID2('S', 'C'),       /* Scene */
  ID_LI = MAKE_ID2('L', 'I'),        /* Library */
  ID_OB = MAKE_ID2('O', 'B'),        /* Object */
  ID_ME = MAKE_ID2('M', 'E'),        /* Mesh */
  ID_CU_LEGACY = MAKE_ID2('C', 'U'), /* Curve. ID_CV should be used in the future (see T95355). */
  ID_MB = MAKE_ID2('M', 'B'),        /* MetaBall */
  ID_MA = MAKE_ID2('M', 'A'),        /* Material */
  ID_TE = MAKE_ID2('T', 'E'),        /* Tex (Texture) */
  ID_IM = MAKE_ID2('I', 'M'),        /* Image */
  ID_LT = MAKE_ID2('L', 'T'),        /* Lattice */
  ID_LA = MAKE_ID2('L', 'A'),        /* Light */
  ID_CA = MAKE_ID2('C', 'A'),        /* Camera */
  ID_IP = MAKE_ID2('I', 'P'),        /* Ipo (depreciated, replaced by FCurves) */
  ID_KE = MAKE_ID2('K', 'E'),        /* Key (shape key) */
  ID_WO = MAKE_ID2('W', 'O'),        /* World */
  ID_SCR = MAKE_ID2('S', 'R'),       /* Screen */
  ID_VF = MAKE_ID2('V', 'F'),        /* VFont (Vector Font) */
  ID_TXT = MAKE_ID2('T', 'X'),       /* Text */
  ID_SPK = MAKE_ID2('S', 'K'),       /* Speaker */
  ID_SO = MAKE_ID2('S', 'O'),        /* Sound */
  ID_GR = MAKE_ID2('G', 'R'),        /* Collection */
  ID_AR = MAKE_ID2('A', 'R'),        /* bArmature */
  ID_AC = MAKE_ID2('A', 'C'),        /* bAction */
  ID_NT = MAKE_ID2('N', 'T'),        /* bNodeTree */
  ID_BR = MAKE_ID2('B', 'R'),        /* Brush */
  ID_PA = MAKE_ID2('P', 'A'),        /* ParticleSettings */
  ID_GD = MAKE_ID2('G', 'D'),        /* bGPdata, (Grease Pencil) */
  ID_WM = MAKE_ID2('W', 'M'),        /* WindowManager */
  ID_MC = MAKE_ID2('M', 'C'),        /* MovieClip */
  ID_MSK = MAKE_ID2('M', 'S'),       /* Mask */
  ID_LS = MAKE_ID2('L', 'S'),        /* FreestyleLineStyle */
  ID_PAL = MAKE_ID2('P', 'L'),       /* Palette */
  ID_PC = MAKE_ID2('P', 'C'),        /* PaintCurve */
  ID_CF = MAKE_ID2('C', 'F'),        /* CacheFile */
  ID_WS = MAKE_ID2('W', 'S'),        /* WorkSpace */
  ID_LP = MAKE_ID2('L', 'P'),        /* LightProbe */
  ID_CV = MAKE_ID2('C', 'V'),        /* Curves */
  ID_PT = MAKE_ID2('P', 'T'),        /* PointCloud */
  ID_VO = MAKE_ID2('V', 'O'),        /* Volume */
  ID_SIM = MAKE_ID2('S', 'I'),       /* Simulation (geometry node groups) */
} ID_Type;

/* Only used as 'placeholder' in .blend files for directly linked data-blocks. */
#define ID_LINK_PLACEHOLDER MAKE_ID2('I', 'D') /* (internal use only) */

/* Deprecated. */
#define ID_SCRN MAKE_ID2('S', 'N')

/* NOTE: Fake IDs, needed for `g.sipo->blocktype` or outliner. */
#define ID_SEQ MAKE_ID2('S', 'Q')
/* constraint */
#define ID_CO MAKE_ID2('C', 'O')
/* pose (action channel, used to be ID_AC in code, so we keep code for backwards compatible). */
#define ID_PO MAKE_ID2('A', 'C')
/* used in outliner... */
#define ID_NLA MAKE_ID2('N', 'L')
/* fluidsim Ipo */
#define ID_FLUIDSIM MAKE_ID2('F', 'S')

#ifdef __cplusplus
}
#endif