Files
test2/source/blender/makesdna/DNA_material_defaults.h
Bastien Montagne 7ff1d5d9e4 Fix #82514: Default Value for Viewport Display Color's Alpha Wrong.
For now duplicate default diffuse color values into RNA code too. Sad
work-around, but fixes the problem, until we get rid of hacks like
'interpret 4 consecutive floats in DNA as an array of 4 floats in RNA'.
2024-08-27 13:25:14 +02:00

45 lines
810 B
C

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup DNA
*/
#pragma once
/* clang-format off */
/* -------------------------------------------------------------------- */
/** \name Material Struct
* \{ */
/* Keep RGBA diffuse defaults in sync with #rna_def_material_display in rna_material.cc */
#define _DNA_DEFAULT_Material \
{ \
.r = 0.8, \
.g = 0.8, \
.b = 0.8, \
.specr = 1.0, \
.specg = 1.0, \
.specb = 1.0, \
.a = 1.0f, \
.spec = 0.5, \
\
.roughness = 0.4f, \
\
.pr_type = MA_SPHERE, \
\
.alpha_threshold = 0.5f, \
\
.blend_shadow = MA_BS_SOLID, \
\
.blend_flag = MA_BL_TRANSPARENT_SHADOW,\
\
.lineart.mat_occlusion = 1, \
}
/** \} */
/* clang-format on */