Animation: separate constraint owner space descriptions for objects

Until now the owner spaces in the object constraint properties used the
same descriptions as the target spaces, unlike bone constraints.

For instance, if you chose World Space as owner space, you'd get the
description: "The transformation of the target is evaluated relative to
the world coordinate system".

Reuse the existing descriptions from the bone constraints instead, so
now you get: "The constraint is applied relative to the world coordinate
system".

Reviewed By: sybren

Maniphest Tasks: T43295

Differential Revision: https://developer.blender.org/D16747
This commit is contained in:
Damien Picard 2022-12-22 16:52:17 +01:00 committed by Sybren A. Stüvel
parent a7ad2dea62
commit d9510f02c8
Notes: blender-bot 2023-02-14 09:36:38 +01:00
Referenced by issue #43295, Translation disambiguation requests
1 changed files with 22 additions and 3 deletions

View File

@ -279,7 +279,26 @@ static const EnumPropertyItem euler_order_items[] = {
#ifdef RNA_RUNTIME
static const EnumPropertyItem space_object_items[] = {
static const EnumPropertyItem owner_space_object_items[] = {
{CONSTRAINT_SPACE_WORLD,
"WORLD",
0,
"World Space",
"The constraint is applied relative to the world coordinate system"},
{CONSTRAINT_SPACE_CUSTOM,
"CUSTOM",
0,
"Custom Space",
"The constraint is applied in local space of a custom object/bone/vertex group"},
{CONSTRAINT_SPACE_LOCAL,
"LOCAL",
0,
"Local Space",
"The constraint is applied relative to the local coordinate system of the object"},
{0, NULL, 0, NULL, NULL},
};
static const EnumPropertyItem target_space_object_items[] = {
{CONSTRAINT_SPACE_WORLD,
"WORLD",
0,
@ -588,7 +607,7 @@ static const EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED
}
else {
/* object */
return space_object_items;
return owner_space_object_items;
}
}
@ -615,7 +634,7 @@ static const EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSE
}
}
return space_object_items;
return target_space_object_items;
}
static bConstraintTarget *rna_ArmatureConstraint_target_new(ID *id, bConstraint *con, Main *bmain)