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:
authorAntonio Vazquez <blendergit@gmail.com>2020-04-27 11:49:33 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-04-27 11:49:33 +0300
commit7300e8a9fe8f82204ffa30e496578ccc04ff7891 (patch)
treef59320cb71bccce41beca7f0f616becc9d7220bb /source/blender/blenloader
parentbb1e794d5800b450b53161e9cd9a682c2d6816b1 (diff)
GPencil: Change defaults for Gradient materials
The old values did not display a valid gradient by default.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 19606b92479..8343895c8dd 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -433,10 +433,21 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
}
ma->gp_style->mode = GP_MATERIAL_MODE_SQUARE;
+ /* Change Solid Stroke settings. */
+ ma = BLI_findstring(&bmain->materials, "Solid Stroke", offsetof(ID, name) + 2);
+ if (ma != NULL) {
+ ma->gp_style->mix_rgba[3] = 1.0f;
+ ma->gp_style->texture_offset[0] = -0.5f;
+ ma->gp_style->mix_factor = 0.5f;
+ }
+
/* Change Solid Fill settings. */
ma = BLI_findstring(&bmain->materials, "Solid Fill", offsetof(ID, name) + 2);
if (ma != NULL) {
ma->gp_style->flag &= ~GP_MATERIAL_STROKE_SHOW;
+ ma->gp_style->mix_rgba[3] = 1.0f;
+ ma->gp_style->texture_offset[0] = -0.5f;
+ ma->gp_style->mix_factor = 0.5f;
}
Object *ob = BLI_findstring(&bmain->objects, "Stroke", offsetof(ID, name) + 2);