From 8bc234cbff31ed1dfb8c4761e0be2226b9654fbf Mon Sep 17 00:00:00 2001 From: Ben Batt Date: Thu, 1 Feb 2007 03:34:09 +0000 Subject: [PATCH] Bugfix for #5896 - Array constant offset not behaving as expected This is not a bug, but rather a misunderstanding of the relationship between object scaling and the Array modifier's constant offset. The Array modifier's constant offset is specified in local coordinates. In the supplied blend file, the object is scaled up in the x direction by 2.45, and the offset is a constant 2.5 in the x direction. Thus, the final world space offset is 2.45 * 2.5 = 6.125 units in the object's local x direction, as can be seen in the blend file. I have updated the tooltips for the Array modifier to indicate that offsets are given in local coordinates. I will investigate providing a "Use World Coordinates" toggle button after release. --- source/blender/src/buttons_editing.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 1259f7ae27a..ffeab8bdd36 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1874,22 +1874,26 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiDefButBitI(block, TOG, MOD_ARR_OFF_CONST, B_MODIFIER_RECALC, "Constant Offset", lx, (cy-=19), halfwidth, 19, &amd->offset_type, 0, 0, 0, 0, - "Constant offset between duplicates"); + "Constant offset between duplicates " + "(local coordinates)"); uiDefButF(block, NUM, B_MODIFIER_RECALC, "X:", lx, (cy-=19), halfwidth, 19, &amd->offset[0], -range, range, 10, 3, - "Constant component for duplicate offsets"); + "Constant component for duplicate offsets " + "(local coordinates)"); uiDefButF(block, NUM, B_MODIFIER_RECALC, "Y:", lx, (cy-=19), halfwidth, 19, &amd->offset[1], -range, range, 10, 3, - "Constant component for duplicate offsets"); + "Constant component for duplicate offsets " + "(local coordinates)"); uiDefButF(block, NUM, B_MODIFIER_RECALC, "Z:", lx, (cy-=19), halfwidth, 19, &amd->offset[2], -range, range, 10, 3, - "Constant component for duplicate offsets"); + "Constant component for duplicate offsets " + "(local coordinates)"); uiBlockEndAlign(block); cy= cytop; @@ -1897,22 +1901,26 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiDefButBitI(block, TOG, MOD_ARR_OFF_RELATIVE, B_MODIFIER_RECALC, "Relative Offset", halflx, (cy-=19), halfwidth, 19, &amd->offset_type, 0, 0, 0, 0, - "Offset between duplicates relative to object width"); + "Offset between duplicates relative to object width " + "(local coordinates)"); uiDefButF(block, NUM, B_MODIFIER_RECALC, "X:", halflx, (cy-=19), halfwidth, 19, &amd->scale[0], -range, range, 10, 3, - "Component for duplicate offsets relative to object width"); + "Component for duplicate offsets relative to object " + "width (local coordinates)"); uiDefButF(block, NUM, B_MODIFIER_RECALC, "Y:", halflx, (cy-=19), halfwidth, 19, &amd->scale[1], -range, range, 10, 3, - "Component for duplicate offsets relative to object width"); + "Component for duplicate offsets relative to object " + "width (local coordinates)"); uiDefButF(block, NUM, B_MODIFIER_RECALC, "Z:", halflx, (cy-=19), halfwidth, 19, &amd->scale[2], -range, range, 10, 3, - "Component for duplicate offsets relative to object width"); + "Component for duplicate offsets relative to object " + "width (local coordinates)"); uiBlockEndAlign(block); /* vertex merging parameters */