diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-11 21:34:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-11 21:58:09 +0300 |
commit | 9a076dd95a01135ea50f9ccc675668db9f2155f4 (patch) | |
tree | a26c4ef274e5fbf469844009e9065e6c6e94ca8c /source/blender/blenkernel/intern/lightprobe.c | |
parent | 2f08a25d8300bc18b588d18bfa8099ead52ff5bb (diff) |
DNA: defaults for ID types
Diffstat (limited to 'source/blender/blenkernel/intern/lightprobe.c')
-rw-r--r-- | source/blender/blenkernel/intern/lightprobe.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/lightprobe.c b/source/blender/blenkernel/intern/lightprobe.c index 1c2f8d22f3e..06f1ee5050b 100644 --- a/source/blender/blenkernel/intern/lightprobe.c +++ b/source/blender/blenkernel/intern/lightprobe.c @@ -21,8 +21,11 @@ * \ingroup bke */ +#include <string.h> + #include "DNA_object_types.h" #include "DNA_lightprobe_types.h" +#include "DNA_defaults.h" #include "BLI_utildefines.h" @@ -35,17 +38,7 @@ void BKE_lightprobe_init(LightProbe *probe) { BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(probe, id)); - probe->grid_resolution_x = probe->grid_resolution_y = probe->grid_resolution_z = 4; - probe->distinf = 2.5f; - probe->distpar = 2.5f; - probe->falloff = 0.2f; - probe->clipsta = 0.8f; - probe->clipend = 40.0f; - probe->vis_bias = 1.0f; - probe->vis_blur = 0.2f; - probe->intensity = 1.0f; - - probe->flag = LIGHTPROBE_FLAG_SHOW_INFLUENCE; + MEMCPY_STRUCT_AFTER(probe, DNA_struct_default_get(LightProbe), id); } void *BKE_lightprobe_add(Main *bmain, const char *name) |