Skip to main content
Nik Ska
Known Participant
December 21, 2013
Question

Proper puppet pin creation with scripts

  • December 21, 2013
  • 0 replies
  • 750 views

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.

Here's the code

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])

Here's what I get.

Above is the pin created manually, below - with the script. Mesh seems to be disabled and pin position is not shown in the viewport

UPD

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?"

This topic has been closed for replies.