User Manual

Table Of Contents
Expression Description
iif(Merge1.Blend == 0, 0, 1)
This returns 0 if the Blend value is 0, and
returns 1 if it is not. The iff() function is a
shorthand conditional statement, if-then-else.
iif(Input.Metadata.ColorSpaceID ==
sRGB”, 0, 1)
This returns 0 if the image connected to the
current node’s Input is tagged with the sRGB
colorspace. When no other node name is
supplied, the expression assumes the Input is
coming from the current node. It is equivalent
to self.Input. The Input in most, but not all,
Fusion nodes is the main image input shown in
the Node Editor as an orange triangle. Images
have members that you can read, such as
Depth, Width, Metadata, and so on.
Point(Text1.Center.X, Text1.
Center.Y-.1)
Unlike the previous examples, this returns
a Point, not a Number. Point inputs use two
members, X and Y. In this example, the Point
returned is 1/10 of the image height below the
Text1’s Center. This can be useful for making
unidirectional parameter links, like offsetting
one Text from another.
Text1.Center - Point(0,.1)
This is similar to the previous expression.
This SimpleExpression returns Text instead of a
Number or Point.
Text(“Colorspace: “..(M erge1.
Background.Metadata.ColorSpaceID )
The string inside the quotes is concatenated
with the metadata string, perhaps returning:
Colorspace: sRGB
Text(“Rendered “..os.date(%b %d,
%Y”).. at “..os.d ate(“%H:%M)..”\n
on the computer “..os.
getenv(COMPUTERNAME”).. “ running
..os. getenv(“OS)..\n from the comp
..ToUNC(comp.Filename))
This returns a much larger Text, perhaps
something like:
Rendered Nov 12, 2019 at 15:43 on the
computer Rn309 running Windows_NT
from the comp \\SRVR\Proj\Am109\
SlateGenerator_A01.comp
os.date(“%H:%M”)
The OS library can pull various information
about the computer. In the previous
example, os.date gets the date and time in
hours:minutes.
“..os.getenv(COMPUTER NA M E”)..
running “..os.
Any environment variable can be read by
os.getenv, in this case the computer name and
the operating system.
\n from the comp “..ToUNC(comp.
Filename)
To get a new line in the Text, \n is used.
Various attributes from the comp can be
accessed with the comp variable, like the
filename, expressed as a UNC path.
Chapter – 63 Using Modifiers, Expressions, and Custom Controls 1269