This location is for Registered Users Only.
Perhaps you need to login or register.
11.0, 10.5, 10.0 or later
Linux, Mac, Windows
Hi everyone, I just wanted to share a small python script for nuke that I made when I was learning python for nuke.
What actually the script does is, it creates Merge Node with the operation you want rather than just creating a merge and changing the operation in the settings later.
It’s a very basic simple script and if you are just starting out learning python for Nuke it will be very helpful if you open it up and read through it.
I am a compositor who loves both compositing and programming because I see both of them as a kind of Problem solving.
In Compositing you are given a shot and you have different ways to tackle it and get a desired output. In programming too, you have a problem and you are trying to find a solution with set of instructions. So combining those could be very powerful. The new introduction of AI also seems very promising to the Visual Effects Industry. So much is going to be automated in the near future and I think as a Compositor, the knowledge of little bit of programming and AI could lead you a long away.
Those who wanted to plunge into the script and get hands on experience. I have attached the script down below. You can download it and try it out yourself. Put the “advanced_Merge.py” in your “.nuke” folder and add:
in your menu.py
Here I wanted to explain the mental process I had to come up with script.
Of course having the difficulty of creating the merge and changing the operations later.
Create Merge with the operation I want.
This is how I tackled the situation:
As you press the hotkey for merge i.e. ‘m’ a pop up box appears asking for the operation you want to create and you just have to type the name of operation and press enter. But typing the whole operation is kind of bummer and takes away all the ease we get using the script. So what I did was, I assigned them shortcuts inside the script!
If you wanted to create a merge node with a plus operation all you have to do is press ‘m’ on your keyboard type “+” and enter. You can even type “plus” inside the box and it still works.
Likewise I have assigned shortcuts for few major operations as well
- Over = ‘o’
- Mask = ‘m’
- Stencil = ‘s’
- Minus = ’-‘
- Plus = ’+’
- Multiply = ’*’
- Matte = ’a’
- Under = ‘u’
- From = ‘f’
- Min = ‘–‘
- Max = ‘++’
- Difference = ‘d’
- Divide = ‘/’
- Screen = ‘r’
As you get used to it. It’s pretty much a fast process. Try it for yourself and let me know what you think and is there something we could improve over this.
>>> Added AutoComplete
>>> Added Change Operation check box
>>> Overall UI overhaul