Python Comp node Question

Hello everyone.
Any idea how can I modify the premultiplication box values in the Comp batch node to change it to unpremult or vice versa.

Thanks

You can use the following attributes: front_premultiplied, back_premultiplied and output_premultiplied.

For example, you could do the following in the Python Console:

import flame

comp = flame.batch.create_node(’“Comp”)
comp.front_premultiplied = True
comp.back_premultiplied = True
comp.output_premultiplied = True

The key to discover that by yourself is to use .attributes and .values
In this case you could have done:

import flame

comp = flame.batch.create_node(’“Comp”)
print(comp.attributes)
–>This will give you the list of available attributes for the Comp node.
print(comp.front_multiplied.values)
–> This will give you the list of possible arguments for a given attribute

Keep in mind that .attributes only lists the attributes, so you can also get all the functions and properties of that node using:
help(comp)

2 Likes

Thanks a lot Fred
I understand this method of get .attributes and .values is the same with LOGIK matchboxes as well

It is not possible to controls settings in a Matchbox shader using the Python API. What you could do as an alternative is to save setups on disks and then load those setups using the Python API.