Hmm, now it looks like onCreate isn't triggered by node paste. I thought it
used to be... (?). Nuke 6.3v6. Can anyone verify on their end? Thanks, Ean

On Thu, May 24, 2012 at 9:24 AM, Ean Carr <[email protected]> wrote:

> Hey Diogo, good idea. That should be faster than what I was doing. Will
> give it a shot. Thanks, -Ean
>
>
> On Thu, May 24, 2012 at 7:48 AM, Diogo Girondi <[email protected]>wrote:
>
>> Hi Ean,
>>
>> If it's a custom node you can add a hidden boolean knob that gets set to
>> True after the node has been processed the first time. And in you script
>> routine you check for that knob's value before doing any further
>> processing, so any node with that set is ignored. It's a hack, but it tends
>> to work and I use for certain things here.
>>
>> Having more granular callbacks would be better though.
>>
>>
>> cheers,
>> diogo
>>
>>
>> On Wed, May 23, 2012 at 6:50 AM, Ean Carr <[email protected]> wrote:
>>
>>> Okay, made feature request for two callbacks (logged as #27725):
>>>
>>> beforePaste: called before data is dropped to DAG
>>> afterPaste: called after data is dropped to DAG
>>>
>>> Diogo, I have a special node whose input needs to be set to a specific
>>> dependency automatically on copy/paste. Sticking the code in an onCreate
>>> works when copy/pasting, but has the side effect of also running on script
>>> load, which is too slow on loading larger scripts as it loops through
>>> everything, checking for my special nodes and their inputs. Also, if the
>>> user specifically disconnects the input, I don't want it reconnected on
>>> script load.
>>>
>>> Currently I'm doing it through a drop data callback, which works, but is
>>> less than ideal for the reasons I gave before. Any other way to do this
>>> that you can think of?
>>>
>>> -Ean
>>>
>>>
>>>
>>> On Wed, May 23, 2012 at 2:50 AM, Diogo Girondi 
>>> <[email protected]>wrote:
>>>
>>>> I agree, a onPaste() would probably be welcome.
>>>>
>>>> What are you trying to do exactly? Maybe there is another way to handle
>>>> it.
>>>>
>>>>
>>>> cheers,
>>>> diogo
>>>>
>>>>
>>>> On Tue, May 22, 2012 at 3:36 AM, Ean Carr <[email protected]> wrote:
>>>>
>>>>> Hey Diogo,
>>>>>
>>>>> Problem with onCreate is it's too broad in its reach: also triggered
>>>>> when a script loads or when a node's created from the toolbar, etc.
>>>>>
>>>>> Doing what I need via a drop data callback is my current hack, but
>>>>> means I have to deal with the rest of the stack if all I'm after is one
>>>>> node. This could work, though, if I could extract my part of the text,
>>>>> return True on that, but return None on the rest so Nuke deals with it. Is
>>>>> that possible?
>>>>>
>>>>> Thanks,
>>>>> Ean
>>>>>
>>>>> On Mon, May 21, 2012 at 2:17 PM, Diogo Girondi <[email protected]
>>>>> > wrote:
>>>>>
>>>>>> In theory onCreate() should catch any clipboard paste.
>>>>>>
>>>>>> The addDropDataCallback() also catches stuff pasted from the
>>>>>> clipboard depending on what you need to do.
>>>>>>
>>>>>> Hop this helps.
>>>>>>
>>>>>>
>>>>>> cheers,
>>>>>> diogo
>>>>>>
>>>>>> On Mon, May 21, 2012 at 9:48 AM, Ron Ganbar <[email protected]> wrote:
>>>>>>
>>>>>>> There should be something.
>>>>>>> Otherwise how does the paste into the DAG work?
>>>>>>>
>>>>>>> R
>>>>>>> On May 21, 2012 1:12 PM, "Ean Carr" <[email protected]> wrote:
>>>>>>>
>>>>>>>>  Hi,
>>>>>>>>
>>>>>>>> Would really like something like an onPaste callback. Anyone know
>>>>>>>> if it exists but I'm just overlooking it? If not, will file a feature
>>>>>>>> request.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Ean
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>
>> _______________________________________________
>> 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

Reply via email to