diff options
author | Antonioya <blendergit@gmail.com> | 2016-10-22 17:44:11 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2016-10-22 17:44:39 +0300 |
commit | 5765deecd42eedda780b88ed7448e4b1c185d0d8 (patch) | |
tree | 1a3f2123f4b8c94d6d30ab1ad314d7e400333d80 /source/blender/makesrna/intern | |
parent | 9d0ac94d52268ff34ce645035d4315d6018d02b9 (diff) |
GPencil: New option to lock strokes to axis
Now, the strokes can be locked to a plane set in the cursor location.
This option allow the artist to rotate the view and draw keeping the
strokes flat over the surface. This option is similar to surface option
but doesn't need a object.
The option is only valid for 3D view and strokes in CURSOR mode.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 7e1d0164eb4..e169ef0d822 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -75,6 +75,14 @@ EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[] = { { 0, NULL, 0, NULL, NULL } }; +EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = { + { GP_LOCKAXIS_NONE, "GP_LOCKAXIS_NONE", 0, "None", "" }, + { GP_LOCKAXIS_X, "GP_LOCKAXIS_X", 0, "X", "Project strokes to plane locked to X" }, + { GP_LOCKAXIS_Y, "GP_LOCKAXIS_Y", 0, "Y", "Project strokes to plane locked to Y" }, + { GP_LOCKAXIS_Z, "GP_LOCKAXIS_Z", 0, "Z", "Project strokes to plane locked to Z" }, + { 0, NULL, 0, NULL, NULL } +}; + EnumPropertyItem rna_enum_symmetrize_direction_items[] = { {BMO_SYMMETRIZE_NEGATIVE_X, "NEGATIVE_X", 0, "-X to +X", ""}, {BMO_SYMMETRIZE_POSITIVE_X, "POSITIVE_X", 0, "+X to -X", ""}, @@ -1053,6 +1061,13 @@ static void rna_def_gpencil_sculpt(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Alpha", "Alpha value for selected vertices"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_GPencil_update"); + /* lock axis */ + prop = RNA_def_property(srna, "lockaxis", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "lock_axis"); + RNA_def_property_enum_items(prop, rna_enum_gpencil_lockaxis_items); + RNA_def_property_ui_text(prop, "Lock", ""); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + /* brush */ srna = RNA_def_struct(brna, "GPencilSculptBrush", NULL); RNA_def_struct_sdna(srna, "GP_EditBrush_Data"); |