Skip to content

Help with the Layer Space Transforms utility. #4

@lednevandrey04

Description

@lednevandrey04

The scene has two layers "Yellow Solid" and "Red Solid". The "Yellow Solid" layer is linked to "Camera 1" which changes its position during the animation.

https://drive.google.com/file/d/16J9kevOdd5XtL7IFiqYtYcL8yWCUzxoP/view?usp=sharing

I want to get the coordinates of the "Yellow Solid" layer, in world space, and assign the resulting value to the position of the "Red Solid" layer. For this I wrote a script.


// @include "E:/Progs/adobe/Scripts/AE/LST.js";
app.beginUndoGroup("U");
var destComp = app.project.item(1);
destComp.openInViewer();
var result = LST.toWorld(destComp.layer(2));
destComp.layer(1).Position.setValue(result);

But this did not give the desired result.
What's my mistake ???

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions