temporarily change the pivot, scale, pivot back

this code in Update()
с#:

Quaternion tmpPivotCalf;
Quaternion tmpPivotLeg;
    
tmpPivotLeg = legLeft.transform.rotation;
tmpPivotCalf = legCalfLeft.transform.rotation;
    
legCalfLeft.transform.rotation = tmpPivotCalf;
legCalfLeft.transform.rotation = legLeft.transform.rotation;
legCalfLeft.transform.localScale = new Vector3 (1/scaleHipVar,1/scaleHipVar,1);
legCalfRight.transform.localScale = new Vector3 (1/scaleHipVar,1/scaleHipVar,1);
legCalfLeft.transform.rotation = tmpPivotCalf; 
// without this work perfect, with this not take effect legCalfLeft.transform.rotation = legLeft.transform.rotation;

partly solved. I divided the hip bone in cinema4d, 2 part of hip size of 0.001. And after scaling hip, reverse scale hipDummy. leg not skewed because the same pivot coordinates