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:
authorCampbell Barton <ideasman42@gmail.com>2019-09-11 21:34:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-11 21:58:09 +0300
commit9a076dd95a01135ea50f9ccc675668db9f2155f4 (patch)
treea26c4ef274e5fbf469844009e9065e6c6e94ca8c /source/blender/blenkernel/intern/light.c
parent2f08a25d8300bc18b588d18bfa8099ead52ff5bb (diff)
DNA: defaults for ID types
Diffstat (limited to 'source/blender/blenkernel/intern/light.c')
-rw-r--r--source/blender/blenkernel/intern/light.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/source/blender/blenkernel/intern/light.c b/source/blender/blenkernel/intern/light.c
index 07ec8d70af1..05fcba5c30d 100644
--- a/source/blender/blenkernel/intern/light.c
+++ b/source/blender/blenkernel/intern/light.c
@@ -32,6 +32,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
+#include "DNA_defaults.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
@@ -48,40 +49,9 @@ void BKE_light_init(Light *la)
{
BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(la, id));
- la->r = la->g = la->b = la->k = 1.0f;
- la->energy = 10.0f;
- la->dist = 25.0f;
- la->spotsize = DEG2RADF(45.0f);
- la->spotblend = 0.15f;
- la->att2 = 1.0f;
- la->mode = LA_SHADOW;
- la->bufsize = 512;
- la->clipsta = 0.05f;
- la->clipend = 40.0f;
- la->bleedexp = 2.5f;
- la->samp = 3;
- la->bias = 1.0f;
- la->soft = 3.0f;
- la->area_size = la->area_sizey = la->area_sizez = 0.25f;
- la->buffers = 1;
- la->preview = NULL;
- la->falloff_type = LA_FALLOFF_INVSQUARE;
- la->coeff_const = 1.0f;
- la->coeff_lin = 0.0f;
- la->coeff_quad = 0.0f;
- la->curfalloff = BKE_curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f);
- la->cascade_max_dist = 200.0f;
- la->cascade_count = 4;
- la->cascade_exponent = 0.8f;
- la->cascade_fade = 0.1f;
- la->contact_dist = 0.2f;
- la->contact_bias = 0.03f;
- la->contact_spread = 0.2f;
- la->contact_thickness = 0.2f;
- la->spec_fac = 1.0f;
- la->att_dist = 40.0f;
- la->sun_angle = DEG2RADF(0.526f);
+ MEMCPY_STRUCT_AFTER(la, DNA_struct_default_get(Light), id);
+ la->curfalloff = BKE_curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f);
BKE_curvemapping_initialize(la->curfalloff);
}