diff options
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 150 |
1 files changed, 0 insertions, 150 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index ac1f3c312d1..bc81817647e 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -25,7 +25,6 @@ #include "MEM_guardedalloc.h" -#include "DNA_armature_types.h" #include "DNA_gpencil_types.h" #include "DNA_mask_types.h" #include "DNA_mesh_types.h" @@ -859,155 +858,6 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm } } -static void transform_mode_init(TransInfo *t, wmOperator *op, int mode) -{ - t->mode = mode; - - switch (mode) { - case TFM_TRANSLATION: - initTranslation(t); - break; - case TFM_ROTATION: - initRotation(t); - break; - case TFM_RESIZE: - initResize(t); - break; - case TFM_SKIN_RESIZE: - initSkinResize(t); - break; - case TFM_TOSPHERE: - initToSphere(t); - break; - case TFM_SHEAR: - initShear(t); - break; - case TFM_BEND: - initBend(t); - break; - case TFM_SHRINKFATTEN: - initShrinkFatten(t); - break; - case TFM_TILT: - initTilt(t); - break; - case TFM_CURVE_SHRINKFATTEN: - initCurveShrinkFatten(t); - break; - case TFM_MASK_SHRINKFATTEN: - initMaskShrinkFatten(t); - break; - case TFM_GPENCIL_SHRINKFATTEN: - initGPShrinkFatten(t); - break; - case TFM_TRACKBALL: - initTrackball(t); - break; - case TFM_PUSHPULL: - initPushPull(t); - break; - case TFM_CREASE: - initCrease(t); - break; - case TFM_BONESIZE: { /* used for both B-Bone width (bonesize) as for deform-dist (envelope) */ - /* Note: we have to pick one, use the active object. */ - TransDataContainer *tc = TRANS_DATA_CONTAINER_FIRST_OK(t); - bArmature *arm = tc->poseobj->data; - if (arm->drawtype == ARM_ENVELOPE) { - initBoneEnvelope(t); - t->mode = TFM_BONE_ENVELOPE_DIST; - } - else { - initBoneSize(t); - } - break; - } - case TFM_BONE_ENVELOPE: - initBoneEnvelope(t); - break; - case TFM_BONE_ENVELOPE_DIST: - initBoneEnvelope(t); - t->mode = TFM_BONE_ENVELOPE_DIST; - break; - case TFM_EDGE_SLIDE: - case TFM_VERT_SLIDE: { - const bool use_even = (op ? RNA_boolean_get(op->ptr, "use_even") : false); - const bool flipped = (op ? RNA_boolean_get(op->ptr, "flipped") : false); - const bool use_clamp = (op ? RNA_boolean_get(op->ptr, "use_clamp") : true); - if (mode == TFM_EDGE_SLIDE) { - const bool use_double_side = (op ? !RNA_boolean_get(op->ptr, "single_side") : true); - initEdgeSlide_ex(t, use_double_side, use_even, flipped, use_clamp); - } - else { - initVertSlide_ex(t, use_even, flipped, use_clamp); - } - break; - } - case TFM_BONE_ROLL: - initBoneRoll(t); - break; - case TFM_TIME_TRANSLATE: - initTimeTranslate(t); - break; - case TFM_TIME_SLIDE: - initTimeSlide(t); - break; - case TFM_TIME_SCALE: - initTimeScale(t); - break; - case TFM_TIME_DUPLICATE: - /* same as TFM_TIME_EXTEND, but we need the mode info for later - * so that duplicate-culling will work properly - */ - if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_NLA)) { - initTranslation(t); - } - else { - initTimeTranslate(t); - } - t->mode = mode; - break; - case TFM_TIME_EXTEND: - /* now that transdata has been made, do like for TFM_TIME_TRANSLATE (for most Animation - * Editors because they have only 1D transforms for time values) or TFM_TRANSLATION - * (for Graph/NLA Editors only since they uses 'standard' transforms to get 2D movement) - * depending on which editor this was called from - */ - if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_NLA)) { - initTranslation(t); - } - else { - initTimeTranslate(t); - } - break; - case TFM_BAKE_TIME: - initBakeTime(t); - break; - case TFM_MIRROR: - initMirror(t); - break; - case TFM_BWEIGHT: - initBevelWeight(t); - break; - case TFM_ALIGN: - initAlign(t); - break; - case TFM_SEQ_SLIDE: - initSeqSlide(t); - break; - case TFM_NORMAL_ROTATION: - initNormalRotation(t); - break; - case TFM_GPENCIL_OPACITY: - initGPOpacity(t); - break; - } - - /* TODO(germano): Some of these operations change the `t->mode`. - * This can be bad for Redo. - * BLI_assert(t->mode == mode); */ -} - int transformEvent(TransInfo *t, const wmEvent *event) { char cmode = constraintModeToChar(t); |