From 3b57f075a8031d2fc0e58f4f28ed060832065b0b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 17 Jun 2015 12:30:30 +0200 Subject: Fix (unreported) redo of 'bone envelope distance resize' transform op not working (it would behave like 'bone envelope resize' instead). Issue comes from the fact this transform op shares some common points with both BoneResize and BoneEnvelope operations. However, trying to re-use `TFM_BONE_ENVELOPE` itself in this case is bad idea, since this mode gets stored in transform op and is directly re-used for redo, by-passing the whole init phase that shall be done in `TFM_BONESIZE` mode... So now, we add a real new mode, `TFM_BONE_ENVELOPE_DIST`, while keeping most of existing code and all existing behavior. This is slightly hackish - but was already anyway, and avoids creating a full new set of function for pretty much the same thing. As a side note, also makes it possible to resize envelope distance outside of envelope viewing mode (from py or by adding a custom shortcut). --- source/blender/editors/transform/transform_ops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/transform/transform_ops.c') diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index e119ec66321..013e47886eb 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -141,6 +141,7 @@ EnumPropertyItem transform_mode_types[] = {TFM_MIRROR, "MIRROR", 0, "Mirror", ""}, {TFM_BONESIZE, "BONE_SIZE", 0, "Bonesize", ""}, {TFM_BONE_ENVELOPE, "BONE_ENVELOPE", 0, "Bone_Envelope", ""}, + {TFM_BONE_ENVELOPE_DIST, "BONE_ENVELOPE_DIST", 0, "Bone_Envelope_Distance", ""}, {TFM_CURVE_SHRINKFATTEN, "CURVE_SHRINKFATTEN", 0, "Curve_Shrinkfatten", ""}, {TFM_MASK_SHRINKFATTEN, "MASK_SHRINKFATTEN", 0, "Mask_Shrinkfatten", ""}, {TFM_GPENCIL_SHRINKFATTEN, "GPENCIL_SHRINKFATTEN", 0, "GPencil_Shrinkfatten", ""}, -- cgit v1.2.3