Fix poser failure because of incorrect translated rig bone name in Simplified Chinese.

master
Jeremy Hu 2019-07-29 17:33:35 +09:30
parent fe49613d3b
commit 7a12f78984
3 changed files with 17 additions and 1 deletions

View File

@ -639,5 +639,5 @@ QString AnimalRigger::namingConnector(const QString &spineName, const QString &c
QString AnimalRigger::namingChainPrefix(const QString &baseName, SkeletonSide side, int orderInSide, int totalInSide)
{
return SkeletonSideToDispName(side) + baseName + (totalInSide == 1 ? QString() : QString::number(orderInSide));
return SkeletonSideToString(side) + baseName + (totalInSide == 1 ? QString() : QString::number(orderInSide));
}

View File

@ -2,6 +2,7 @@
#include "skeletonside.h"
IMPL_SkeletonSideToDispName
IMPL_SkeletonSideToString
SkeletonSide SkeletonSideFromBoneName(const QString &boneName)
{

View File

@ -24,6 +24,21 @@ QString SkeletonSideToDispName(SkeletonSide side) \
return ""; \
} \
}
QString SkeletonSideToString(SkeletonSide side);
#define IMPL_SkeletonSideToString \
QString SkeletonSideToString(SkeletonSide side) \
{ \
switch (side) { \
case SkeletonSide::Left: \
return "Left"; \
case SkeletonSide::Right: \
return "Right"; \
case SkeletonSide::None: \
return ""; \
default: \
return ""; \
} \
}
SkeletonSide SkeletonSideFromBoneName(const QString &boneName);
#endif