Change Stack Mode with Python


I would like to know if I could change the Stack Mode directly with Python like in the picture shown, I was thinking that
the setCompositeMode was my entry ticket but I can’t get it working at the moment. Any idea?


Best regards,


I set it using rvpush to an existing running session like:

cmd = f"rvpush -tag {tag} py-eval \"[rv.commands.setStringProperty(f'{{stack}}.composite.type', ['replace'], True) for stack in rv.commands.nodesOfType('RVStack')]\""  

You can change “replace” to “Difference” or whatever you want.

This might not be exactly how you do it, but at least it shows what types of rv.commands that you can use.



Thanks for the reply and feedback, I wasn’t aware that I could use setStringProperty to interact with rv this way. Since I launched my stack creation with python, I ended up by directly doing this:

[rv.commands.setStringProperty(‘{stack}.composite.type’.format(stack=stack), [‘replace’], True) for stack in rv.commands.nodesOfType(‘RVStack’)]

Best regards,


1 Like