UI/Code: Fix typos and other UI messages issues.

This commit is contained in:
Bastien Montagne 2024-01-08 12:03:35 +01:00
parent dddf1ba32a
commit d13edee3e0
8 changed files with 26 additions and 13 deletions

View File

@ -345,6 +345,7 @@ WARN_MSGID_NOT_CAPITALIZED_ALLOWED = {
"author", # Addons' field. :/ "author", # Addons' field. :/
"bItasc", "bItasc",
"blender.org", "blender.org",
"bytes",
"color_index is invalid", "color_index is invalid",
"cos(A)", "cos(A)",
"cosh(A)", "cosh(A)",
@ -364,6 +365,8 @@ WARN_MSGID_NOT_CAPITALIZED_ALLOWED = {
"glTF Material Output", "glTF Material Output",
"glTF Original PBR data", "glTF Original PBR data",
"glTF Separate (.gltf + .bin + textures)", "glTF Separate (.gltf + .bin + textures)",
"gltfpack",
"glTFpack file path",
"invoke() needs to be called before execute()", "invoke() needs to be called before execute()",
"iScale", "iScale",
"iso-8859-15", "iso-8859-15",
@ -383,10 +386,13 @@ WARN_MSGID_NOT_CAPITALIZED_ALLOWED = {
"ogg", "ogg",
"oneAPI", "oneAPI",
"p0", "p0",
"parent_index should not be less than -1: %d",
"parent_index (%d) should be less than the number of bone collections (%d)",
"px", "px",
"re", "re",
"res", "res",
"rv", "rv",
"seconds",
"sin(A)", "sin(A)",
"sin(x) / x", "sin(x) / x",
"sinh(A)", "sinh(A)",

View File

@ -32,9 +32,11 @@ class SpellChecker:
"duplications", "duplications",
"effector", "effector",
"equi", # equi-angular, etc. "equi", # equi-angular, etc.
"eszett", # German Eszett
"et", # et al. "et", # et al.
"fader", "fader",
"globbing", "globbing",
"guillemet",
"gridded", "gridded",
"haptics", "haptics",
"hasn", # hasn't "hasn", # hasn't
@ -49,6 +51,7 @@ class SpellChecker:
"kyrgyz", "kyrgyz",
"latin", "latin",
"merchantability", "merchantability",
"mille", # Per Mille
"mplayer", "mplayer",
"ons", # add-ons "ons", # add-ons
"pong", # ping pong "pong", # ping pong
@ -193,6 +196,7 @@ class SpellChecker:
"raytree", "raytree",
"readonly", "readonly",
"realtime", "realtime",
"recompute", "recomputation",
"reinject", "reinjected", "reinject", "reinjected",
"rekey", "rekey",
"relink", "relink",
@ -233,6 +237,7 @@ class SpellChecker:
"subsize", "subsize",
"substep", "substeps", "substep", "substeps",
"substring", "substring",
"supercompress", "supercompression",
"targetless", "targetless",
"textbox", "textboxes", "textbox", "textboxes",
"tilemode", "tilemode",
@ -451,6 +456,7 @@ class SpellChecker:
"parametrization", "parametrization",
"pheomelanin", "pheomelanin",
"photoreceptor", "photoreceptor",
"picometer", "picometers",
"poly", "poly",
"polyline", "polylines", "polyline", "polylines",
"probabilistically", "probabilistically",
@ -670,7 +676,7 @@ class SpellChecker:
"ptcache", "ptcache",
"dpaint", "dpaint",
# Algorithm/library names # Algorithm/library/tools names
"ashikhmin", # Ashikhmin-Shirley "ashikhmin", # Ashikhmin-Shirley
"arsloe", # Texel-Marsen-Arsloe "arsloe", # Texel-Marsen-Arsloe
"beckmann", "beckmann",
@ -688,6 +694,7 @@ class SpellChecker:
"devlin", "devlin",
"embree", "embree",
"gmp", "gmp",
"gltfpack",
"hosek", "hosek",
"kutta", "kutta",
"kuwahara", "kuwahara",

View File

@ -355,9 +355,9 @@ bool armature_bonecoll_is_child_of(const bArmature *armature,
int potential_parent_index, int potential_parent_index,
int potential_child_index); int potential_child_index);
bool armature_bonecoll_is_decendent_of(const bArmature *armature, bool armature_bonecoll_is_descendant_of(const bArmature *armature,
int potential_parent_index, int potential_parent_index,
int potential_decendent_index); int potential_descendant_index);
bool bonecoll_has_children(const BoneCollection *bcoll); bool bonecoll_has_children(const BoneCollection *bcoll);

View File

@ -1150,11 +1150,11 @@ bool armature_bonecoll_is_child_of(const bArmature *armature,
potential_child_index < upper_bound; potential_child_index < upper_bound;
} }
bool armature_bonecoll_is_decendent_of(const bArmature *armature, bool armature_bonecoll_is_descendant_of(const bArmature *armature,
const int potential_parent_index, const int potential_parent_index,
const int potential_decendent_index) const int potential_descendant_index)
{ {
if (armature_bonecoll_is_child_of(armature, potential_parent_index, potential_decendent_index)) { if (armature_bonecoll_is_child_of(armature, potential_parent_index, potential_descendant_index)) {
/* Found a direct child. */ /* Found a direct child. */
return true; return true;
} }
@ -1163,7 +1163,7 @@ bool armature_bonecoll_is_decendent_of(const bArmature *armature,
const int upper_bound = potential_parent->child_index + potential_parent->child_count; const int upper_bound = potential_parent->child_index + potential_parent->child_count;
for (int visit_index = potential_parent->child_index; visit_index < upper_bound; visit_index++) { for (int visit_index = potential_parent->child_index; visit_index < upper_bound; visit_index++) {
if (armature_bonecoll_is_decendent_of(armature, visit_index, potential_decendent_index)) { if (armature_bonecoll_is_descendant_of(armature, visit_index, potential_descendant_index)) {
return true; return true;
} }
} }

View File

@ -106,7 +106,7 @@ class BoneCollectionDropTarget : public TreeViewItemDropTarget {
} }
/* Do not allow dropping onto its own descendants. */ /* Do not allow dropping onto its own descendants. */
if (armature_bonecoll_is_decendent_of( if (armature_bonecoll_is_descendant_of(
drag_arm_bcoll->armature, drag_arm_bcoll->bcoll_index, drop_bonecoll_.bcoll_index)) drag_arm_bcoll->armature, drag_arm_bcoll->bcoll_index, drop_bonecoll_.bcoll_index))
{ {
*r_disabled_hint = "Cannot drag a collection onto a descendent"; *r_disabled_hint = "Cannot drag a collection onto a descendent";

View File

@ -2287,8 +2287,8 @@ void GRAPH_OT_push_pull(wmOperatorType *ot)
* \{ */ * \{ */
static const EnumPropertyItem scale_anchor_items[] = { static const EnumPropertyItem scale_anchor_items[] = {
{int(FCurveSegmentAnchor::LEFT), "LEFT", 0, "From Left", "foo"}, {int(FCurveSegmentAnchor::LEFT), "LEFT", 0, "From Left", ""},
{int(FCurveSegmentAnchor::RIGHT), "RIGHT", 0, "From Right", "foo"}, {int(FCurveSegmentAnchor::RIGHT), "RIGHT", 0, "From Right", ""},
{0, nullptr, 0, nullptr, nullptr}, {0, nullptr, 0, nullptr, nullptr},
}; };

View File

@ -116,7 +116,7 @@ void create_skel_roots(pxr::UsdStageRefPtr stage, const USDExportParams &params)
RPT_WARNING, RPT_WARNING,
"%s: Couldn't find a common Xform ancestor for skinned prim %s " "%s: Couldn't find a common Xform ancestor for skinned prim %s "
"and skeleton %s to convert to a USD SkelRoot. " "and skeleton %s to convert to a USD SkelRoot. "
"This can be addressed by setting a root primitive in the export options.\n", "This can be addressed by setting a root primitive in the export options",
__func__, __func__,
prim.GetPath().GetAsString().c_str(), prim.GetPath().GetAsString().c_str(),
skel.GetPath().GetAsString().c_str()); skel.GetPath().GetAsString().c_str());

View File

@ -282,9 +282,9 @@ static void rna_BoneCollection_parent_set(PointerRNA *ptr,
const int to_parent_index = armature_bonecoll_find_index(armature, to_parent); const int to_parent_index = armature_bonecoll_find_index(armature, to_parent);
if (to_parent_index == from_bcoll_index || if (to_parent_index == from_bcoll_index ||
armature_bonecoll_is_decendent_of(armature, from_bcoll_index, to_parent_index)) armature_bonecoll_is_descendant_of(armature, from_bcoll_index, to_parent_index))
{ {
BKE_report(reports, RPT_ERROR, "Cannot make a bone collection a decendent of itself"); BKE_report(reports, RPT_ERROR, "Cannot make a bone collection a descendant of itself");
return; return;
} }