{"id":51687,"date":"2015-02-11T17:15:44","date_gmt":"2015-02-11T17:15:44","guid":{"rendered":"http:\/\/www.premiumbeat.com\/blog\/?p=51687"},"modified":"2015-02-11T21:39:37","modified_gmt":"2015-02-11T21:39:37","slug":"use-ifelse-statements-effects","status":"publish","type":"post","link":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/","title":{"rendered":"How to Write If\/Else Expressions in After Effects"},"content":{"rendered":"<h2 id=\"if-else-expressions-are-incredibly-useful-in-after-effectsif-you-know-how-to-use-them\">If\/Else expressions\u00a0are incredibly useful in After Effects&#8230;if you know how to use them.<\/h2>\n<p>You don&#8217;t have to be a computer programmer to get a handle on expressions in After Effects.\u00a0Let&#8217;s dig into the powerful <strong>If\/Else expression<\/strong>\u00a0in After Effects.<\/p>\n<h2 id=\"what-is-an-if-else-expression-in-after-effects\">What is an If\/Else Expression\u00a0in After Effects?<\/h2>\n<p>An <strong>If\/Else expression in After Effects<\/strong> is a line of code that will\u00a0change it&#8217;s output value based on the input value. If this sounds confusing, don&#8217;t worry! It&#8217;s simplier than you might think. Let&#8217;s take a look at a really basic model:<\/p>\n<p>In this example, the code states that if\u00a0the white shape&#8217;s opacity is more than 50% than the text opacity will be 100%. If the white squares opacity is less than 50% the text opacity will be 50%.<\/p>\n<p><a href=\"http:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/Text-If-Expression.gif\" data-wpel-link=\"external\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-51727\" src=\"https:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/Text-If-Expression.gif\" alt=\"Text If Expression\" width=\"762\" height=\"305\" \/><\/a><\/p>\n<p>Here&#8217;s what our After Effects timeline looks like for\u00a0this example:<\/p>\n<p><a href=\"http:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/Screen-Shot-2015-02-10-at-11.06.01-AM.png\" data-wpel-link=\"external\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-51728\" src=\"https:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/Screen-Shot-2015-02-10-at-11.06.01-AM-1024x90.png\" alt=\"If\/Else Timeline\" width=\"900\" height=\"79\" \/><\/a><\/p>\n<h2 id=\"how-to-write-an-if-else-conditional-expression\">How to Write an\u00a0If\/Else Conditional Expression<\/h2>\n<p>Writing an If\/Else statement is fairly straight forward. Simply open up your <strong>expression editor<\/strong> by holding down Option and\u00a0clicking on the stopwatch next to the parameter you want the If\/Else statement to effect. The expression\u00a0used in the example above is:<\/p>\n<p><strong>if(thisComp.layer(&#8220;WhiteShape&#8221;).transform.opacity&gt;50) 100 else 50<\/strong><\/p>\n<p>What do each of the parameters in this expression mean? Let&#8217;s \u00a0break them down step by step:<\/p>\n<p><a href=\"http:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/expressions-33.jpg\" data-wpel-link=\"external\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-51809 size-full\" src=\"https:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/expressions-33.jpg\" alt=\"If\/Else Expression After Effects\" width=\"943\" height=\"97\" srcset=\"https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg 943w, https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg?resize=300,31 300w, https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg?resize=768,79 768w, https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg?resize=277,28 277w, https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg?resize=359,37 359w, https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg?resize=543,56 543w, https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg?resize=865,89 865w, https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg?resize=560,58 560w, https:\/\/vip-go.premiumbeat.com\/wp-content\/uploads\/2015\/02\/expressions-33.jpg?resize=150,15 150w\" sizes=\"auto, (max-width: 943px) 100vw, 943px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3 id=\"1-declare-the-if-statement\">1.\u00a0Declare the &#8216;If&#8217; Statement<\/h3>\n<p>Write: if(<\/p>\n<h3 id=\"2-define-your-input-value\">2. Define Your Input Value<\/h3>\n<p>Using the pickwhip tool select the value you want to input into your If\/Else statement. For the example above, the\u00a0input value came from the opacity of the white shape. So in that example we would pickwhip to the opacity of the white shape.<\/p>\n<h3 id=\"3-set-your-equality-operator\">3. Set Your Equality Operator<\/h3>\n<p>An equality operator is essentially a small formula designed to tell your expression what to do. The following chart explains what equality operators you can use in\u00a0After Effects.<\/p>\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"8\">\n<tbody>\n<tr>\n<td align=\"left\" valign=\"top\" bgcolor=\"#E3E3E3\" height=\"30\"><strong>\u00a0 &lt;<\/strong><\/td>\n<td align=\"left\" valign=\"top\" bgcolor=\"#F4F4F4\" height=\"30\">\u00a0\u00a0Less Than<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" bgcolor=\"#E3E3E3\" height=\"30\"><b>\u00a0 &gt;<\/b><\/td>\n<td align=\"left\" valign=\"top\" bgcolor=\"#F4F4F4\" height=\"30\">\u00a0\u00a0Greater Than<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" bgcolor=\"#E3E3E3\" height=\"30\"><b>\u00a0 &lt;=<\/b><\/td>\n<td align=\"left\" valign=\"top\" bgcolor=\"#F4F4F4\" height=\"30\">\u00a0\u00a0Less Than or Equal To<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" bgcolor=\"#E3E3E3\" height=\"30\"><strong>\u00a0 &gt;=<\/strong><\/td>\n<td align=\"left\" valign=\"top\" bgcolor=\"#F4F4F4\" height=\"30\">\u00a0 Greater Than or Equal To<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" bgcolor=\"#E3E3E3\" height=\"30\"><strong>\u00a0 ==<\/strong><\/td>\n<td align=\"left\" valign=\"top\" bgcolor=\"#F4F4F4\" height=\"30\">\u00a0 Equals To<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For the above example we will use the greater than (&gt;) operator.<\/p>\n<p><em>Note: There are also more complex operators called &#8220;logical operators&#8221;. Due to their complexity we will cover those in a later\u00a0post. However, if you want to learn more check out the <a title=\"If Else Conditional From Motion Script\" href=\"if\/else%20Conditional Code\" target=\"_blank\" data-wpel-link=\"internal\">If\/Else Conditional post at MotionScript.com<\/a>.<\/em><\/p>\n<h3 id=\"4-define-your-conditional-value\">4. Define Your Conditional Value<\/h3>\n<p>The conditional value\u00a0can be any number you want. In our example the conditional value was 50.<\/p>\n<h3 id=\"5-close-the-parenthesis\">5. Close the Parenthesis<\/h3>\n<p>Write: <strong>)<\/strong><\/p>\n<h3 id=\"6-add-the-true-value\">6. Add the &#8220;true&#8221; value<\/h3>\n<p>Type in the value you want your expression to output if your conditional statement is true. Look at the example again&#8230;if the value of the square was in fact more than 50 (true) than our output value would be 100.<\/p>\n<h3 id=\"7-define-the-else-statement\">7. Define\u00a0the &#8216;Else&#8217; Statement<\/h3>\n<p>An else statement will define a value if the &#8220;if&#8221; statement is\u00a0false.\u00a0Write: <strong>Else<\/strong><\/p>\n<h3 id=\"8-add-the-false-value\">8. Add the False\u00a0value<\/h3>\n<p>The false value pertains to the value that will be output if the &#8220;if&#8221; statement isn&#8217;t true. In our example, if the opacity value of the shape was not greater than 50 (false) than the opacity of the text would be 50.<\/p>\n<h3 id=\"9-close-the-expression\">9. Close the Expression<\/h3>\n<p>Write: <strong>;<\/strong><\/p>\n<hr \/>\n<h2 id=\"how-can-i-use-if-else-expressions-in-after-effects\">How Can I Use If\/Else Expressions\u00a0in After Effects?<\/h2>\n<p>There are a number of different reasons why a motion graphic designer might want to use If\/Else statements in After Effects. Here are just a few.<\/p>\n<h3 id=\"value-based-conditionals\">Value Based\u00a0Conditionals<\/h3>\n<p>One of the most useful applications of an If\/Else statement in After Effects is to have\u00a0an object&#8217;s opacity directly linked to another type of value. For example, the\u00a0blinking box below\u00a0has an if statement that says if it&#8217;s rotation is greater than 180 than the value should be 0. If the value is less than 180 the value should be 100.<\/p>\n<p><a href=\"http:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/Rotation-If-Statments-in-After-Effects.gif\" data-wpel-link=\"external\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-51690 size-full\" src=\"https:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/Rotation-If-Statments-in-After-Effects.gif\" alt=\"Rotation If Statements in After Effects\" width=\"762\" height=\"305\" \/><\/a><\/p>\n<h3 id=\"if-else-conditionals-on-checkboxes\">If\/Else Conditionals\u00a0on Checkboxes<\/h3>\n<p>Checkboxes are typically used when creating templates for others to use in After Effects.\u00a0Typically checkboxes control opacity, but they can be used to manipulate other things like color or scale. Checkboxes work with<strong> If\/Else statements<\/strong> by declaring two values: one if the box is selected (1) and one if the box is not selected (0) using an else statement.<\/p>\n<p><em>To dive deeper check out\u00a0our &#8216;<a title=\"Linking Layers to Checkboxes\" href=\"http:\/\/www.premiumbeat.com\/blog\/after-effects-quick-tip-linking-layers-to-checkboxes\/\" target=\"_blank\" data-wpel-link=\"internal\">After Effects Quick Tip: Linking Layers to Checkboxes<\/a>&#8216; post.<\/em><\/p>\n<p><a href=\"http:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/On-off-example.gif\" data-wpel-link=\"external\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-51866\" src=\"https:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/On-off-example.gif\" alt=\"On\/Off Example\" width=\"762\" height=\"305\" \/><\/a><\/p>\n<h3 id=\"position-based-if-else-statements\">Position Based If\/Else Statements<\/h3>\n<p>One of the uses best uses that I&#8217;ve found for If statements in After Effects is linking layer opacity to an object&#8217;s position using an If\/Else statement. In short, using this method you can tell certain layers to turn &#8216;off&#8217; and &#8216;on&#8217; depending on where an\u00a0object\u00a0is currently positioned.<\/p>\n<p><a href=\"http:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/Position-Based-If-Statments-in-After-Effects.gif\" data-wpel-link=\"external\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-51688 size-full\" src=\"https:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/Position-Based-If-Statments-in-After-Effects.gif\" alt=\"Position Based If Statements in After Effects\" width=\"762\" height=\"305\" \/><\/a><\/p>\n<h3 id=\"resources\">Resources:<\/h3>\n<p>If you want to learn more about<strong> If\/Else statements or expressions in After Effects<\/strong> check out a few of the following resources:<\/p>\n<ul>\n<li><a title=\"If Else Conditional Code \" href=\"http:\/\/www.motionscript.com\/mastering-expressions\/language-beginning-4.html\" target=\"_blank\" data-wpel-link=\"external\">If\/Else Conditional Code<\/a> &#8211; MotionScript<\/li>\n<li><a title=\"PremiumBeat\" href=\"http:\/\/www.premiumbeat.com\/blog\/top-5-after-effects-expressions-for-better-designs\/\" target=\"_blank\" data-wpel-link=\"internal\">Top 5 After Effects Expressions for Better Designs<\/a> &#8211; PremiumBeat<\/li>\n<li><a title=\"PremiumBeat\" href=\"http:\/\/www.premiumbeat.com\/blog\/adobe-after-effect-fundamentals-lesson-8\/\" target=\"_blank\" data-wpel-link=\"internal\">After Effects Fundamentals Lesson 8: Expressions &amp; Presets <\/a>&#8211; PremiumBeat<\/li>\n<\/ul>\n<p><strong>How do you use If\/Else statements in After Effects?<\/strong> Share in the comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You don&#8217;t have to be an expression master to use if\/else statements in After Effects. We break down how and when to use them in the following \u2026<\/p>\n","protected":false},"author":24,"featured_media":51350,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[30,3291,39],"tags":[3734,3736,3735],"class_list":["post-class-post-51687","post-class-post","post-class-type-post","post-class-status-publish","post-class-format-standard","post-class-has-post-thumbnail","post-class-hentry","post-class-category-after-effects","post-class-category-motion-graphics-2","post-class-category-video-editing","post-class-tag-expressions-in-after-effects","post-class-tag-if-else-conditionals","post-class-tag-if-else-statements"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v18.5 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Use If\/Else Statements in After Effects<\/title>\n<meta name=\"description\" content=\"You don&#039;t have to be an expression master to use if\/else statements in After Effects. We break down when to use it in the following post.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Write If\/Else Expressions in After Effects\" \/>\n<meta property=\"og:description\" content=\"You don&#039;t have to be an expression master to use if\/else statements in After Effects. We break down when to use it in the following post.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/\" \/>\n<meta property=\"og:site_name\" content=\"The Beat: A Blog by PremiumBeat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/premiumbeat\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/CalebWardVideo\" \/>\n<meta property=\"article:published_time\" content=\"2015-02-11T17:15:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-02-11T21:39:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/after-effects-e1422898289579.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"409\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Caleb Ward\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@calebwward\" \/>\n<meta name=\"twitter:site\" content=\"@Premiumbeat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Caleb Ward\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/\"},\"author\":{\"name\":\"Caleb Ward\",\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/#\\\/schema\\\/person\\\/38e3f179e0bef658d5b6338bdfcd6deb\"},\"headline\":\"How to Write If\\\/Else Expressions in After Effects\",\"datePublished\":\"2015-02-11T17:15:44+00:00\",\"dateModified\":\"2015-02-11T21:39:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/\"},\"wordCount\":834,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/after-effects-e1422898289579.jpg\",\"keywords\":[\"Expressions in After Effects\",\"If Else Conditionals\",\"If Else Statements\"],\"articleSection\":[\"After Effects\",\"Motion Graphics\",\"Video Editing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/#respond\"]}],\"copyrightYear\":\"2015\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/\",\"url\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/\",\"name\":\"How to Use If\\\/Else Statements in After Effects\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/after-effects-e1422898289579.jpg\",\"datePublished\":\"2015-02-11T17:15:44+00:00\",\"dateModified\":\"2015-02-11T21:39:37+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/#\\\/schema\\\/person\\\/38e3f179e0bef658d5b6338bdfcd6deb\"},\"description\":\"You don't have to be an expression master to use if\\\/else statements in After Effects. We break down when to use it in the following post.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/after-effects-e1422898289579.jpg\",\"contentUrl\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/after-effects-e1422898289579.jpg\",\"width\":700,\"height\":409},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/use-ifelse-statements-effects\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"After Effects\",\"item\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/category\\\/after-effects\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Write If\\\/Else Expressions in After Effects\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/\",\"name\":\"The Beat: A Blog by PremiumBeat\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/#\\\/schema\\\/person\\\/38e3f179e0bef658d5b6338bdfcd6deb\",\"name\":\"Caleb Ward\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d67218716b00ce334cf1f2e69b70373cb537b1ae9477107e7fed49951be9964?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d67218716b00ce334cf1f2e69b70373cb537b1ae9477107e7fed49951be9964?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2d67218716b00ce334cf1f2e69b70373cb537b1ae9477107e7fed49951be9964?s=96&d=mm&r=g\",\"caption\":\"Caleb Ward\"},\"description\":\"Caleb is a Motion Designer that is passionate about creating helpful and inspiring content. He spent his early career as a filmmaker and motion graphic designer in the Dallas-Ft.Worth area. Caleb is committed to helping the industry through awesome articles, tutorials, and tools. He was formally educated at the University of North Texas in Radio, Television, and Film.\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/CalebWardVideo\",\"https:\\\/\\\/x.com\\\/calebwward\"],\"url\":\"https:\\\/\\\/www.premiumbeat.com\\\/blog\\\/author\\\/calebward\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Use If\/Else Statements in After Effects","description":"You don't have to be an expression master to use if\/else statements in After Effects. We break down when to use it in the following post.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/","og_locale":"en_US","og_type":"article","og_title":"How to Write If\/Else Expressions in After Effects","og_description":"You don't have to be an expression master to use if\/else statements in After Effects. We break down when to use it in the following post.","og_url":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/","og_site_name":"The Beat: A Blog by PremiumBeat","article_publisher":"https:\/\/www.facebook.com\/premiumbeat","article_author":"https:\/\/www.facebook.com\/CalebWardVideo","article_published_time":"2015-02-11T17:15:44+00:00","article_modified_time":"2015-02-11T21:39:37+00:00","og_image":[{"width":700,"height":409,"url":"https:\/\/pbblogassets.s3.amazonaws.com\/uploads\/2015\/02\/after-effects-e1422898289579.jpg","type":"image\/jpeg"}],"author":"Caleb Ward","twitter_card":"summary_large_image","twitter_creator":"@calebwward","twitter_site":"@Premiumbeat","twitter_misc":{"Written by":"Caleb Ward","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/#article","isPartOf":{"@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/"},"author":{"name":"Caleb Ward","@id":"https:\/\/www.premiumbeat.com\/blog\/#\/schema\/person\/38e3f179e0bef658d5b6338bdfcd6deb"},"headline":"How to Write If\/Else Expressions in After Effects","datePublished":"2015-02-11T17:15:44+00:00","dateModified":"2015-02-11T21:39:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/"},"wordCount":834,"commentCount":2,"image":{"@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.premiumbeat.com\/blog\/wp-content\/uploads\/2015\/02\/after-effects-e1422898289579.jpg","keywords":["Expressions in After Effects","If Else Conditionals","If Else Statements"],"articleSection":["After Effects","Motion Graphics","Video Editing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/#respond"]}],"copyrightYear":"2015","copyrightHolder":{"@id":"https:\/\/www.premiumbeat.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/","url":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/","name":"How to Use If\/Else Statements in After Effects","isPartOf":{"@id":"https:\/\/www.premiumbeat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/#primaryimage"},"image":{"@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.premiumbeat.com\/blog\/wp-content\/uploads\/2015\/02\/after-effects-e1422898289579.jpg","datePublished":"2015-02-11T17:15:44+00:00","dateModified":"2015-02-11T21:39:37+00:00","author":{"@id":"https:\/\/www.premiumbeat.com\/blog\/#\/schema\/person\/38e3f179e0bef658d5b6338bdfcd6deb"},"description":"You don't have to be an expression master to use if\/else statements in After Effects. We break down when to use it in the following post.","breadcrumb":{"@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/#primaryimage","url":"https:\/\/www.premiumbeat.com\/blog\/wp-content\/uploads\/2015\/02\/after-effects-e1422898289579.jpg","contentUrl":"https:\/\/www.premiumbeat.com\/blog\/wp-content\/uploads\/2015\/02\/after-effects-e1422898289579.jpg","width":700,"height":409},{"@type":"BreadcrumbList","@id":"https:\/\/www.premiumbeat.com\/blog\/use-ifelse-statements-effects\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.premiumbeat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"After Effects","item":"https:\/\/www.premiumbeat.com\/blog\/category\/after-effects\/"},{"@type":"ListItem","position":3,"name":"How to Write If\/Else Expressions in After Effects"}]},{"@type":"WebSite","@id":"https:\/\/www.premiumbeat.com\/blog\/#website","url":"https:\/\/www.premiumbeat.com\/blog\/","name":"The Beat: A Blog by PremiumBeat","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.premiumbeat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.premiumbeat.com\/blog\/#\/schema\/person\/38e3f179e0bef658d5b6338bdfcd6deb","name":"Caleb Ward","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2d67218716b00ce334cf1f2e69b70373cb537b1ae9477107e7fed49951be9964?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2d67218716b00ce334cf1f2e69b70373cb537b1ae9477107e7fed49951be9964?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d67218716b00ce334cf1f2e69b70373cb537b1ae9477107e7fed49951be9964?s=96&d=mm&r=g","caption":"Caleb Ward"},"description":"Caleb is a Motion Designer that is passionate about creating helpful and inspiring content. He spent his early career as a filmmaker and motion graphic designer in the Dallas-Ft.Worth area. Caleb is committed to helping the industry through awesome articles, tutorials, and tools. He was formally educated at the University of North Texas in Radio, Television, and Film.","sameAs":["https:\/\/www.facebook.com\/CalebWardVideo","https:\/\/x.com\/calebwward"],"url":"https:\/\/www.premiumbeat.com\/blog\/author\/calebward\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.premiumbeat.com\/blog\/wp-content\/uploads\/2015\/02\/after-effects-e1422898289579.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pab9JK-drF","_links":{"self":[{"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/posts\/51687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/comments?post=51687"}],"version-history":[{"count":30,"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/posts\/51687\/revisions"}],"predecessor-version":[{"id":54218,"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/posts\/51687\/revisions\/54218"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/media\/51350"}],"wp:attachment":[{"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/media?parent=51687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/categories?post=51687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.premiumbeat.com\/blog\/wp-json\/wp\/v2\/tags?post=51687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}