Nukescripts python panel - Setting default value and new line

I was writing an update to my setProjDir script, which is available on nukepedia at the moment of writing this. It is a function requested from a user, for the script to affect selected nodes only. I've decided to go a step further and include options like exclude selected nodes or readgeo nodes. To do that, I'm writing a popup panel for user to change these options.

In the process I discovered that the third value in creating a knob doesn't necessarily set the default of a knob, for instance

 

The line above doesn't set the boolean knob "checkReadGeo" as 0, when the panel pops up it's still default to 1. A solution I found in Nuke user forum is use a setValue() right after. But a better solution I found is define a function yourself to set the value while you create the knob, and it becomes much simpler if you have a lot of knobs to create. So the line above became this:

 

The next trick I found is putting every custom knobs on a new line instead of next to each other. In my previous attempt to write a python panel this problem didn't came up because it will automatically put knobs in new line when they becomes too long. To set them into new line yourself, you need setFlag.

A list of nuke flags can be found on nukepedia here.

So if I were to put every custom knobs into their own new line, I'd include setFlag in the for loop which I add knobs to the panel. My final code to create the panel became this:

Previous
Previous

Logitech SetPoint disables media keys

Next
Next

Nuke CSP error in Linux