[Bf-blender-cvs] [f2fdfbb735f] greasepencil-object: Change default annotation onion colors

Antonioya noreply at git.blender.org
Wed Nov 28 18:08:26 CET 2018


Commit: f2fdfbb735fa73c6afcc27fa61f75f9478d327ce
Author: Antonioya
Date:   Wed Nov 28 18:08:18 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBf2fdfbb735fa73c6afcc27fa61f75f9478d327ce

Change default annotation onion colors

===================================================================

M	source/blender/blenkernel/intern/gpencil.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/makesrna/intern/rna_gpencil.c

===================================================================

diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 778d93f0a31..e694c12e543 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -374,8 +374,8 @@ bGPDlayer *BKE_gpencil_layer_addnew(bGPdata *gpd, const char *name, bool setacti
 		gpl->thickness = 3;
 
 		/* Onion colors */
-		ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.145f, 0.420f, 0.137f);
-		ARRAY_SET_ITEMS(gpl->gcolor_next, 0.125f, 0.082f, 0.529f);
+		ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.302f, 0.851f, 0.302f);
+		ARRAY_SET_ITEMS(gpl->gcolor_next, 0.250f, 0.1f, 1.0f);
 	}
 	else {
 		/* thickness parameter represents "thickness change", not absolute thickness */
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index ae7f26f1bcf..5d1d4a9ad2f 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2468,8 +2468,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 		if (!DNA_struct_elem_find(fd->filesdna, "bGPDlayer", "int", "gstep")) {
 			for (bGPdata *gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next) {
 				for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
-					ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.145f, 0.420f, 0.137f);
-					ARRAY_SET_ITEMS(gpl->gcolor_next, 0.125f, 0.082f, 0.529f);
+					ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.302f, 0.851f, 0.302f);
+					ARRAY_SET_ITEMS(gpl->gcolor_next, 0.250f, 0.1f, 1.0f);
 				}
 			}
 		}
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index fd873f99775..4874807e28d 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1076,6 +1076,8 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
 	PropertyRNA *prop;
 
 	FunctionRNA *func;
+	static const float default_onion_color_b[] = { 0.302f, 0.851f, 0.302f };
+	static const float default_onion_color_a[] = { 0.250f, 0.1f, 1.0f };
 
 	srna = RNA_def_struct(brna, "GPencilLayer", NULL);
 	RNA_def_struct_sdna(srna, "bGPDlayer");
@@ -1176,6 +1178,7 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
 	RNA_def_property_float_sdna(prop, NULL, "gcolor_prev");
 	RNA_def_property_array(prop, 3);
 	RNA_def_property_range(prop, 0.0f, 1.0f);
+	RNA_def_property_float_array_default(prop, default_onion_color_b);
 	RNA_def_property_ui_text(prop, "Before Color", "Base color for ghosts before the active frame");
 	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
 
@@ -1183,6 +1186,7 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
 	RNA_def_property_float_sdna(prop, NULL, "gcolor_next");
 	RNA_def_property_array(prop, 3);
 	RNA_def_property_range(prop, 0.0f, 1.0f);
+	RNA_def_property_float_array_default(prop, default_onion_color_a);
 	RNA_def_property_ui_text(prop, "After Color", "Base color for ghosts after the active frame");
 	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");



More information about the Bf-blender-cvs mailing list