diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 77db282918b..e9e06c10c8e 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -287,6 +287,21 @@ const bTheme U_theme_default = { .channel_group = RGBA(0x1a332d37), .channel_group_active = RGBA(0x216d5b67), }, + .curves = { + .handle_free = RGBA(0x000000ff), + .handle_auto = RGBA(0x909000ff), + .handle_vect = RGBA(0x409030ff), + .handle_align = RGBA(0x803060ff), + .handle_auto_clamped = RGBA(0x994030ff), + .handle_sel_free = RGBA(0x000000ff), + .handle_sel_auto = RGBA(0xf0ff40ff), + .handle_sel_vect = RGBA(0x40c030ff), + .handle_sel_align = RGBA(0xf090a0ff), + .handle_sel_auto_clamped = RGBA(0xf0af90ff), + .handle_vertex = RGBA(0x000000ff), + .handle_vertex_select = RGBA(0xff8500ff), + .handle_vertex_size = 5, + }, }, .space_properties = { .back = RGBA(0x30303000), @@ -366,14 +381,6 @@ const bTheme U_theme_default = { .nurb_sel_uline = RGBA(0xf0ff40ff), .nurb_sel_vline = RGBA(0xf090a0ff), .lastsel_point = RGBA(0xffffffff), - .handle_free = RGBA(0x000000ff), - .handle_auto = RGBA(0x909000ff), - .handle_vect = RGBA(0x409030ff), - .handle_align = RGBA(0x803060ff), - .handle_sel_free = RGBA(0x000000ff), - .handle_sel_auto = RGBA(0xf0ff40ff), - .handle_sel_vect = RGBA(0x40c030ff), - .handle_sel_align = RGBA(0xf090a0ff), .vertex_size = 3, .edge_width = 1, .outline_width = 1, @@ -427,20 +434,9 @@ const bTheme U_theme_default = { .vertex_select = RGBA(0xff8500ff), .vertex_active = RGBA(0xffffffff), .time_scrub_background = RGBA(0x161616ff), - .lastsel_point = RGBA(0xffffffff), - .handle_auto = RGBA(0x909000ff), - .handle_vect = RGBA(0x409030ff), - .handle_align = RGBA(0x803060ff), - .handle_auto_clamped = RGBA(0x994030ff), - .handle_sel_auto = RGBA(0xf0ff40ff), - .handle_sel_vect = RGBA(0x40c030ff), - .handle_sel_align = RGBA(0xf090a0ff), - .handle_sel_auto_clamped = RGBA(0xf0af90ff), .vertex_size = 6, .outline_width = 1, .facedot_size = 4, - .handle_vertex_select = RGBA(0xff8500ff), - .handle_vertex_size = 5, }, .space_info = { .back = RGBA(0x1d1d1d00), @@ -506,7 +502,6 @@ const bTheme U_theme_default = { .facedot_size = 4, .simulated_frames = RGBA(0x721e65ff), .keyframe_scale_fac = 1.0f, - .handle_vertex_size = 4, .anim_active = RGBA(0x4d272766), }, .space_nla = { @@ -533,7 +528,6 @@ const bTheme U_theme_default = { .vertex_size = 3, .outline_width = 1, .facedot_size = 4, - .handle_vertex_size = 4, .anim_active = RGBA(0x99541366), .anim_non_active = RGBA(0x4d3b174d), .nla_tweaking = RGBA(0x4df31a4d), @@ -622,17 +616,11 @@ const bTheme U_theme_default = { .face_select = RGBA(0xff85003c), .face_dot = RGBA(0xff8500ff), .freestyle_face_mark = RGBA(0x7fff7f33), - .handle_auto = RGBA(0x909000ff), - .handle_align = RGBA(0x803060ff), - .handle_sel_auto = RGBA(0xf0ff40ff), - .handle_sel_align = RGBA(0xf090a0ff), .vertex_size = 3, .edge_width = 1, .outline_width = 1, .facedot_size = 3, .editmesh_active = RGBA(0xffffff40), - .handle_vertex_select = RGBA(0xffff00ff), - .handle_vertex_size = 5, .gp_vertex_size = 3, .gp_vertex_select = RGBA(0xff8500ff), .preview_back = RGBA(0x727272ff), @@ -796,17 +784,9 @@ const bTheme U_theme_default = { .strip = RGBA(0xffffff80), .strip_select = RGBA(0xff8c00ff), .time_scrub_background = RGBA(0x181818ff), - .handle_auto = RGBA(0x909000ff), - .handle_align = RGBA(0x803060ff), - .handle_auto_clamped = RGBA(0x99403000), - .handle_sel_auto = RGBA(0xf0ff40ff), - .handle_sel_align = RGBA(0xf090a0ff), - .handle_sel_auto_clamped = RGBA(0xf0af9000), .vertex_size = 3, .outline_width = 1, .facedot_size = 4, - .handle_vertex_select = RGBA(0xff8500ff), - .handle_vertex_size = 5, .marker = RGBA(0x808000ff), .act_marker = RGBA(0xffffffff), .sel_marker = RGBA(0xffff00ff), diff --git a/scripts/presets/interface_theme/Blender_Light.xml b/scripts/presets/interface_theme/Blender_Light.xml index de76d6a07e6..caf680458d9 100644 --- a/scripts/presets/interface_theme/Blender_Light.xml +++ b/scripts/presets/interface_theme/Blender_Light.xml @@ -398,6 +398,24 @@ > + + + + @@ -445,14 +463,6 @@ nurb_sel_uline="#f0ff40" nurb_sel_vline="#f090a0" act_spline="#db2512" - handle_free="#000000" - handle_auto="#909000" - handle_vect="#409030" - handle_sel_vect="#40c030" - handle_align="#803060" - handle_sel_free="#000000" - handle_sel_auto="#f0ff40" - handle_sel_align="#f090a0" lastsel_point="#ffffff" extra_edge_len="#ff6149" extra_edge_angle="#cccc00" @@ -519,20 +529,7 @@ vertex_size="6" vertex_bevel="#000000" vertex_unreferenced="#000000" - handle_free="#000000" - handle_auto="#909000" - handle_vect="#409030" - handle_sel_vect="#40c030" - handle_align="#803060" - handle_sel_free="#000000" - handle_sel_auto="#f0ff40" - handle_sel_align="#f090a0" - handle_auto_clamped="#994030" - handle_sel_auto_clamped="#f0af90" lastsel_point="#ffffff" - handle_vertex="#000000" - handle_vertex_select="#ff8500" - handle_vertex_size="5" > @@ -1067,17 +1053,7 @@ strips_selected="#ff8c00" metadatabg="#000000" metadatatext="#ffffff" - handle_free="#000000" - handle_auto="#909000" - handle_align="#803060" - handle_sel_free="#000000" - handle_sel_auto="#f0ff40" - handle_sel_align="#f090a0" - handle_auto_clamped="#000000" - handle_sel_auto_clamped="#000000" - handle_vertex="#000000" - handle_vertex_select="#ffff00" - handle_vertex_size="5" + preview_range="#a14d0066" > common.curves.handle_vertex_size = U_theme_default.common.curves.handle_vertex_size; + } + /** * Always bump subversion in BKE_blender_version.h when adding versioning * code here, and wrap it inside a USER_VERSION_ATLEAST check. diff --git a/source/blender/editors/interface/resources.cc b/source/blender/editors/interface/resources.cc index 667594067d8..debdc6837fa 100644 --- a/source/blender/editors/interface/resources.cc +++ b/source/blender/editors/interface/resources.cc @@ -549,6 +549,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_TIME_GP_KEYFRAME: cp = ts->time_gp_keyframe; break; + case TH_NURB_ULINE: cp = ts->nurb_uline; break; @@ -567,36 +568,38 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_ACTIVE_VERT: cp = ts->lastsel_point; break; + case TH_HANDLE_FREE: - cp = ts->handle_free; - break; - case TH_HANDLE_AUTO: - cp = ts->handle_auto; - break; - case TH_HANDLE_AUTOCLAMP: - cp = ts->handle_auto_clamped; - break; - case TH_HANDLE_VECT: - cp = ts->handle_vect; - break; - case TH_HANDLE_ALIGN: - cp = ts->handle_align; + cp = btheme->common.curves.handle_free; break; case TH_HANDLE_SEL_FREE: - cp = ts->handle_sel_free; + cp = btheme->common.curves.handle_sel_free; + break; + case TH_HANDLE_AUTO: + cp = btheme->common.curves.handle_auto; break; case TH_HANDLE_SEL_AUTO: - cp = ts->handle_sel_auto; + cp = btheme->common.curves.handle_sel_auto; break; - case TH_HANDLE_SEL_AUTOCLAMP: - cp = ts->handle_sel_auto_clamped; + case TH_HANDLE_VECT: + cp = btheme->common.curves.handle_vect; break; case TH_HANDLE_SEL_VECT: - cp = ts->handle_sel_vect; + cp = btheme->common.curves.handle_sel_vect; + break; + case TH_HANDLE_ALIGN: + cp = btheme->common.curves.handle_align; break; case TH_HANDLE_SEL_ALIGN: - cp = ts->handle_sel_align; + cp = btheme->common.curves.handle_sel_align; break; + case TH_HANDLE_AUTOCLAMP: + cp = btheme->common.curves.handle_auto_clamped; + break; + case TH_HANDLE_SEL_AUTOCLAMP: + cp = btheme->common.curves.handle_sel_auto_clamped; + break; + case TH_FREESTYLE_EDGE_MARK: cp = ts->freestyle_edge_mark; break; @@ -780,13 +783,13 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) break; case TH_HANDLE_VERTEX: - cp = ts->handle_vertex; + cp = btheme->common.curves.handle_vertex; break; case TH_HANDLE_VERTEX_SELECT: - cp = ts->handle_vertex_select; + cp = btheme->common.curves.handle_vertex_select; break; case TH_HANDLE_VERTEX_SIZE: - cp = &ts->handle_vertex_size; + cp = &btheme->common.curves.handle_vertex_size; break; case TH_GP_VERTEX: diff --git a/source/blender/makesdna/DNA_theme_types.h b/source/blender/makesdna/DNA_theme_types.h index 256e4b45551..ef642383f4d 100644 --- a/source/blender/makesdna/DNA_theme_types.h +++ b/source/blender/makesdna/DNA_theme_types.h @@ -116,8 +116,25 @@ typedef struct ThemeCommonAnim { unsigned char channel_group[4], channel_group_active[4]; } ThemeCommonAnim; +typedef struct ThemeCommonCurves { + /** Curve handles. */ + unsigned char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], + handle_auto_clamped[4]; + unsigned char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], + handle_sel_auto_clamped[4]; + + /** Curve points. */ + unsigned char handle_vertex[4]; + unsigned char handle_vertex_select[4]; + unsigned char handle_vertex_size; + + char _pad0[3]; +} ThemeCommonCurves; + typedef struct ThemeCommon { ThemeCommonAnim anim; + ThemeCommonCurves curves; + char _pad0[4]; } ThemeCommon; typedef struct uiWidgetColors { @@ -302,16 +319,11 @@ typedef struct ThemeSpace { unsigned char time_keyframe[4], time_gp_keyframe[4]; unsigned char freestyle_edge_mark[4], freestyle_face_mark[4]; unsigned char time_scrub_background[4]; - char _pad9[4]; + char _pad10[4]; unsigned char nurb_uline[4], nurb_vline[4]; unsigned char act_spline[4], nurb_sel_uline[4], nurb_sel_vline[4], lastsel_point[4]; - unsigned char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], - handle_auto_clamped[4]; - unsigned char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], - handle_sel_auto_clamped[4]; - /** Dope-sheet. */ unsigned char ds_ipoline[4]; /** Key-types. */ @@ -362,11 +374,7 @@ typedef struct ThemeSpace { float keyframe_scale_fac; unsigned char editmesh_active[4]; - - unsigned char handle_vertex[4]; - unsigned char handle_vertex_select[4]; - - unsigned char handle_vertex_size; + char _pad9[1]; unsigned char clipping_border_3d[4]; diff --git a/source/blender/makesrna/intern/rna_userdef.cc b/source/blender/makesrna/intern/rna_userdef.cc index 02fde4b08c8..ba4f356fe74 100644 --- a/source/blender/makesrna/intern/rna_userdef.cc +++ b/source/blender/makesrna/intern/rna_userdef.cc @@ -2204,12 +2204,100 @@ static void rna_def_userdef_theme_common_anim(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); } +static void rna_def_userdef_theme_common_curves(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna = RNA_def_struct(brna, "ThemeCommonCurves", nullptr); + RNA_def_struct_sdna(srna, "ThemeCommonCurves"); + RNA_def_struct_ui_text(srna, "Common Curve Properties", "Shared curve theme properties"); + + /* Curve handle colors. */ + prop = RNA_def_property(srna, "handle_free", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_free"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Free Handle", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_sel_free", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_sel_free"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Free Handle Selected", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_auto", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_auto"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Auto Handle", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_sel_auto", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_sel_auto"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Auto Handle Selected", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_vect", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_vect"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Vector Handle", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_sel_vect", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_sel_vect"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Vector Handle Selected", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_align", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_align"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Align Handle", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_sel_align", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_sel_align"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Align Handle Selected", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_auto_clamped"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Auto-Clamped Handle", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "handle_sel_auto_clamped"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Auto-Clamped Handle Selected", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + /* Curve handle point colors & size. */ + prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Handle Vertex", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Handle Vertex Select", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_PIXEL); + RNA_def_property_range(prop, 1, 100); + RNA_def_property_ui_text(prop, "Handle Vertex Size", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); +} + static void rna_def_userdef_theme_common(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; rna_def_userdef_theme_common_anim(brna); + rna_def_userdef_theme_common_curves(brna); srna = RNA_def_struct(brna, "ThemeCommon", nullptr); RNA_def_struct_ui_text( @@ -2219,6 +2307,11 @@ static void rna_def_userdef_theme_common(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_ui_text(prop, "Animation", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "curves", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NEVER_NULL); + RNA_def_property_ui_text(prop, "Curves", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); } static void rna_def_userdef_theme_space_common(StructRNA *srna) @@ -2560,134 +2653,6 @@ static void rna_def_userdef_theme_spaces_paint_curves(StructRNA *srna) RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); } -static void rna_def_userdef_theme_spaces_curves( - StructRNA *srna, bool incl_nurbs, bool incl_lastsel, bool incl_vector, bool incl_verthandle) -{ - PropertyRNA *prop; - - if (incl_nurbs) { - prop = RNA_def_property(srna, "nurb_uline", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "nurb_uline"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "NURBS U Lines", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "nurb_vline", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "nurb_vline"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "NURBS V Lines", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "nurb_sel_uline", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "nurb_sel_uline"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "NURBS Active U Lines", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "nurb_sel_vline", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "nurb_sel_vline"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "NURBS Active V Lines", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "act_spline"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Active Spline", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - } - - prop = RNA_def_property(srna, "handle_free", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_free"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Free Handle", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "handle_auto", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_auto"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Auto Handle", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - if (incl_vector) { - prop = RNA_def_property(srna, "handle_vect", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_vect"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Vector Handle", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "handle_sel_vect", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_sel_vect"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Vector Handle Selected", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - } - - prop = RNA_def_property(srna, "handle_align", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_align"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Align Handle", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "handle_sel_free", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_sel_free"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Free Handle Selected", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "handle_sel_auto", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_sel_auto"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Auto Handle Selected", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "handle_sel_align", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_sel_align"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Align Handle Selected", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - if (!incl_nurbs) { - /* assume that when nurbs are off, this is for 2D (i.e. anim) editors */ - prop = RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_auto_clamped"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Auto-Clamped Handle", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "handle_sel_auto_clamped"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Auto-Clamped Handle Selected", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - } - - if (incl_lastsel) { - prop = RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, nullptr, "lastsel_point"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Last Selected Point", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - } - - if (incl_verthandle) { - prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Handle Vertex", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Handle Vertex Select", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_PIXEL); - RNA_def_property_range(prop, 1, 100); - RNA_def_property_ui_text(prop, "Handle Vertex Size", ""); - RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - } -} - static void rna_def_userdef_theme_spaces_gpencil(StructRNA *srna) { PropertyRNA *prop; @@ -2812,10 +2777,6 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) rna_def_userdef_theme_spaces_edge(srna); rna_def_userdef_theme_spaces_face(srna); - /* Mesh Object specific curves. */ - - rna_def_userdef_theme_spaces_curves(srna, true, true, true, false); - prop = RNA_def_property(srna, "extra_edge_len", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Edge Length Text", ""); @@ -2857,6 +2818,44 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Custom Normal", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + /* Curve Object specific */ + + prop = RNA_def_property(srna, "nurb_uline", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "nurb_uline"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "NURBS U Lines", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "nurb_vline", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "nurb_vline"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "NURBS V Lines", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "nurb_sel_uline", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "nurb_sel_uline"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "NURBS Active U Lines", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "nurb_sel_vline", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "nurb_sel_vline"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "NURBS Active V Lines", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "act_spline"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Active Spline", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, nullptr, "lastsel_point"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Last Selected Point", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + /* Armature Object specific. */ prop = RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA); @@ -2985,7 +2984,6 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); rna_def_userdef_theme_spaces_vertex(srna, true); - rna_def_userdef_theme_spaces_curves(srna, false, true, true, true); } static void rna_def_userdef_theme_space_file(BlenderRNA *brna) @@ -3636,8 +3634,6 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Metadata Text", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - rna_def_userdef_theme_spaces_curves(srna, false, false, false, true); - rna_def_userdef_theme_spaces_paint_curves(srna); } @@ -4335,8 +4331,6 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Metadata Text", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); - - rna_def_userdef_theme_spaces_curves(srna, false, false, false, true); } static void rna_def_userdef_theme_space_topbar(BlenderRNA *brna)