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-03-13 15:05:24 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-03-13 15:06:02 +0300
commit4326d162ba8cdefd2a216d03abd4fe0509485f86 (patch)
treedb4da00a83221cb4d47734ec9ce8975b535624b9 /source/blender/blenloader/intern/versioning_defaults.c
parent9075ec8269e7cb029f4fab6c1289eb2f1ae2858a (diff)
GPencil: Enable Lights ON to default object in 2D template
Diffstat (limited to 'source/blender/blenloader/intern/versioning_defaults.c')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index f0127330b1b..53c63ef980b 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -627,7 +627,7 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
BKE_id_delete(bmain, brush);
}
- /* Rename and fix materials. */
+ /* Rename and fix materials and enable default object lights on. */
if (app_template && STREQ(app_template, "2D_Animation")) {
Material *ma = NULL;
rename_id_for_versioning(bmain, ID_MA, "Black", "Solid Stroke");
@@ -654,6 +654,11 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
if (ma != NULL) {
ma->gp_style->flag &= ~GP_MATERIAL_STROKE_SHOW;
}
+
+ Object *ob = BLI_findstring(&bmain->objects, "Stroke", offsetof(ID, name) + 2);
+ if (ob && ob->type == OB_GPENCIL) {
+ ob->dtx |= OB_USE_GPENCIL_LIGHTS;
+ }
}
/* Reset all grease pencil brushes. */