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

Expressions Question: Parent One X Transform Property to Another

Engaged ,
Mar 31, 2022 Mar 31, 2022

Copy link to clipboard

Copied

Hey all,

 

Another one from my probably-so-simple-it's-silly file, but here's what I've got.

In one comp, I have an object whose transform properties are split so that X and Y are their own separate properties. In another, I have another object whose X and Y are together like normal.

What I'm looking to do is pretty simple, at least to explain: I want to parent the X property from the separate object to the X property in the one that's not, and same for the Y properties. (Yes I know the easiest answer would be to split the parent object, but I can't do that because this parent has a bunch of children, this one just happens to have a unique requirement.)

This is the expression that I've got on all the other children in the matched sets that have X and Y together:

"comp("1x2_300px").layer("Name 1 Name 2").transform.position"

With this expression it's easy because all the child has to do is inherit both X and Y properties and map them to its own. But when I apply this expression to the separated X and Y properties I get an error: "Must be of dimension 1, not 2."

Help???

TOPICS
Expressions , How to

Views

106

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Mar 31, 2022 Mar 31, 2022

for x:

comp("1x2_300px").layer("Name 1 Name 2").transform.position[0]

for y:

comp("1x2_300px").layer("Name 1 Name 2").transform.position[1]

 

 

Votes

Translate

Translate
Community Expert ,
Mar 31, 2022 Mar 31, 2022

Copy link to clipboard

Copied

for x:

comp("1x2_300px").layer("Name 1 Name 2").transform.position[0]

for y:

comp("1x2_300px").layer("Name 1 Name 2").transform.position[1]

 

 

Votes

Translate

Translate

Report

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
Engaged ,
Mar 31, 2022 Mar 31, 2022

Copy link to clipboard

Copied

LATEST

Dan Ebberts for the win! As always I greatly appreciate it.

Votes

Translate

Translate

Report

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