New bone color presets #112639

Open
Demeter Dzadik wants to merge 6 commits from Mets/blender:new-bone-colors into blender-v4.0-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
4 changed files with 152 additions and 122 deletions

View File

@ -1098,104 +1098,104 @@ const bTheme U_theme_default = {
},
.tarm = {
{
.solid = RGBA(0x9a0000ff),
.select = RGBA(0xbd1111ff),
.active = RGBA(0xf70a0aff),
.solid = RGBA(0xe06254ff),
.select = RGBA(0xff7566ff),
.active = RGBA(0xffe8e6ff),
},
{
.solid = RGBA(0xf74018ff),
.select = RGBA(0xf66913ff),
.active = RGBA(0xfa9900ff),
.solid = RGBA(0xd2b1a1ff),
.select = RGBA(0xfea275ff),
.active = RGBA(0xffeee6ff),
},
{
.solid = RGBA(0x1e9109ff),
.select = RGBA(0x59b70bff),
.active = RGBA(0x83ef1dff),
.solid = RGBA(0xd2743fff),
.select = RGBA(0xffbb6eff),
.active = RGBA(0xfff3e6ff),
},
{
.solid = RGBA(0x0a3694ff),
.select = RGBA(0x3667dfff),
.active = RGBA(0x5ec1efff),
.solid = RGBA(0xd5bb3aff),
.select = RGBA(0xedd041ff),
.active = RGBA(0xfffbe6ff),
},
{
.solid = RGBA(0xa9294eff),
.select = RGBA(0xc1416aff),
.active = RGBA(0xf05d91ff),
.solid = RGBA(0xb9b379ff),
.select = RGBA(0xe5de96ff),
.active = RGBA(0xfffde6ff),
},
{
.solid = RGBA(0x430c78ff),
.select = RGBA(0x543aa3ff),
.active = RGBA(0x8764d5ff),
.solid = RGBA(0x9fbe39ff),
.select = RGBA(0xc5eb47ff),
.active = RGBA(0xf9ffe6ff),
},
{
.solid = RGBA(0x24785aff),
.select = RGBA(0x3c9579ff),
.active = RGBA(0x6fb6abff),
.solid = RGBA(0x7bc83bff),
.select = RGBA(0x91eb45ff),
.active = RGBA(0xf1ffe6ff),
},
{
.solid = RGBA(0x4b707cff),
.select = RGBA(0x6a8691ff),
.active = RGBA(0x9bc2cdff),
.solid = RGBA(0xa2c491ff),
.select = RGBA(0xc1e9acff),
.active = RGBA(0xefffe6ff),
},
{
.solid = RGBA(0xf4c90cff),
.select = RGBA(0xeec236ff),
.active = RGBA(0xf3ff00ff),
.solid = RGBA(0x2ebe4aff),
.select = RGBA(0x3ce35bff),
.active = RGBA(0xe6ffebff),
},
{
.solid = RGBA(0x1e2024ff),
.select = RGBA(0x484c56ff),
.active = RGBA(0xffffffff),
.solid = RGBA(0x34d79cff),
.select = RGBA(0x39efadff),
.active = RGBA(0xe6fff6ff),
},
{
.solid = RGBA(0x6f2f6aff),
.select = RGBA(0x9845beff),
.active = RGBA(0xd330d6ff),
.solid = RGBA(0x3ad5d4ff),
.select = RGBA(0x3fe7e6ff),
.active = RGBA(0xe6ffffff),
},
{
.solid = RGBA(0x6c8e22ff),
.select = RGBA(0x7fb022ff),
.active = RGBA(0xbbef5bff),
.solid = RGBA(0x88bbd7ff),
.select = RGBA(0x71b6f9ff),
.active = RGBA(0xe6f3ffff),
},
{
.solid = RGBA(0x8d8d8dff),
.select = RGBA(0xb0b0b0ff),
.active = RGBA(0xdededeff),
.solid = RGBA(0x9d94ffff),
.select = RGBA(0x9990ffff),
.active = RGBA(0xe8e6ffff),
},
{
.solid = RGBA(0x834326ff),
.select = RGBA(0x8b5811ff),
.active = RGBA(0xbd6a11ff),
.solid = RGBA(0xcfb2f1ff),
.select = RGBA(0xc28effff),
.active = RGBA(0xf2e6ffff),
},
{
.solid = RGBA(0x08310eff),
.select = RGBA(0x1c430bff),
.active = RGBA(0x34622bff),
.solid = RGBA(0xce68f2ff),
.select = RGBA(0xde80ffff),
.active = RGBA(0xf9e6ffff),
},
{
.solid = RGBA(0x000000ff),
.select = RGBA(0x000000ff),
.active = RGBA(0x000000ff),
.solid = RGBA(0xe74ad2ff),
.select = RGBA(0xff71edff),
.active = RGBA(0xffe6fcff),
},
{
.solid = RGBA(0x000000ff),
.select = RGBA(0x000000ff),
.active = RGBA(0x000000ff),
.solid = RGBA(0xdaa1c9ff),
.select = RGBA(0xfd8bdbff),
.active = RGBA(0xffe6f8ff),
},
{
.solid = RGBA(0x000000ff),
.select = RGBA(0x000000ff),
.active = RGBA(0x000000ff),
.solid = RGBA(0xd85989ff),
.select = RGBA(0xff83b1ff),
.active = RGBA(0xffe6efff),
},
{
.solid = RGBA(0x000000ff),
.select = RGBA(0x000000ff),
.active = RGBA(0x000000ff),
.solid = RGBA(0xb4abaeff),
.select = RGBA(0xd6adb3ff),
.active = RGBA(0xffe6eaff),
},
{
.solid = RGBA(0x000000ff),
.select = RGBA(0x000000ff),
.active = RGBA(0x000000ff),
.solid = RGBA(0x464344ff),
.select = RGBA(0xb1b0b0ff),
.active = RGBA(0xffe6e6ff),
},
},
.collection_color = {

View File

@ -1388,144 +1388,143 @@
</space_list>
</ThemeSpreadsheet>
</spreadsheet>
<bone_color_sets>
<ThemeBoneColorSet
normal="#9a0000"
select="#bd1111"
active="#f70a0a"
<bone_color_sets><ThemeBoneColorSet
normal="#e06254"
select="#ff7566"
active="#ffe8e6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#f74018"
select="#f66913"
active="#fa9900"
normal="#d2b1a1"
select="#fea275"
active="#ffeee6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#1e9109"
select="#59b70b"
active="#83ef1d"
normal="#d2743f"
select="#ffbb6e"
active="#fff3e6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#0a3694"
select="#3667df"
active="#5ec1ef"
normal="#d5bb3a"
select="#edd041"
active="#fffbe6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#a9294e"
select="#c1416a"
active="#f05d91"
normal="#b9b379"
select="#e5de96"
active="#fffde6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#430c78"
select="#543aa3"
active="#8764d5"
normal="#9fbe39"
select="#c5eb47"
active="#f9ffe6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#24785a"
select="#3c9579"
active="#6fb6ab"
normal="#7bc83b"
select="#91eb45"
active="#f1ffe6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#4b707c"
select="#6a8691"
active="#9bc2cd"
normal="#a2c491"
select="#c1e9ac"
active="#efffe6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#f4c90c"
select="#eec236"
active="#f3ff00"
normal="#2ebe4a"
select="#3ce35b"
active="#e6ffeb"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#1e2024"
select="#484c56"
active="#ffffff"
normal="#34d79c"
select="#39efad"
active="#e6fff6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#6f2f6a"
select="#9845be"
active="#d330d6"
normal="#3ad5d4"
select="#3fe7e6"
active="#e6ffff"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#6c8e22"
select="#7fb022"
active="#bbef5b"
normal="#88bbd7"
select="#71b6f9"
active="#e6f3ff"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#8d8d8d"
select="#b0b0b0"
active="#dedede"
normal="#9d94ff"
select="#9990ff"
active="#e8e6ff"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#834326"
select="#8b5811"
active="#bd6a11"
normal="#cfb2f1"
select="#c28eff"
active="#f2e6ff"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#08310e"
select="#1c430b"
active="#34622b"
normal="#ce68f2"
select="#de80ff"
active="#f9e6ff"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#000000"
select="#000000"
active="#000000"
normal="#e74ad2"
select="#ff71ed"
active="#ffe6fc"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#000000"
select="#000000"
active="#000000"
normal="#daa1c9"
select="#fd8bdb"
active="#ffe6f8"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#000000"
select="#000000"
active="#000000"
normal="#d85989"
select="#ff83b1"
active="#ffe6ef"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#000000"
select="#000000"
active="#000000"
normal="#b4abae"
select="#d6adb3"
active="#ffe6ea"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>
<ThemeBoneColorSet
normal="#000000"
select="#000000"
active="#000000"
normal="#464344"
select="#b1b0b0"
active="#ffe6e6"
show_colored_constraints="FALSE"
>
</ThemeBoneColorSet>

View File

@ -1049,6 +1049,30 @@ static void enable_geometry_nodes_is_modifier(Main &bmain)
}
}
static void version_bone_color_theme(Main &bmain)
{
auto version_bone_color = [&](animrig::BoneColor &color) {
// do stuff.
};
/* Version pose bone colors. */
LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
if (ob->type != OB_ARMATURE || !ob->pose) {
continue;
}
LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
version_bone_color(pchan->color);
}
}
/* Version armature bone colors. */
LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) {
blender::animrig::ANIM_armature_foreach_bone(
&arm->bonebase, [&](Bone *bone) { version_bone_color(bone->color); });
}
}
void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
{
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 1)) {

View File

@ -60,6 +60,12 @@
/* For versioning we only ever want to manipulate preferences passed in. */
#define U BLI_STATIC_ASSERT(false, "Global 'U' not allowed, only use arguments passed in!")
static void version_bone_color_theme(bTheme *btheme)
{
/* Reset the bone colors to the new default values. */
memcpy(btheme->tarm, &U_theme_default.tarm, sizeof(*btheme->tarm) * 20);
}
static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
{
@ -140,6 +146,7 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
*/
{
/* Keep this block, even when empty. */
version_bone_color_theme(btheme);
}
#undef FROM_DEFAULT_V4_UCHAR