Hi Stephane, you simply can’t move a puppet pin after it has been placed. Moving it is always distortion, never “relocating”, that’s just how the effect was coded.
What I meant was, you create a new puppet pin effect, and click/create the puppet pins on your new layer in the same order. Your reference image could be dots on the face with a number besides it so you know it what order to create them.
Then each new puppet can get an expression something like:
var refPuppetMesh = thisComp.layer("reference animation").effect("Puppet").arap.mesh("Mesh 1");
var thisPuppetMesh = thisProperty.propertyGroup(3);
var myPinNr = thisProperty.propertyGroup(1).propertyIndex;
var scaling =
length(thisPuppetMesh.deform(1).position, thisPuppetMesh.deform(2).position)
/
length(refPuppetMesh.deform(1).position, refPuppetMesh.deform(2).position);
var pos = refPuppetMesh.deform(myPinNr).position;
value + (pos.value-pos.valueAtTime(0))*scaling;
Note that I added some scaling, if puppet point 1 and 2 are for example two pupils, then it will give a good indication of the scale of the face in each particular portrait, because just copying the relative position would exaggerate the effect more on smaller meshes of photos with smaller faces.
Something similar could be done for when the photos are not all exactly level, but that’s more complicated, essentially converting all pin positions to polar coordinates. Depends on how “normalized” your input photos are.