diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-05-26 11:37:47 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-05-26 11:37:47 +0300 |
commit | 49f59092e7c8c652df015bdfd27bae2480e51d01 (patch) | |
tree | 7360626291190beb7537370efc7a9a7d5af7203f /source/blender/makesrna | |
parent | 495a98d623648ca787ddb2c0dbaa08fe313f1adf (diff) |
Curves: Implement Handles for selected points only
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves.
I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel..
Reviewed By: fclem, #user_interface, billreynish, Severin
Differential Revision: https://developer.blender.org/D7754
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 5f1ff0d8745..a52811a9a9a 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -121,7 +121,7 @@ static const EnumPropertyItem rna_enum_layer_blend_modes_items[] = { {eGplBlendMode_Divide, "DIVIDE", 0, "Divide", ""}, {0, NULL, 0, NULL, NULL}}; -static EnumPropertyItem rna_enum_gpencil_caps_modes_items[] = { +static const EnumPropertyItem rna_enum_gpencil_caps_modes_items[] = { {GP_STROKE_CAP_ROUND, "ROUND", 0, "Rounded", ""}, {GP_STROKE_CAP_FLAT, "FLAT", 0, "Flat", ""}, {0, NULL, 0, NULL, NULL}, diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index c719aa99fd8..df0d514fabf 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -483,6 +483,13 @@ const EnumPropertyItem rna_enum_file_sort_items[] = { {0, NULL, 0, NULL, NULL}, }; +static const EnumPropertyItem rna_enum_curve_display_handle_items[] = { + {CURVE_HANDLE_NONE, "NONE", 0, "None", ""}, + {CURVE_HANDLE_SELECTED, "SELECTED", 0, "Selected", ""}, + {CURVE_HANDLE_ALL, "ALL", 0, "All", ""}, + {0, NULL, 0, NULL, NULL}, +}; + #ifdef RNA_RUNTIME # include "DNA_anim_types.h" @@ -3817,9 +3824,11 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) prop, "Indices", "Display the index numbers of selected vertices, edges, and faces"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_curve_handles", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_CU_HANDLES); - RNA_def_property_ui_text(prop, "Draw Handles", "Display Bezier handles in editmode"); + prop = RNA_def_property(srna, "display_handle", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "overlay.handle_display"); + RNA_def_property_enum_items(prop, rna_enum_curve_display_handle_items); + RNA_def_property_ui_text( + prop, "Display Handles", "Limit the display of curve handles in edit mode"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "show_curve_normals", PROP_BOOLEAN, PROP_NONE); |