Copy link to clipboard
Copied
Hello.
I'm trying to write a script that will create a bunch of puppet pins on a layer, but I have stumbled into an unexpeceted problem - I just can't create it properly.
var selectedLayer = app.project.activeItem.selectedLayers[0];
var puppetEffect = selectedLayer.Effects.addProperty("ADBE FreePin3");
var ARAPGroup = puppetEffect.property("ADBE FreePin3 ARAP Group");
var meshGroup = ARAPGroup.property("ADBE FreePin3 Mesh Group");
var meshAtom = meshGroup.addProperty("ADBE FreePin3 Mesh Atom");
var posPins = meshAtom.property("ADBE FreePin3 PosPins");
var pinAtom = posPins.addProperty("ADBE FreePin3 PosPin Atom");
var thePin = pinAtom.property(3);
thePin.setValueAtTime(0, [0,0])

Above is the pin created manually, below - with the script. Mesh seems to be disabled and pin position is not shown in the viewport
In the end it seems that I need to set Vector Offset and Vector Index hidden properties for each pin, but those properties are read-only.
Maybve there's some command I can execute with app.executeCommand() that I'm not aware of?
UPD #2
It seems that setting proper Puppet pin programmatically is impossible. The only question left if "Why, Adobe? Why?"
Have something to add?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more