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/linestyle.c
parent2f08a25d8300bc18b588d18bfa8099ead52ff5bb (diff)
DNA: defaults for ID types
Diffstat (limited to 'source/blender/blenkernel/intern/linestyle.c')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index e5fa5ff08b0..3436bd7a978 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -30,6 +30,7 @@
#include "DNA_object_types.h"
#include "DNA_material_types.h" /* for ramp blend */
#include "DNA_texture_types.h"
+#include "DNA_defaults.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
@@ -76,34 +77,9 @@ void BKE_linestyle_init(FreestyleLineStyle *linestyle)
{
BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(linestyle, id));
- linestyle->panel = LS_PANEL_STROKES;
- linestyle->r = linestyle->g = linestyle->b = 0.0f;
- linestyle->alpha = 1.0f;
- linestyle->thickness = 3.0f;
- linestyle->thickness_position = LS_THICKNESS_CENTER;
- linestyle->thickness_ratio = 0.5f;
- linestyle->flag = LS_SAME_OBJECT | LS_NO_SORTING | LS_TEXTURE;
- linestyle->chaining = LS_CHAINING_PLAIN;
- linestyle->rounds = 3;
- linestyle->min_angle = DEG2RADF(0.0f);
- linestyle->max_angle = DEG2RADF(0.0f);
- linestyle->min_length = 0.0f;
- linestyle->max_length = 10000.0f;
- linestyle->split_length = 100;
- linestyle->chain_count = 10;
- linestyle->sort_key = LS_SORT_KEY_DISTANCE_FROM_CAMERA;
- linestyle->integration_type = LS_INTEGRATION_MEAN;
- linestyle->texstep = 1.0f;
- linestyle->pr_texture = TEX_PR_TEXTURE;
-
- BLI_listbase_clear(&linestyle->color_modifiers);
- BLI_listbase_clear(&linestyle->alpha_modifiers);
- BLI_listbase_clear(&linestyle->thickness_modifiers);
- BLI_listbase_clear(&linestyle->geometry_modifiers);
+ MEMCPY_STRUCT_AFTER(linestyle, DNA_struct_default_get(FreestyleLineStyle), id);
BKE_linestyle_geometry_modifier_add(linestyle, NULL, LS_MODIFIER_SAMPLING);
-
- linestyle->caps = LS_CAPS_BUTT;
}
FreestyleLineStyle *BKE_linestyle_new(struct Main *bmain, const char *name)