[Bf-blender-cvs] [18f11759400] blender2.8: GP: Add new Userprefs parameter to reverse layer list
Antonioya
noreply at git.blender.org
Thu Oct 11 18:30:40 CEST 2018
Commit: 18f117594004e51f95f345d1a95bd8f54cd5bd11
Author: Antonioya
Date: Thu Oct 11 18:25:45 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB18f117594004e51f95f345d1a95bd8f54cd5bd11
GP: Add new Userprefs parameter to reverse layer list
This allows to configure the system as any other 2D software with the layers in a Top/Down order.
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
M source/blender/makesdna/DNA_userdef_types.h
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index d4cce81ea86..423f6df9249 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -279,7 +279,7 @@ class USERPREF_PT_edit(Panel):
col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
col.separator()
col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
- col.separator()
+ col.prop(edit, "use_grease_pencil_reverse_layers", text="Layers order Top-Down")
col.separator()
col.separator()
col.separator()
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 7c28ff9301f..a18ed19a306 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -883,8 +883,9 @@ typedef enum eText_Draw_Options {
/* Grease Pencil Settings.
* UserDef.gp_settings */
typedef enum eGP_UserdefSettings {
- GP_PAINT_DOSMOOTH = (1 << 0),
- GP_PAINT_DOSIMPLIFY = (1 << 1),
+ GP_PAINT_DOSMOOTH = (1 << 0),
+ GP_PAINT_DOSIMPLIFY = (1 << 1),
+ GP_PAINT_REVERSE_LAYERS = (1 << 2),
} eGP_UserdefSettings;
enum {
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 8f3d3342f43..ad0d5cee797 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3994,6 +3994,11 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke");
+ prop = RNA_def_property(srna, "use_grease_pencil_reverse_layers", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_REVERSE_LAYERS);
+ RNA_def_property_ui_text(prop, "Layers list Top-Down",
+ "Order the grease pencil list of layers from Top to Down (require restart)");
+
prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
RNA_def_property_range(prop, 1, 500);
More information about the Bf-blender-cvs
mailing list