From 3b900048f1c5ec098adea09620399ef8266d723b Mon Sep 17 00:00:00 2001 From: Christoph Lendenfeld Date: Thu, 9 Mar 2023 14:15:23 +0100 Subject: [PATCH] Animation: Move Graph Editor settings to User Preferences MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move two settings that were previously in the "View" menu of the Graph Editor into User Preferences. It has been mentioned in the meeting by Luciano Muñoz Sessarego that it would be good to move that to the preferences so you can set it once and then forget about it. The Settings moved are: Only Selected Curve Keyframes Use High Quality Display Pull Request: https://projects.blender.org/blender/blender/pulls/104532 --- release/datafiles/userdef/userdef_default.c | 1 + scripts/startup/bl_ui/space_graph.py | 7 ---- scripts/startup/bl_ui/space_userpref.py | 2 ++ .../blender/blenkernel/BKE_blender_version.h | 2 +- .../blenloader/intern/versioning_userdef.c | 4 +++ .../blender/editors/animation/anim_filter.c | 2 +- .../blender/editors/space_graph/graph_draw.c | 26 +++++++-------- .../editors/space_graph/graph_select.c | 33 +++++++++---------- .../blender/editors/space_graph/graph_view.c | 3 +- .../blender/editors/space_graph/space_graph.c | 2 +- source/blender/makesdna/DNA_space_types.h | 4 --- source/blender/makesdna/DNA_userdef_types.h | 2 ++ source/blender/makesrna/intern/rna_space.c | 15 --------- source/blender/makesrna/intern/rna_userdef.c | 17 ++++++++++ 14 files changed, 58 insertions(+), 62 deletions(-) diff --git a/release/datafiles/userdef/userdef_default.c b/release/datafiles/userdef/userdef_default.c index cbcd99d4b3f..fdd648ab110 100644 --- a/release/datafiles/userdef/userdef_default.c +++ b/release/datafiles/userdef/userdef_default.c @@ -157,6 +157,7 @@ const UserDef U_default = { .glalphaclip = 0.004, .autokey_mode = (AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON), .autokey_flag = AUTOKEY_FLAG_XYZ2RGB, + .animation_flag = USER_ANIM_HIGH_QUALITY_DRAWING, .text_render = 0, .navigation_mode = VIEW_NAVIGATION_WALK, .view_rotate_sensitivity_turntable = DEG2RAD(0.4), diff --git a/scripts/startup/bl_ui/space_graph.py b/scripts/startup/bl_ui/space_graph.py index ae52c6a5e0d..9f016f0dfc3 100644 --- a/scripts/startup/bl_ui/space_graph.py +++ b/scripts/startup/bl_ui/space_graph.py @@ -107,16 +107,9 @@ class GRAPH_MT_view(Menu): layout.separator() layout.prop(st, "show_markers") - layout.separator() - layout.prop(st, "use_beauty_drawing") - - layout.separator() - layout.prop(st, "show_extrapolation") layout.prop(st, "show_handles") - - layout.prop(st, "use_only_selected_curves_handles") layout.prop(st, "use_only_selected_keyframe_handles") layout.prop(st, "show_seconds") diff --git a/scripts/startup/bl_ui/space_userpref.py b/scripts/startup/bl_ui/space_userpref.py index f0dedc42c54..da738a7fc15 100644 --- a/scripts/startup/bl_ui/space_userpref.py +++ b/scripts/startup/bl_ui/space_userpref.py @@ -559,6 +559,8 @@ class USERPREF_PT_animation_fcurves(AnimationPanel, CenterAlignMixIn, Panel): flow.prop(edit, "keyframe_new_handle_type", text="Default Handles") flow.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB") flow.prop(edit, "use_anim_channel_group_colors") + flow.prop(edit, "show_only_selected_curve_keyframes") + flow.prop(edit, "use_fcurve_high_quality_drawing") # ----------------------------------------------------------------------------- diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 6f33219c7f6..e7888c0d3dc 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -25,7 +25,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 1 +#define BLENDER_FILE_SUBVERSION 2 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 4b2acfa7205..cfb3a4e5043 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -783,6 +783,10 @@ void blo_do_versions_userdef(UserDef *userdef) } } + if (!USER_VERSION_ATLEAST(306, 2)) { + userdef->animation_flag |= USER_ANIM_HIGH_QUALITY_DRAWING; + } + /** * Versioning code until next subversion bump goes here. * diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 2d5fa1b7a4f..99577673ece 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -264,7 +264,7 @@ static bool graphedit_get_context(bAnimContext *ac, SpaceGraph *sipo) ac->ads = sipo->ads; /* set settings for Graph Editor - "Selected = Editable" */ - if (sipo->flag & SIPO_SELCUVERTSONLY) { + if (U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) { sipo->ads->filterflag |= ADS_FILTER_SELEDIT; } else { diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 23f3cb068ab..4a92fd2a651 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -406,7 +406,7 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu) uint color = GPU_vertformat_attr_add( format, "color", GPU_COMP_U8, 4, GPU_FETCH_INT_TO_FLOAT_UNIT); immBindBuiltinProgram(GPU_SHADER_3D_FLAT_COLOR); - if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) { + if (U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING) { GPU_line_smooth(true); } GPU_blend(GPU_BLEND_ALPHA); @@ -482,7 +482,7 @@ static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu) immEnd(); immUnbindProgram(); GPU_blend(GPU_BLEND_NONE); - if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) { + if (U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING) { GPU_line_smooth(false); } } @@ -515,7 +515,7 @@ static void draw_fcurve_sample_control( } /* helper func - draw keyframe vertices only for an F-Curve */ -static void draw_fcurve_samples(SpaceGraph *sipo, ARegion *region, FCurve *fcu) +static void draw_fcurve_samples(ARegion *region, FCurve *fcu) { FPoint *first, *last; float hsize, xscale, yscale; @@ -531,7 +531,7 @@ static void draw_fcurve_samples(SpaceGraph *sipo, ARegion *region, FCurve *fcu) /* draw */ if (first && last) { /* anti-aliased lines for more consistent appearance */ - if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) { + if (U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING) { GPU_line_smooth(true); } GPU_blend(GPU_BLEND_ALPHA); @@ -547,7 +547,7 @@ static void draw_fcurve_samples(SpaceGraph *sipo, ARegion *region, FCurve *fcu) immUnbindProgram(); GPU_blend(GPU_BLEND_NONE); - if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) { + if (U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING) { GPU_line_smooth(false); } } @@ -565,7 +565,6 @@ static void draw_fcurve_curve(bAnimContext *ac, const bool use_nla_remap, const bool draw_extrapolation) { - SpaceGraph *sipo = (SpaceGraph *)ac->sl; short mapping_flag = ANIM_get_normalization_flags(ac); /* when opening a blend file on a different sized screen or while dragging the toolbar this can @@ -601,7 +600,7 @@ static void draw_fcurve_curve(bAnimContext *ac, float pixels_per_sample = 1.5f; float samplefreq = pixels_per_sample / UI_view2d_scale_get_x(v2d); - if (sipo->flag & SIPO_BEAUTYDRAW_OFF) { + if (!(U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING)) { /* Low Precision = coarse lower-bound clamping * * Although the "Beauty Draw" flag was originally for AA'd @@ -1030,7 +1029,7 @@ static void draw_fcurve(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, bAn } /* anti-aliased lines for less jagged appearance */ - if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) { + if (U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING) { GPU_line_smooth(true); } GPU_blend(GPU_BLEND_ALPHA); @@ -1105,7 +1104,7 @@ static void draw_fcurve(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, bAn immUnbindProgram(); - if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) { + if (U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING) { GPU_line_smooth(false); } GPU_blend(GPU_BLEND_NONE); @@ -1115,7 +1114,8 @@ static void draw_fcurve(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, bAn * - If the option to only show controls if the F-Curve is selected is enabled, * we must obey this. */ - if (!(sipo->flag & SIPO_SELCUVERTSONLY) || (fcu->flag & FCURVE_SELECTED)) { + if (!(U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) || + (fcu->flag & FCURVE_SELECTED)) { if (!BKE_fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) { /* only draw controls if this is the active modifier */ if ((fcu->flag & FCURVE_ACTIVE) && (fcm)) { @@ -1153,7 +1153,7 @@ static void draw_fcurve(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, bAn } else { /* samples: only draw two indicators at either end as indicators */ - draw_fcurve_samples(sipo, region, fcu); + draw_fcurve_samples(region, fcu); } GPU_matrix_pop(); @@ -1300,7 +1300,7 @@ void graph_draw_ghost_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region GPU_line_width(3.0f); /* anti-aliased lines for less jagged appearance */ - if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) { + if (U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING) { GPU_line_smooth(true); } GPU_blend(GPU_BLEND_ALPHA); @@ -1333,7 +1333,7 @@ void graph_draw_ghost_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region immUnbindProgram(); - if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) { + if (U.animation_flag & USER_ANIM_HIGH_QUALITY_DRAWING) { GPU_line_smooth(false); } GPU_blend(GPU_BLEND_NONE); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index c6a0f0e945a..17151992e92 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -172,8 +172,9 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FCURVESONLY | ANIMFILTER_NODUPLIS | ANIMFILTER_FCURVESONLY); - if (sipo->flag & - SIPO_SELCUVERTSONLY) { /* FIXME: this should really be check for by the filtering code... */ + if (U.animation_flag & + USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) { /* FIXME: this should really be check for by the + filtering code... */ filter |= ANIMFILTER_SEL; } mapping_flag |= ANIM_get_normalization_flags(ac); @@ -336,7 +337,6 @@ void deselect_graph_keys(bAnimContext *ac, bool test, short sel, bool do_channel bAnimListElem *ale; int filter; - SpaceGraph *sipo = (SpaceGraph *)ac->sl; KeyframeEditData ked = {{NULL}}; KeyframeEditFunc test_cb, sel_cb; @@ -374,7 +374,7 @@ void deselect_graph_keys(bAnimContext *ac, bool test, short sel, bool do_channel if (do_channels) { /* Only change selection of channel when the visibility of keyframes * doesn't depend on this. */ - if ((sipo->flag & SIPO_SELCUVERTSONLY) == 0) { + if ((U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) == 0) { /* deactivate the F-Curve, and deselect if deselecting keyframes. * otherwise select the F-Curve too since we've selected all the keyframes */ @@ -496,11 +496,11 @@ static rctf initialize_box_select_coords(const bAnimContext *ac, const rctf *rec return rectf; } -static int initialize_animdata_selection_filter(const SpaceGraph *sipo) +static int initialize_animdata_selection_filter(void) { int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FCURVESONLY | ANIMFILTER_NODUPLIS); - if (sipo->flag & SIPO_SELCUVERTSONLY) { + if (U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) { filter |= ANIMFILTER_FOREDIT | ANIMFILTER_SELEDIT; } return filter; @@ -513,8 +513,7 @@ static ListBase initialize_box_select_anim_data(const int filter, bAnimContext * return anim_data; } -static void initialize_box_select_key_editing_data(const SpaceGraph *sipo, - const bool incl_handles, +static void initialize_box_select_key_editing_data(const bool incl_handles, const short mode, bAnimContext *ac, void *data, @@ -540,7 +539,7 @@ static void initialize_box_select_key_editing_data(const SpaceGraph *sipo, r_ked->data = scaled_rectf; break; } - + SpaceGraph *sipo = (SpaceGraph *)ac->sl; if (sipo->flag & SIPO_SELVHANDLESONLY) { r_ked->iterflags |= KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE; } @@ -574,14 +573,13 @@ static bool box_select_graphkeys(bAnimContext *ac, void *data) { const rctf rectf = initialize_box_select_coords(ac, rectf_view); - SpaceGraph *sipo = (SpaceGraph *)ac->sl; - const int filter = initialize_animdata_selection_filter(sipo); + const int filter = initialize_animdata_selection_filter(); ListBase anim_data = initialize_box_select_anim_data(filter, ac); rctf scaled_rectf; KeyframeEditData ked; int mapping_flag; initialize_box_select_key_editing_data( - sipo, incl_handles, mode, ac, data, &scaled_rectf, &ked, &mapping_flag); + incl_handles, mode, ac, data, &scaled_rectf, &ked, &mapping_flag); /* Get beztriple editing/validation functions. */ const KeyframeEditFunc select_cb = ANIM_editkeyframes_select(selectmode); @@ -633,7 +631,7 @@ static bool box_select_graphkeys(bAnimContext *ac, any_key_selection_changed = true; /* Only change selection of channel when the visibility of keyframes * doesn't depend on this. */ - if ((sipo->flag & SIPO_SELCUVERTSONLY) == 0) { + if ((U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) == 0) { /* select the curve too now that curve will be touched */ if (selectmode == SELECT_ADD) { fcu->flag |= FCURVE_SELECTED; @@ -733,14 +731,13 @@ static void box_select_graphcurves(bAnimContext *ac, const bool incl_handles, void *data) { - const SpaceGraph *sipo = (SpaceGraph *)ac->sl; - const int filter = initialize_animdata_selection_filter(sipo); + const int filter = initialize_animdata_selection_filter(); ListBase anim_data = initialize_box_select_anim_data(filter, ac); rctf scaled_rectf; KeyframeEditData ked; int mapping_flag; initialize_box_select_key_editing_data( - sipo, incl_handles, mode, ac, data, &scaled_rectf, &ked, &mapping_flag); + incl_handles, mode, ac, data, &scaled_rectf, &ked, &mapping_flag); FCurve *last_selected_curve = NULL; @@ -1707,7 +1704,7 @@ static int mouse_graph_keys(bAnimContext *ac, /* Deselect other channels too, but only do this if selection of channel * when the visibility of keyframes doesn't depend on this. */ - if ((sipo->flag & SIPO_SELCUVERTSONLY) == 0) { + if ((U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) == 0) { ANIM_anim_channels_select_set(ac, ACHANNEL_SETFLAG_CLEAR); } } @@ -1780,7 +1777,7 @@ static int mouse_graph_keys(bAnimContext *ac, } /* only change selection of channel when the visibility of keyframes doesn't depend on this */ - if ((sipo->flag & SIPO_SELCUVERTSONLY) == 0) { + if ((U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) == 0) { /* select or deselect curve? */ if (bezt) { /* take selection status from item that got hit, to prevent flip/flop on channel diff --git a/source/blender/editors/space_graph/graph_view.c b/source/blender/editors/space_graph/graph_view.c index e6cbdd63ae6..6f220c1a5aa 100644 --- a/source/blender/editors/space_graph/graph_view.c +++ b/source/blender/editors/space_graph/graph_view.c @@ -49,7 +49,6 @@ void get_graph_keyframe_extents(bAnimContext *ac, const bool include_handles) { Scene *scene = ac->scene; - SpaceGraph *sipo = (SpaceGraph *)ac->sl; ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -58,7 +57,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, /* Get data to filter, from Dopesheet. */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FCURVESONLY | ANIMFILTER_NODUPLIS); - if (sipo->flag & SIPO_SELCUVERTSONLY) { + if (U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) { filter |= ANIMFILTER_SEL; } diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index fd7a6ab6c8e..53d75665bbd 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -68,7 +68,7 @@ static SpaceLink *graph_create(const ScrArea *UNUSED(area), const Scene *scene) /* settings for making it easier by default to just see what you're interested in tweaking */ sipo->ads->filterflag |= ADS_FILTER_ONLYSEL; - sipo->flag |= SIPO_SELVHANDLESONLY | SIPO_SHOW_MARKERS; + sipo->flag |= SIPO_SHOW_MARKERS; /* header */ region = MEM_callocN(sizeof(ARegion), "header for graphedit"); diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 68270af0a67..2bdb3f09583 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -488,8 +488,6 @@ typedef enum eGraphEdit_Flag { /* SIPO_NODRAWCFRANUM = (1 << 3), DEPRECATED */ /* show timing in seconds instead of frames */ SIPO_DRAWTIME = (1 << 4), - /* only show keyframes for selected F-Curves */ - SIPO_SELCUVERTSONLY = (1 << 5), /* draw names of F-Curves beside the respective curves */ /* NOTE: currently not used */ /* SIPO_DRAWNAMES = (1 << 6), */ /* UNUSED */ @@ -501,8 +499,6 @@ typedef enum eGraphEdit_Flag { SIPO_SELVHANDLESONLY = (1 << 9), /* don't perform realtime updates */ SIPO_NOREALTIMEUPDATES = (1 << 11), - /* don't draw curves with AA ("beauty-draw") for performance */ - SIPO_BEAUTYDRAW_OFF = (1 << 12), /* draw grouped channels with colors set in group */ /* SIPO_NODRAWGCOLORS = (1 << 13), DEPRECATED */ /* normalize curves on display */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 16fc0989282..1affd36e95a 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -1220,6 +1220,8 @@ typedef enum eAutokey_Flag { */ typedef enum eUserpref_Anim_Flags { USER_ANIM_SHOW_CHANNEL_GROUP_COLORS = (1 << 0), + USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS = (1 << 1), + USER_ANIM_HIGH_QUALITY_DRAWING = (1 << 2), } eUserpref_Anim_Flags; /** #UserDef.transopts */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 059d3bff493..d4d6c2be7ba 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -6329,27 +6329,12 @@ static void rna_def_space_graph(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - prop = RNA_def_property(srna, "use_only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELCUVERTSONLY); - RNA_def_property_ui_text(prop, - "Only Selected Curve Keyframes", - "Only keyframes of selected F-Curves are visible and editable"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - prop = RNA_def_property(srna, "use_only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELVHANDLESONLY); RNA_def_property_ui_text( prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - prop = RNA_def_property(srna, "use_beauty_drawing", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_BEAUTYDRAW_OFF); - RNA_def_property_ui_text(prop, - "Use High Quality Display", - "Display F-Curves using Anti-Aliasing and other fancy effects " - "(disable for better performance)"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SHOW_MARKERS); RNA_def_property_ui_text( diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index a9a1f7b4fd6..0312dd113bd 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5175,6 +5175,23 @@ static void rna_def_userdef_edit(BlenderRNA *brna) "background of the Graph Editor"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); + /* FCurve keyframe visibility. */ + prop = RNA_def_property(srna, "show_only_selected_curve_keyframes", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna( + prop, NULL, "animation_flag", USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS); + RNA_def_property_ui_text(prop, + "Only Show Selected F-Curve Keyframes", + "Only keyframes of selected F-Curves are visible and editable"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); + + /* Graph Editor line drawing quality. */ + prop = RNA_def_property(srna, "use_fcurve_high_quality_drawing", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "animation_flag", USER_ANIM_HIGH_QUALITY_DRAWING); + RNA_def_property_ui_text(prop, + "F-Curve High Quality Drawing", + "Draw F-Curves using Anti-Aliasing (disable for better performance)"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); + /* grease pencil */ prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_PIXEL); RNA_def_property_int_sdna(prop, NULL, "gp_manhattandist");