[Bf-blender-cvs] [be27284b76c] greasepencil-object: Only align to view by default Monkey GP object
Antonioya
noreply at git.blender.org
Tue Jul 31 08:58:04 CEST 2018
Commit: be27284b76c60f89ebeeab1b2344dddcdbb45e21
Author: Antonioya
Date: Tue Jul 31 08:57:55 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBbe27284b76c60f89ebeeab1b2344dddcdbb45e21
Only align to view by default Monkey GP object
The blank grease pencil object must be aligned to axis by default.
===================================================================
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 d8bc9d514c0..87eddc2674c 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1002,10 +1002,12 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
/* Hack: Force view-align to be on by default
* since it's not nice for adding shapes in 2D
- * for them to end up aligned oddly
+ * for them to end up aligned oddly, but only for Monkey
*/
- if (RNA_struct_property_is_set(op->ptr, "view_align") == false)
+ if ((RNA_struct_property_is_set(op->ptr, "view_align") == false) &&
+ (type == GP_MONKEY)) {
RNA_boolean_set(op->ptr, "view_align", true);
+ }
/* Note: We use 'Y' here (not 'Z'), as */
WM_operator_view3d_unit_defaults(C, op);
More information about the Bf-blender-cvs
mailing list