diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-22 20:05:51 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-22 20:43:51 +0300 |
commit | a958725f814ff6f223950e63a2b3fb8e40a3388c (patch) | |
tree | c28023ba1067749531e3d6bedf40273f531742c6 /source/blender | |
parent | 3bc15c097c6492559d416a4eafecb7e6936a80b8 (diff) |
Fix unused parameter `ftext`
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index d13fa6de7c5..a3fb09f3edf 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -654,40 +654,42 @@ void setLocalConstraint(TransInfo *t, int mode, const char text[]) */ void setUserConstraint(TransInfo *t, short orientation, int mode, const char ftext[]) { + char text[256]; const char *spacename = transform_orientations_spacename_get(t, orientation); + BLI_snprintf(text, sizeof(text), ftext, spacename); switch (orientation) { case V3D_ORIENT_GLOBAL: { - setConstraint(t, mode, spacename); + setConstraint(t, mode, text); break; } case V3D_ORIENT_LOCAL: - setLocalConstraint(t, mode, spacename); + setLocalConstraint(t, mode, text); break; case V3D_ORIENT_NORMAL: if (checkUseAxisMatrix(t)) { - setAxisMatrixConstraint(t, mode, spacename); + setAxisMatrixConstraint(t, mode, text); } else { - setConstraint(t, mode, spacename); + setConstraint(t, mode, text); } break; case V3D_ORIENT_VIEW: - setConstraint(t, mode, spacename); + setConstraint(t, mode, text); break; case V3D_ORIENT_CURSOR: - setConstraint(t, mode, spacename); + setConstraint(t, mode, text); break; case V3D_ORIENT_GIMBAL: - setConstraint(t, mode, spacename); + setConstraint(t, mode, text); break; case V3D_ORIENT_CUSTOM_MATRIX: - setConstraint(t, mode, spacename); + setConstraint(t, mode, text); break; case V3D_ORIENT_CUSTOM: default: { BLI_assert(orientation >= V3D_ORIENT_CUSTOM); - setConstraint(t, mode, spacename); + setConstraint(t, mode, text); break; } } |