Adam Zygadlo
Forum Replies Created
-
Hey Dan,
Hope you are well and keeping yourself safe.I tried that code after looking at other posts on the forum but it was not working but after tweaking and reading the line of code again, it seemed to work now.
In fact, I believe it wasn’t working as I was using the light layers instead of nulls. Good to know this fact.
Thank you again for your support,
Take care,
AddzAdam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
Hey Dan,
Thank you very much, that did the trick. I had to switch A and B in the last line of code, around in order to bend the elbow in the correct way to the label.
a = thisComp.layer("Joint A").position;
c = thisComp.layer("Joint C (Point)").position;
d = a - c;
x = Math.abs(d[1])*Math.tan(Math.PI/4);
[c[0]-x,a[1]]
Apart from that, it’s perfect and it will help save a small amount of time when producing 100’s of labels. Thank you Dan, you are a genius with code.
All the best until next time,
Cheers,
AddzAdam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
Thank you Dan. The expression looks so much cleaner. Defo will save this line of code for future projects but I’ll stick to my version for now. ;^)
Thanks again to everyone!
Cheer,
AddzAdam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
Awesome, I have solved the original problem as well as the new issue when introducing new expressions.
Basically, I added another slider control between the text layer to the main slider to round up the number. Here’s a breakdown to the expressions, etc.
Text Layer: Source
n = 0+effect(“Slider Control”)(“Slider”);
s = “” + n;
str = s.substr(-s.length, (s.length-1)%3 +1);
for (i = Math.floor((s.length-1)/3); i > 0; i–){
str += “,” + s.substr(-i*3,3);
}
strThe code above links to the new slider, which is applied to the text layer:
n = comp(“LINK TO MAIN SLIDER”);
d = 1;
Math.round(n*d)/d;I am pretty sure there’s a simpler way to get this expression but I am happy that I have solved it myself. :^D
Thank you!
AddzAdam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
Alright, I spent some time browsing on this forum, find a great expressions from Dan Ebberts (https://forums.creativecow.net/readpost/227/16453) which that did the trick.
n = 0+comp(“LINK TO SLIDER”);
s = “” + n;
str = s.substr(-s.length, (s.length-1)%3 +1);
for (i = Math.floor((s.length-1)/3); i > 0; i–){
str += “,” + s.substr(-i*3,3);
}
strHowever, it has now caused another problem where the numbers goes all werid like ‘9,234,6.6,875’. Ideally, it would be great to round up the number to 91,607. :^)
Adam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
Thank you Dan… It’s funny how easy to code, once we know how to do it! Didn’t realise I could use the if/else command for this but it makes all sense! Thank you again!
Adam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
If the project only needed one frame of the pile of paper, then my code would be ideal; however it changes position while scrubbing through the timeline. Nice effect but not desired! Oops!
After looking around, I tweaked the code around and told it to hold on a couple of frames but your suggested code is cleaner. :^)
Thank you Xavier for that!
period = 1000; // frames
posterizeTime(1/(period*thisComp.frameDuration));Adam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
Okay, I’ve solved the wiggling issue and adjusted the code.
Cheers,
+ZmaxX = 50; // Setup Max range
minX = -50; // Setup MIn range
offset = -359; // This is to cancel out the default position of the Anchor Point
posterizeTime(1); // This stops the wiggling of the layer.slide = random(maxX,minX);
x = (slide-offset);[x,0]
Adam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
Okay, I had a little play this morning using other posts to understand some codes.
I am very close to to the desire effect but it’s wiggling around… I just want it to lock/clamp in position.I know it’s the ‘slide = random(maxX,minX);’ line of code isn’t right but not sure how to write it up.
Can anyone help?
Cheers,
+ZmaxX = 40;
minX = -40;
offset = -257; // Resets theslide = random(maxX,minX);
x = (slide-offset);[x,0]
Adam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’ -
Hey Rasmus,
I thought I share this as you helped out and see the effort gone into this idea – [Click here to view it]
Thank you very much!
+ZAdam Jozef Zygadlo
Motion Graphic Designer07708 124 915
http://www.jarbrain.com
‘Filled with brainy goodness.’