top of page
Search
  • Writer's pictureSunil Prasad

Making of Multiple knob Changer

In my career as a pipeline TD I first started coding with mel, maya python, pyqt, pyside. Although mel/maya scripting does gets on my nerves sometimes, still there is a vast support and communities who can guide on it. As I progressed I started with nuke python. Here I began to see the big difference and started to love more of mel/maya. The kind of documentation Autodesk provides is developer friendly. I will give a recent happening to show what I am speaking of.


​I was recently developing a tool in nuke where in, upon selection of multiple nodes of the same type, one can change the knob values at one go. This looked very simple and started working on that. So the concept I had was simple. I would create a UI from which I would

  1. Select the nodes

  2. This would load up all the available knobs of the node

  3. Select the knob

  4. This would add the knob properties to change.

  5. Re-select the knob

  6. This would remove the previously loaded knob and add the latest


I started to work on it. the first 5 steps went without any issues. The problem started when I went to remove the knob and add knob. Whenever I tried doing, it basically started to add multiple panels in the UI. I started to search for answers.

  • Tried looking for answers in "Documentation" of Nuke API - no go.

  • Crawled through hundreds of blogs/websites of various Nuke Pipeline TD - mixed luck. Still no go.

  • To access the knowledge base of Foundry, had to create a user Account. I did that and searched the KB - no go.

  • Crawled through 7 pages of google and found a similar query in mail-archive of foundry.

Apparently the community maintains the interactions on Nuke python in the below link. Small advise, bookmark the below link if you want to work with nuke python.

https://www.mail-archive.com/nuke-python@support.thefoundry.co.uk/


came to know this is a weird Linux issue from 2013 which no one bothered to fix. Remove/add Knobs would run into a uncontrollable loop. There were bug ids raised about the issue(bug 37959, bug 14622). As I was writing the tool in 2018, I thought it might have been fixed. So I again went back to Foundry Knowledge base website and searched with the bug ids. Amazingly the ids doesn't exist on their database. I assumed that they might have fixed it, so they closed the bug id. I started to crawl their release notes. Again dead end. There was no mention of it whatsoever. While searching for the answer I chanced upon a solution. According Mike Frank if we add a nuke.message("something here") after the remove and before addKnob, it will break the process up and fix it after clicking the "Ok" button.


This did fix my tool as a whole but I didn't like the idea of clicking after every operation. Although I had a working model, It didn't feel good to me. I started to think that if I use pyside, I would be able to control it better(well that what I dreamt off). I re-wrote the tool and came till step 3. Now I had to add the knobs. I assumed that as Nuke had Pyside2 there should be something for the addKnobs classes. I started my journey again in search for answers. I visited all the places I had been before, and the places which I had never visited. When all hopes were lost I made a visit to the mail-archive link and searched with different keywords. No luck. I searched with the bug ids I had discovered earlier hoping to find some answers and voila there was the answer to my query. The answer is... wait for it... !!puff!! ("""holding my breath""").... you cant addKnobs from pyside. Patrick Heinen had a similar query. I guess he was also designing same kind of tool in 2014 and couldn't proceed in pyside because of this. Sebastian Elsner had replied to Patrick's query that and I quote


"Nuke would have to wrap the knobs with shiboken (which provides the "glue" between c++ Qt and pyside) for pyside to understand what this object is you are adding to a dialog/layout."


He had also suggested to show all knobs and hide rest according to selection. I feel this would make the tool relatively slow.


As Nuke is mostly used on Linux machines I wonder how anyone would leave it broken.


With a heavy heart I pushed my tool done.

6 views0 comments

Recent Posts

See All

Using Different versions of python

I am a regular user of python2. I didn't upgrade myself to python3 was solely because the companies I worked with was in python2 and I wanted to have continuity with the same at home. Recently I upgra

AutoDesk maya 2019 install on linux mint 19

According to autodesk website, it is supported on RHEL(red hat) and centos. Considering centos as based on RHEL, it doesn't make sense that they didn't release for ubuntu. So my quest began to install

bottom of page