Hi Johannes,

I hit this problem before a long while back. Basically, because the "name"
knob has a Knob::NODE_KNOB flag set on it (and not a
Knob::KNOB_CHANGED_ALWAYS flag), it doesn't get a knob_changed() event
through c++, only through Python if you've registered a callback. I'm not
sure why this is, maybe Frank knows the answer?

It looks like if you set the Knob::KNOB_CHANGED_ALWAYS flag on the knob,
you *might* get the callback through c++. However, this is a hack and
probably comes with side effects. Caveat emptor!

If this is something you need, please send this email thread in to Support@
along with a description of what you're trying to do (in case you want to
keep that private.) and they'll get a bug logged for you.

Hope that helps!

Dan.


On Tue, Dec 16, 2014 at 11:18 AM, Frank Harrison <fr...@thefoundry.co.uk>
wrote:
>
> Hey Johannes,
>
> we don't have bugs logged for node_name() being broke and it seems fine to
> me, can you send me some repro steps?
>
> So, no we don't send knob_changed events for the "name" knob as they have
> the Knob::NO_KNOB_CHANGED flag set. I'll try and find out why that is.
>
> If you get the "name" knob are you then unable to add a callback to it for
> when its value changes?
>
> Thanks :)
>
> F.
>
> On 16 December 2014 at 00:17, Johannes Saam <johannes.s...@gmail.com>
> wrote:
>
>> Update :) The knob with name "name" exists but somehow i dont get a hit
>> in knob_changed if the name changes?!
>>
>> On Mon, Dec 15, 2014 at 3:55 PM, Johannes Saam <johannes.s...@gmail.com>
>> wrote:
>>
>>> just found another thread of years back... Dan bathell myself and
>>> jonathan were talking about it.
>>> node_name() is BROKEN it does not seam to work.
>>>
>>> but in the thread i saw 'knob("name")->get_text()' as a solution i`ll
>>> try that
>>>
>>> On Mon, Dec 15, 2014 at 3:51 PM, Johannes Saam <johannes.s...@gmail.com>
>>> wrote:
>>>
>>>> Hey! Thanks so much for your help!
>>>> I am aware of the knob_changed function... and the python one. What i
>>>> need is a callback when the NAME of the node changes.
>>>> simple example... user creates node(blur for ex) renames "Blur1" to 
>>>> "dazzleMe"
>>>> i get a callback and can act on the fact that the node name was changed....
>>>> the node will be MY own node so i have full access to it.
>>>>
>>>> Any further ideas? AFAIK the name of the node is not a knob ( shame
>>>> really ) but you can use node_name() but even that somehow causes my node
>>>> to crash.
>>>> Whats the best way of handling the node name and its changes?
>>>>
>>>> Rock on
>>>> jo
>>>>
>>>> On Fri, Dec 12, 2014 at 12:44 AM, Frank Harrison <
>>>> fr...@thefoundry.co.uk> wrote:
>>>>
>>>>> Have a look at DDImage::Knob::addCallback(); you probably want to use
>>>>> the kChanged CallbackReason
>>>>>
>>>>>
>>>>> http://docs.thefoundry.co.uk/nuke/90/ndkreference/Plugins/classDD_1_1Image_1_1Knob.html#a03fea4c7207d01e91eb22c7a9c6c896d
>>>>>
>>>>> Make sure you call removeCallback() when appropriate.
>>>>>
>>>>> Hope that helps.
>>>>>
>>>>> F.
>>>>>
>>>>> On 12 December 2014 at 02:50, Johannes Saam <johannes.s...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Does it exist? Or whats the most elegant way?
>>>>>> Jo
>>>>>>
>>>>>> _______________________________________________
>>>>>> Nuke-dev mailing list
>>>>>> Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Frank Harrison
>>>>> Senior Nuke Software Engineer
>>>>> The Foundry
>>>>> Tel: +44 (0)20 7968 6828 - Fax: +44 (0)20 7930 8906
>>>>> Web: www.thefoundry.co.uk
>>>>> Email: frank.harri...@thefoundry.co.uk
>>>>>
>>>>> _______________________________________________
>>>>> Nuke-dev mailing list
>>>>> Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
>>>>>
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Nuke-dev mailing list
>> Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
>>
>>
>
>
> --
> Frank Harrison
> Senior Nuke Software Engineer
> The Foundry
> Tel: +44 (0)20 7968 6828 - Fax: +44 (0)20 7930 8906
> Web: www.thefoundry.co.uk
> Email: frank.harri...@thefoundry.co.uk
>
> _______________________________________________
> Nuke-dev mailing list
> Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
>
>

-- 
Dan Ring, Ph.D.
Senior Research Engineer
The Foundry
5 Golden Square
London
W1F 9HT
Tel: +44(0) 20 7479 4350
Web: www.thefoundry.co.uk
Email: dan.r...@thefoundry.co.uk

The Foundry Visionmongers Ltd.
Registered in England and Wales No: 4642027
_______________________________________________
Nuke-dev mailing list
Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to