• 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 ,
Sep 24, 2023 Sep 24, 2023

Copy link to clipboard

Copied

Hello, looking for help on the error found in the title. Following a guide which i've linked below, so not sure how to resolve. Other threads similar to this have had custom solutions. 

Tutorial: https://www.youtube.com/watch?v=qlKOWc81obU&ab_channel=aescripts%2Baeplugins 

Any help appriciated. 
Thank you

Screenshot 2023-09-24 at 22.19.58.png

TOPICS
Error or problem , Expressions

Views

222

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
Community Expert ,
Sep 24, 2023 Sep 24, 2023

Copy link to clipboard

Copied

It's hard to tell from your screen shot, but do you have the whole expression? The part that's visible ends with connecting the controller variable to the slider. If you end the expression there, you will indeed get that error message because controller is one-dimensional. If you add the rest of the expression (or even just the next line), you should end up with a 2-dimensional value and the error should disappear. Hope that helps.

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 ,
Sep 25, 2023 Sep 25, 2023

Copy link to clipboard

Copied

Hello @Dan Ebberts thank you for replying. I stopped there because i thought the error wouldn't allow me to move on. But i'll complete today and see if it works. 

Thank you for you reply.

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 ,
Sep 25, 2023 Sep 25, 2023

Copy link to clipboard

Copied

Hey @Dan Ebberts, just input the full expression and still getting some errors. Screen shot and expression code is below. Any help would be great thank you. 

 

Expression: 

rank = thisProperty.propertyGroup(2).propertyIndex;

numberObjects = thisProperty.propertyGroup(3).numProperties;

positionOnPath = rank/numberObjects;

 

Position1 = thisComp.layer("S Outlines").mask("S").maskPath.pointOnPath(percentage = positionOnPath, t = time) Position2 = thisComp.layer("H Outlines").mask("H").maskPath.pointOnPath(percentage = positionOnPath, t = time) Position3 = thisComp.layer("I Outlines").mask("I").maskPath.pointOnPath(percentage = positionOnPath, t = time) Position4 = thisComp.layer("F Outlines").mask("F").maskPath.pointOnPath(percentage = positionOnPath, t = time) Position5 = thisComp.layer("T Outlines").mask("T").maskPath.pointOnPath(percentage = positionOnPath, t = time)

 

controler = effect("Slider Control")("Slider").value;

linear(controler,0,100,Position1,Position2,Position3,Position4,Position5);

 


Screenshot 2023-09-25 at 10.30.13.png

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
Community Expert ,
Sep 25, 2023 Sep 25, 2023

Copy link to clipboard

Copied

You'd use linear() to interpolate between two positions. It's not going to work if you stick 5 positions in there.

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
Community Expert ,
Sep 25, 2023 Sep 25, 2023

Copy link to clipboard

Copied

LATEST

If you wanted to morph through 5 positions as the controler slider goes from 0 to 100, you could replace your last line with something like this:

if (controler < 25){
  linear(controler,0,25,Position1,Position2);
}else if (controler < 50){
  linear(controler,25,50,Position2,Position3);
}else if (controler < 75){
  linear(controler,50,75,Position3,Position4);
}else{
  linear(controler,75,100,Position4,Position5);
}

but you'd probably need to do somethg about the Wiggly Selector keyframes for it to make sense.

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