Yep, it works with the paste too. def dropSomething( mimeType, text ):
if 'something' in text: print 'do the jazz' return True else: return False nukescripts.addDropDataCallback( dropSomething ) 2012/4/22 Ron Ganbar <ron...@gmail.com> > Just yo make site Ean, does that work with the paste function? Not just > drag and drop? > > Thanks > R > On Apr 22, 2012 5:13 PM, "Ron Ganbar" <ron...@gmail.com> wrote: > >> Hi Ean, >> You guessed right. >> I'll have a look at this shortly. >> >> Thanks >> R >> On Apr 22, 2012 3:07 PM, "Ean Carr" <eanc...@gmail.com> wrote: >> >>> Hey Ron, >>> >>> Sounds like you want to add a drop data callback function. These are run >>> just before Nuke handles dropped text into the DAG. Your function can parse >>> the text, returning True if you handled it or None if not. >>> >>> I'm not in front of Nuke at the moment, so may be getting the below >>> syntax a little wrong, but the short of it is: you should define a function >>> somewhere (menu.py) and add its callable to the dict of drop data functions >>> (you can define as many as you like): >>> >>> def doStuffDD(mimeType, text): >>> if "foo" in text: >>> nuke.message('foo found') >>> return True >>> return None >>> >>> nuke.addDropData(doStuffDD) >>> >>> Then, if you copy this sentence containing the word foo and paste into >>> the DAG, the drop data callback you added will give you the message. >>> >>> -Ean >>> >>> On Sun, Apr 22, 2012 at 10:56 AM, Ron Ganbar <ron...@gmail.com> wrote: >>> >>>> Right, this file is mostly chinese to me. >>>> If I want to add something to this paste function, so if it does not >>>> find a tcl style node list and instead finds some other string (that can be >>>> identified with a find command to be something specific) it will run a >>>> different script. Any ideas? >>>> >>>> >>>> >>>> Ron Ganbar >>>> email: ron...@gmail.com >>>> tel: +44 (0)7968 007 309 [UK] >>>> +972 (0)54 255 9765 [Israel] >>>> url: http://ronganbar.wordpress.com/ >>>> >>>> >>>> >>>> 2012/4/22 Ron Ganbar <ron...@gmail.com> >>>> >>>>> Thanks! >>>>> >>>>> >>>>> >>>>> Ron Ganbar >>>>> email: ron...@gmail.com >>>>> tel: +44 (0)7968 007 309 [UK] >>>>> +972 (0)54 255 9765 [Israel] >>>>> url: http://ronganbar.wordpress.com/ >>>>> >>>>> >>>>> >>>>> On 22 April 2012 12:45, Adrian Baltowski <adrian...@poczta.onet.pl>wrote: >>>>> >>>>>> Hi >>>>>> There is edit.py script located in plugins/nukescripts folder. >>>>>> >>>>>> Best >>>>>> >>>>>> W dniu 2012-04-22 10:05:19 użytkownik Ron Ganbar <ron...@gmail.com> >>>>>> napisał: >>>>>> >>>>>> Hi guys, >>>>>> any idea where I can find the paste from clipboard command, as it is >>>>>> used to paste nodes into the node graph? >>>>>> >>>>>> Thanks, >>>>>> Ron Ganbar >>>>>> email: ron...@gmail.com >>>>>> tel: +44 (0)7968 007 309 [UK] >>>>>> +972 (0)54 255 9765 [Israel] >>>>>> url: http://ronganbar.wordpress.com/ >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Nuke-python mailing list >>>>>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >>>>>> >>>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Nuke-python mailing list >>>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >>>> >>>> >>> >>> _______________________________________________ >>> Nuke-python mailing list >>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >>> >>> > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python