Do you have 6.2 at hand to build against? I'm pretty sure the same thing would work in 6.2
On Fri, May 13, 2011 at 10:12 AM, Nathan Rusch <[email protected]>wrote: > Thanks for the reply Peter, but that doesn't seem to be making a > difference. > > Just to be sure I'm not missing something, here's my knobs() function: > > virtual void knobs(Knob_Callback f) > { > Knob* th = String_knob(f, &m_treeHash, "tree_hash", "Tree Hash"); > Tooltip(f, "Hash of incoming op tree"); > // th->set_flag(Knob::READ_ONLY); //What I was calling before > SetFlags(f, Knob::READ_ONLY); //Same result > } > > When I load my plugin, I can select all the text in the String knob and > delete it. I can refresh it and the hash comes back, but there's nothing > preventing me from clearing it out every time. > > -Nathan > > -----Original Message----- From: Peter Pearson > Sent: Friday, May 13, 2011 10:02 AM > To: [email protected] > Subject: Re: [Nuke-dev] Read-only String knob (or alternative) > > > On 13/05/11 17:53, Nathan Rusch wrote: > >> Hey there dev list, >> I’ve got a plugin that uses a String_knob. In my knobs() method, I’m >> constructing it and then calling th->set_flag(Knob::READ_ONLY);. Pretty >> basic stuff here. >> However, the READ_ONLY flag doesn’t seem to have any effect. Is there a >> way to get this to actually stick? Is this a version bug (this is being >> built against 6.1v2)? Or is there another way I can display text that >> can be expression-linked but is legitimately read only? >> Thanks, >> -Nathan >> > > Try just: > SetFlags(callback, Knob::READ_ONLY); > > after the String_knob() call. > > Works for me in 6.3, and I can't think why 6.1 would be any different. > > Regards, > Peter > > Peter Pearson, Software Engineer > The Foundry, 6th Floor, The Communications Building, > 48 Leicester Square, London, UK, WC2H 7LT > Tel: +44 (0)20 7434 0449 - Fax: +44 (0)20 7434 1550 > Web: www.thefoundry.co.uk > > The Foundry Visionmongers Ltd. > Registered in England and Wales No: 4642027 > _______________________________________________ > Nuke-dev mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev > _______________________________________________ > Nuke-dev mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev >
_______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
