[Bf-blender-cvs] [ba7656ad251] master: GPencil: Set Viewport color to black by default

Antonioya noreply at git.blender.org
Sat Mar 2 14:28:54 CET 2019


Commit: ba7656ad251b838005f70dea2d3bb39f97fb39a2
Author: Antonioya
Date:   Sat Mar 2 14:13:04 2019 +0100
Branches: master
https://developer.blender.org/rBba7656ad251b838005f70dea2d3bb39f97fb39a2

GPencil: Set Viewport color to black by default

As the 2D viewport color is white, if the object default color is white, when wireframe is enabled the object is invisible.

Now, the grease pencil object default viewport color is black.

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

M	source/blender/editors/object/object_add.c

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

diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index b69c88ecb7f..23fc8109043 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1066,6 +1066,9 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
 
 	/* if this is a new object, initialise default stuff (colors, etc.) */
 	if (newob) {
+		/* set default viewport color to black */
+		copy_v3_fl(ob->color, 0.0f);
+
 		ED_gpencil_add_defaults(C, ob);
 	}



More information about the Bf-blender-cvs mailing list