I think Igor's suggestion would be the easiest workaround to implement moving forward. If you haven't already stored that information another option is get the output of node.writeKnobs with the nuke.WRITE_USER_KNOB_DEFS flag and parse it to find the tab knobs and the knobs nested inside them.
Super dirty and would only work for user knobs but it would do the trick. On 22 January 2016 at 10:53, Igor Majdandzic <[email protected]> wrote: > nope, thats what he meant. He has to kill all the knobs on the tab before > he can remove the tab itself > > > Am 22.01.2016 um 17:46 schrieb Fredrik Averpil: > > Not in front of a machine at the moment but... > > Does this work? > nuke.removeKnob( myknob ) > > // Fredrik > > > On Fri, Jan 22, 2016 at 12:20 PM Igor Majdandzic < > [email protected]> wrote: > >> Hey Abraham, >> I dont know if there is a nice fast fancy way of doing this. But you >> could store a directory in a hidden knob, key could be the tab and knobs >> are the values. >> Work around I know, but it should do the trick. >> >> Cheers >> >> Igor >> >> >> Am 21.01.2016 um 12:59 schrieb Schneider, Abraham: >> >> Hi there! >> >> I have some user knobs in my root node, that I want to get rid of. It's a >> 'tab_knob' at the root level (let's call it 'testtab'), that contains >> several different knobs (strings, etc.). Now I want to delete all the knobs >> inside this tab knob and the tab knob itself. >> >> I can get to the tab knob via "myknob = nuke.Root().knob('testtab')" and >> I can remove knobs like this: "nuke.Root().removeKnob(myknob)". This should >> work, if the tab is empty. But because the tab contains other knobs, it >> won't be deleted, as the removeKnob doesn't delete knobs recursively. >> >> So how would I find all the knobs of nuke.Root() that belong to my tab >> knob, so that I can delete them first before deleting the tab knob itself? >> >> Or is there an even better way to remove the tab and all the related >> knobs quickly? >> >> Thanks, Abraham >> >> >> >> *Abraham Schneider* >> Head of VFX pipeline / VFX Supervisor >> >> >> >> ARRI Media GmbH >> Türkenstr. 89, 80799 München >> Phone +49 89 3809-1096 >> >> EMail [email protected] >> www.arri.de/arrimedia >> >> <http://www.facebook.com/arrimedia> Click here >> <http://www.facebook.com/arrimedia> to visit us on Facebook! >> >> >> _______________________________________________ >> Nuke-python mailing [email protected], >> http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >> >> >> _______________________________________________ >> Nuke-python mailing list >> [email protected], <http://forums.thefoundry.co.uk/> >> http://forums.thefoundry.co.uk/ >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >> > > > _______________________________________________ > Nuke-python mailing [email protected], > http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > > -- > > [image: CHIMNEY] > > *Igor Majdandzic* > Compositing Supervisor > > CHIMNEY Deutschland GmbH & Co. KG > Hanauer Landstraße 196 > 60314 Frankfurt am Main > Direct: +49 69 989 56 431 - *NEW PHONE NUMBER* - > Fax: +49 69 904 36 68 29 > Mobile: +49 176 321 375 72 > Berlin, Frankfurt/Main, Stockholm, Malmö, Warsaw, Copenhagen, Sydney, > Singapore > > www.chimneygroup.com > > > AG Charlottenburg HRA 44507 B; Pers. haft. Gesellschafter: Chimney > Deutschland GmbH > AG Charlottenburg HRB 130013 B; Geschäftsführer: Ralf Drechsler, Michal > Kalinowski, Carl Henric Larsson > > _______________________________________________ > Nuke-python mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
