Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Proper puppet pin creation with scripts

Explorer ,
Dec 21, 2013 Dec 21, 2013

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.

Screenshot 2013-12-21 16.06.17.png

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

TOPICS
Scripting
711
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation