diff options
author | Antonioya <blendergit@gmail.com> | 2018-10-11 19:25:45 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-10-11 19:30:10 +0300 |
commit | 18f117594004e51f95f345d1a95bd8f54cd5bd11 (patch) | |
tree | 5a2731865652feab26de5ce39acaeaff7ae3b040 /source/blender | |
parent | d12b3767f81d62a802411a42037d580a98923349 (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 5 |
2 files changed, 8 insertions, 2 deletions
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); |