Expression challenge

   527   1   1
User Avatar
Member
350 posts
Joined: June 2016
Offline
Have a expression problem but not sure if I can keep the logic in a single expression.
Right now I am using the following expression for an HDA which works fine
Lets call this expression 'A'
fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75)

However what I need to happen is when a different expression (lets call it 'B') results in an even number I need to either add or subtract .5 from expression A
This is expression 'B'. Parameter name insetDepth which is same name as the parent HDA integer parameter being referenced.
ch("../insetDepth")*.5
User Avatar
Member
21 posts
Joined: Sept. 2018
Offline
Add the second expression to the original multiplied by mod2?

So:
fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75)+(fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75))%2)*
((ch("../insetDepth")*.5))

On mobile so hope I got the parentheses right.
  • Quick Links