diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-10-16 11:36:01 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-10-16 11:36:01 +0300 |
commit | c2fbe46b0f0fde44b8a40d89601a195da27d28fb (patch) | |
tree | f66e3e50758acb36001e2774c6e4ede5fc8bead6 /source/blender/makesrna/intern/rna_userdef.c | |
parent | 386ba094988fc793f8e060d15438566e5e2d2cae (diff) | |
parent | dcf57e34f3866bba5ddd9cfdfe858a1a5eedc4c2 (diff) |
Merge branch 'master' into temp-gpencil-drw-enginetemp-gpencil-drw-engine
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index c9b6f46ab04..07ce07710b1 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -424,6 +424,17 @@ static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value) } } +static int rna_UserDef_mouse_emulate_3_button_modifier_get(PointerRNA *ptr) +{ +# if !defined(WIN32) + UserDef *userdef = ptr->data; + return userdef->mouse_emulate_3_button_modifier; +# else + UNUSED_VARS(ptr); + return USER_EMU_MMB_MOD_ALT; +# endif +} + static PointerRNA rna_UserDef_view_get(PointerRNA *ptr) { return rna_pointer_inherit_refine(ptr, &RNA_PreferencesView, ptr->data); @@ -3190,6 +3201,18 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna) RNA_def_property_ui_text(prop, "View Sliders", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "ds_channel"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Channel", "Nonlinear Animation Channel"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "nla_track", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "nla_track"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Track", "Nonlinear Animation Track"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "active_action", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "anim_active"); RNA_def_property_array(prop, 4); @@ -4634,6 +4657,13 @@ static void rna_def_userdef_edit(BlenderRNA *brna) "Color for newly added transformation F-Curves (Location, Rotation, Scale) " "and also Color is based on the transform axis"); + prop = RNA_def_property(srna, "fcurve_new_auto_smoothing", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, rna_enum_fcurve_auto_smoothing_items); + RNA_def_property_enum_sdna(prop, NULL, "auto_smoothing_new"); + RNA_def_property_ui_text(prop, + "New Curve Smoothing Mode", + "Auto Handle Smoothing mode used for newly added F-Curves"); + prop = RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, rna_enum_beztriple_interpolation_mode_items); RNA_def_property_enum_sdna(prop, NULL, "ipo_new"); @@ -5487,6 +5517,21 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_userdef_keyconfig_reload_update"); + static const EnumPropertyItem mouse_emulate_3_button_modifier[] = { + {USER_EMU_MMB_MOD_ALT, "ALT", 0, "Alt", ""}, + {USER_EMU_MMB_MOD_OSKEY, "OSKEY", 0, "OS-Key", ""}, + {0, NULL, 0, NULL, NULL}, + }; + + prop = RNA_def_property(srna, "mouse_emulate_3_button_modifier", PROP_ENUM, PROP_NONE); + /* Only needed because of WIN32 inability to support the option. */ + RNA_def_property_enum_funcs(prop, "rna_UserDef_mouse_emulate_3_button_modifier_get", NULL, NULL); + RNA_def_property_enum_items(prop, mouse_emulate_3_button_modifier); + RNA_def_property_ui_text( + prop, "Emulate 3 Button Modifier", "Hold this modifier to emulate the middle mouse button"); + RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); + RNA_def_property_update(prop, 0, "rna_userdef_keyconfig_reload_update"); + prop = RNA_def_property(srna, "use_emulate_numpad", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD); RNA_def_property_ui_text( |