OK so update again :) Setting the name knobs flag did not work for me... i
have prints everywhere and funny enough when i set the flag and then watch
my output the nodes destructor is called?
I guess i have to attach a callback ... do i NEED python for that or can i
attach a callback to a knob in c++?!

On Tue, Dec 16, 2014 at 11:19 AM, Johannes Saam <[email protected]>
wrote:

> Thanks to everyone for the replies again!
>
> Yeah i am trying to link nuke up with custom software and its getting
> tricky ( for me at least :)) )
> I have never even used Callbacks so i look into that and see if i can just
> add one myself in knobs(). I will also try to change the flags and see what
> breaks :))
>
> I am also in need of a plugin init function. To register several things
> from the custom software. Basically i need to have a function on dll load.
> so far i just use a static class and in its constructor things happen. This
> seams hacky to me maybe it would be nice to have some sort of hook to do
> stuff on plugin load like maya has its initializePlugin?
>
>
> Thanks again!
> Jo
>
> On Tue, Dec 16, 2014 at 4:30 AM, Dan Ring <[email protected]> wrote:
>
>> 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 <[email protected]>
>> 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 <[email protected]>
>>> 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 <[email protected]
>>>> > 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 <
>>>>> [email protected]> 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 <
>>>>>> [email protected]> 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 <[email protected]
>>>>>>> > wrote:
>>>>>>>>
>>>>>>>> Does it exist? Or whats the most elegant way?
>>>>>>>> Jo
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Nuke-dev mailing list
>>>>>>>> [email protected], 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: [email protected]
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>
>>>>
>>>
>>>
>>> --
>>> 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: [email protected]
>>>
>>> _______________________________________________
>>> Nuke-dev mailing list
>>> [email protected], 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: [email protected]
>>
>> 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

Reply via email to