Changing Composite Blend Mode With Scripts

Hello!

I’m working on building a button that executes a script changing the blend modes of a Composite TOP one layer above

I’ve got a panel execute that executes when the button turns On to Off to change the blend mode from Hue to Add

Based on the list of attributes for the Comp in the wiki (docs.derivative.ca/Composite_TOP) it seems like the script should be something like:

def onOnToOff(panelValue):
op(‘…/comp9’).operand = ‘add’
return

However, I’m getting an Attribute Error saying ‘td.compositeOp’ has no attribute ‘operand’ so obviously my reference name is off, but I’m unsure how best to find the list of attributes of an object

Any help would be greatly appreciated! :open_mouth:

That’s very close solomon.leyba.

The actual python syntax for this looks like:

op('comp1').par.operand = "multiply"

You can use the string name for the list, or you can use an index.

op('comp1').par.operand = 27

Both of the scripts above are functionally equivalent.

Awesome, thanks so much!