Nicholas Deines
Forum Replies Created
-
Nicholas Deines
March 25, 2021 at 7:11 pm in reply to: Creating a calendar template with Essential Graphics drop-down menusI have more variables in the calendar that rapidly multiply the number of potential results. Doing this with expressions is much more desirable for my end users.
I got the code to work. I had write individual if/else statements for the “dropMonth” values. I can’t figure out why it didn’t like the values when separated by commas.
dropMonth = thisComp.layer(“Master Controller”).effect(“Month”)(“Menu”).value;
startdayMenu = thisComp.layer(“Master Controller”).effect(“Start Day”)(“Menu”).value;
date = [31, 30, 29, 28, 27, 26, 25]
date2 = [“”, 30, 29, 28, 27, 26, 25]
date3 = [“”, “”, “”, 28, 27, 26, 25]
date4 = [“”, “”, 29, 28, 27, 26, 25]
if(dropMonth == 1) {
date [startdayMenu – 1];
}else if (dropMonth == 3) {
date [startdayMenu – 1];
}else if (dropMonth == 5) {
date [startdayMenu – 1];
}else if (dropMonth == 7) {
date [startdayMenu – 1];
}else if (dropMonth == 8) {
date [startdayMenu – 1];
}else if (dropMonth == 10) {
date [startdayMenu – 1];
}else if (dropMonth == 12) {
date [startdayMenu – 1];
}else if (dropMonth == 4) {
date2 [startdayMenu – 1];
}else if (dropMonth == 6) {
date2 [startdayMenu – 1];
}else if (dropMonth == 9) {
date2 [startdayMenu – 1];
}else if (dropMonth == 11) {
date2 [startdayMenu – 1];
}else if (dropMonth == 2){
date3 [startdayMenu – 1];
}else if (dropMonth == 13){
date4 [startdayMenu – 1];
}
-
Nicholas Deines
March 25, 2021 at 7:07 pm in reply to: Creating a calendar template with Essential Graphics drop-down menusI got my code to work. For some reason, I had to separate the “dropMonth” values into thirteen if/else statements, each one dedicated to a single value. I’m still not sure why the comas in the original code didn’t work. Any ideas?
dropMonth = thisComp.layer(“Master Controller”).effect(“Month”)(“Menu”).value;
startdayMenu = thisComp.layer(“Master Controller”).effect(“Start Day”)(“Menu”).value;
date = [31, 30, 29, 28, 27, 26, 25]
date2 = [“”, 30, 29, 28, 27, 26, 25]
date3 = [“”, “”, “”, 28, 27, 26, 25]
date4 = [“”, “”, 29, 28, 27, 26, 25]
if(dropMonth == 1) {
date [startdayMenu – 1];
}else if (dropMonth == 3) {
date [startdayMenu – 1];
}else if (dropMonth == 5) {
date [startdayMenu – 1];
}else if (dropMonth == 7) {
date [startdayMenu – 1];
}else if (dropMonth == 8) {
date [startdayMenu – 1];
}else if (dropMonth == 10) {
date [startdayMenu – 1];
}else if (dropMonth == 12) {
date [startdayMenu – 1];
}else if (dropMonth == 4) {
date2 [startdayMenu – 1];
}else if (dropMonth == 6) {
date2 [startdayMenu – 1];
}else if (dropMonth == 9) {
date2 [startdayMenu – 1];
}else if (dropMonth == 11) {
date2 [startdayMenu – 1];
}else if (dropMonth == 2){
date3 [startdayMenu – 1];
}else if (dropMonth == 13){
date4 [startdayMenu – 1];
}
-
Nicholas Deines
March 22, 2021 at 10:00 pm in reply to: Creating a calendar template with Essential Graphics drop-down menusThanks, Walter. I’ll check it out.
-
Nicholas Deines
March 22, 2021 at 8:01 pm in reply to: Creating a calendar template with Essential Graphics drop-down menusThis is a tool for several users. I’m trying to make things as easy as possible.
-
Thanks, Andrei! I actually figured that out yesterday after I posted the question.
-
I was trying to do between 1 and 59. I was trying to figure out how to do that.
-
Okay, I didn’t know about “else if”. Thanks!
-
Sorry for the delay. Got real busy with work. Thanks for the reply, Scott! Very illuminating.
-
Thanks again for your help, Scott! I think I’ve got it doing what I want. But I want to make sure I understand what I’m doing.
In the code below, “f” is just a variable that you are defining, right? So I could change that to “l” for “lightness” as long as I multiple hsl[2] by “l”, right?
Also, when you type ” // lightness factor” is that just a label for yourself to keep things straight?
c = thisComp.layer(“Color”).effect(“Fill”)(“Color”)
f = .25; // lightness factor
hsl = rgbToHsl(c);
hslToRgb([hsl[0],hsl[1],hsl[2]*f,hsl[3]]) -
Thanks much for the reply, Scott. Do you know if it’s possible to control other like brightness, saturation, and hue?