Copy link to clipboard
Copied
Is it possible to use an if/else statement to ignore an expression and use its "value" if it doesn't have a parent layer?
I'm attempting to build a template that utilizes multiple text layers where, if a checkbox is enabled, then that text layer will automatically adjust positioning based on other text layers in the layer stack. I have it setup to look at several variables like the text box height of other text layers or its own layer, font sizes, and any additional values controlled by sliders. At the moment, all of these text layers are parented to a null layer to establish the starting position. On rare occasions, I might want to remove a text layer from that layer stack so that I can manually position it. It would also be nice to supress the expression error since it wouldn't have a parent layer.
Like this, I think:
if (hasParent){
// your expression here
}else{
value
}
Copy link to clipboard
Copied
Like this, I think:
if (hasParent){
// your expression here
}else{
value
}
Copy link to clipboard
Copied
Wow, definitely was overthinking that one. Thank you Dan!