Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-09-20 12:32:59 +0300
committerAntonioya <blendergit@gmail.com>2018-09-20 12:56:59 +0300
commit67a6cb665ec9460c4401a4fc450f18a28556d982 (patch)
treeecb7c84925bf7722122c444818e8f36ef5d2ec2f /source/blender/makesrna/intern
parent12788906113c4f2b304b368001bd2ef68c4dc6b8 (diff)
GP: New select mode
Now it's possible select points or strokes
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index aa103fccc53..166f0b4dd0f 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2156,6 +2156,12 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
+ static const EnumPropertyItem gpencil_selectmode_items[] = {
+ {GP_SELECTMODE_POINT, "POINT", ICON_VERTEXSEL, "Point", "Select only points"},
+ {GP_SELECTMODE_STROKE, "STROKE", ICON_EDGESEL, "Stroke", "Select all stroke points" },
+ {0, NULL, 0, NULL, NULL}
+ };
+
static const EnumPropertyItem annotation_stroke_placement_items[] = {
{GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Draw stroke at 3D cursor location" },
{0, "VIEW", ICON_VISIBLE_IPO_ON, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */
@@ -2457,6 +2463,13 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
+ /* Grease Pencil - Select mode */
+ prop = RNA_def_property(srna, "gpencil_selectmode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "gpencil_selectmode");
+ RNA_def_property_enum_items(prop, gpencil_selectmode_items);
+ RNA_def_property_ui_text(prop, "Select Mode", "");
+ RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
+
/* Annotations - 2D Views Stroke Placement */
prop = RNA_def_property(srna, "annotation_stroke_placement_view2d", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v2d_align");