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

expression result must be of dimension 2 not 1

New Here ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

when i want to use expression linear to scale composition flow slider of both channels extract from music,  how can i fix it

Chưa có tên.png

TOPICS
Expressions

Views

780

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

Advocate , Jan 12, 2021 Jan 12, 2021

Basically, the scale property expects an array of 2 values - x and y, as in [x, y];

However, your slider returns only a single value, therefore AE throws an error. The easiest way to solve it would be to assign your slider value to some variable and then pass that variable twice as the result in the expression, similar to what @Mylenium has said. So something like this should do the trick:

let amp = linear(thisComp <... the rest of your slider expression ... >) ;
[amp, amp];

 

Votes

Translate

Translate
LEGEND ,
Jan 12, 2021 Jan 12, 2021

Copy link to clipboard

Copied

It means what it says. You might want to read up on expression basics. The immediate solution is simple:

 

mScale=linear(-your code here-)

 

[mScale, mScale]

 

Mylenium

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
New Here ,
Jan 12, 2021 Jan 12, 2021

Copy link to clipboard

Copied

LATEST

thank you so much i"ve fixed 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
Advocate ,
Jan 12, 2021 Jan 12, 2021

Copy link to clipboard

Copied

Basically, the scale property expects an array of 2 values - x and y, as in [x, y];

However, your slider returns only a single value, therefore AE throws an error. The easiest way to solve it would be to assign your slider value to some variable and then pass that variable twice as the result in the expression, similar to what @Mylenium has said. So something like this should do the trick:

let amp = linear(thisComp <... the rest of your slider expression ... >) ;
[amp, amp];

 

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