From 048625cc1ffc05388ed3858a2a8649b1067d3e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 10 Oct 2023 12:05:06 +0200 Subject: [PATCH] Anim: make bone colors library-overridable Pose bone colors should be library-overridable, and now they are. --- source/blender/makesrna/intern/rna_armature.cc | 2 ++ source/blender/makesrna/intern/rna_pose.cc | 1 + source/blender/makesrna/intern/rna_userdef.cc | 3 +++ 3 files changed, 6 insertions(+) diff --git a/source/blender/makesrna/intern/rna_armature.cc b/source/blender/makesrna/intern/rna_armature.cc index a5011eb301d..60dfeeaf5d8 100644 --- a/source/blender/makesrna/intern/rna_armature.cc +++ b/source/blender/makesrna/intern/rna_armature.cc @@ -932,6 +932,7 @@ static void rna_def_bonecolor(BlenderRNA *brna) RNA_def_property_enum_items(prop, rna_enum_color_palettes_items); RNA_def_property_enum_funcs(prop, nullptr, "rna_BoneColor_palette_index_set", nullptr); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_text(prop, "Color Set", "Color palette to use"); RNA_def_property_update(prop, 0, "rna_BoneColor_update"); @@ -947,6 +948,7 @@ static void rna_def_bonecolor(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "ThemeBoneColorSet"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_text( prop, "Custom", "The custom bone colors, used when palette is 'CUSTOM'"); RNA_def_property_update(prop, 0, "rna_BoneColor_update"); diff --git a/source/blender/makesrna/intern/rna_pose.cc b/source/blender/makesrna/intern/rna_pose.cc index b6dc57dce30..1716da4c2ab 100644 --- a/source/blender/makesrna/intern/rna_pose.cc +++ b/source/blender/makesrna/intern/rna_pose.cc @@ -1162,6 +1162,7 @@ static void rna_def_pose_channel(BlenderRNA *brna) prop = RNA_def_property(srna, "color", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "BoneColor"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); /* transform locks */ prop = RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_userdef.cc b/source/blender/makesrna/intern/rna_userdef.cc index 3202f8e09e1..73bf041c43b 100644 --- a/source/blender/makesrna/intern/rna_userdef.cc +++ b/source/blender/makesrna/intern/rna_userdef.cc @@ -3945,17 +3945,20 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Regular", "Color used for the surface of bones"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); prop = RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, nullptr, "select"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Select", "Color used for selected bones"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); prop = RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Active", "Color used for active bones"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); prop = RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, nullptr, "flag", TH_WIRECOLOR_CONSTCOLS);