Blender  V2.93
DNA_object_defaults.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #include "DNA_vec_defaults.h"
24 
25 /* Struct members on own line. */
26 /* clang-format off */
27 
28 /* -------------------------------------------------------------------- */
32 #define _DNA_DEFAULT_Object \
33  { \
34  /* Type is not very meaningful as a default, normally changed. */ \
35  .type = OB_EMPTY, \
36  .color = {1, 1, 1, 1}, \
37  \
38  .constinv = _DNA_DEFAULT_UNIT_M4, \
39  .parentinv = _DNA_DEFAULT_UNIT_M4, \
40  .obmat = _DNA_DEFAULT_UNIT_M4, \
41  \
42  .scale = {1, 1, 1}, \
43  .dscale = {1, 1, 1}, \
44  /* Objects should default to having Euler XYZ rotations, \
45  * but rotations default to quaternions. */ \
46  .rotmode = ROT_MODE_EUL, \
47  \
48  .rotAxis = {0, 1, 0}, \
49  .rotAngle = 0, \
50  .drotAxis = {0, 1, 0}, \
51  .drotAngle = 0, \
52  .quat = _DNA_DEFAULT_UNIT_QT, \
53  .dquat = _DNA_DEFAULT_UNIT_QT, \
54  .protectflag = OB_LOCK_ROT4D, \
55  \
56  .dt = OB_TEXTURE, \
57  \
58  .empty_drawtype = OB_PLAINAXES, \
59  .empty_drawsize = 1.0, \
60  .empty_image_depth = OB_EMPTY_IMAGE_DEPTH_DEFAULT, \
61  .ima_ofs = {-0.5, -0.5}, \
62  \
63  .instance_faces_scale = 1, \
64  .col_group = 0x01, \
65  .col_mask = 0xffff, \
66  .preview = NULL, \
67  .duplicator_visibility_flag = OB_DUPLI_FLAG_VIEWPORT | OB_DUPLI_FLAG_RENDER, \
68  .pc_ids = {NULL, NULL}, \
69  .lineart = { .crease_threshold = DEG2RAD(140.0f) }, \
70  }
71 
74 /* clang-format on */