Hi Daniel myKnob.setFlag(nuke.STARTLINE) should do it.
This worked for me: n = nuke.createNode('NoOp') iformatknob = nuke.Format_Knob('iformatknob', 'Input Format') oformatknob = nuke.Format_Knob('oformatknob', 'Output Format') goknob = nuke.PyScript_Knob('creatert', 'Create ReTransform') goknob.setFlag(nuke.STARTLINE) n.addKnob(iformatknob) n.addKnob(oformatknob) n.addKnob(goknob) You could also remove the flag from knobs that are set to create a new lines by default. myKnob.clearFlag(nuke.STARTLINE) For more info on custom panels: https://docs.thefoundry.co.uk/nuke/63/pythondevguide/custom_panels.html 2016-11-06 11:19 GMT+01:00 Daniel Hartlehnert <dah...@gmx.de>: > Hi, > > i am adding knobs to a noop that i create with python. In the Nuke user > interface, when i do "Manage user knobs", i have the option to "start new > line" for every knob i add. > > How can i add this option when doing it in python? > > I have: > > n = nuke.createNode('NoOp') > iformatknob = nuke.Format_Knob('iformatknob', 'Input Format') > oformatknob = nuke.Format_Knob('oformatknob', 'Output Format') > goknob = nuke.PyScript_Knob('creatert', 'Create ReTransform') > > n.addKnob(iformatknob) > n.addKnob(oformatknob) > n.addKnob(goknob) > > The PyScript_Knob appears on the same line as the oformatknob. > > Daniel_______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > -- Digital Compositor +45 42 67 76 86
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python