Home
news
contactpage
lwplugins
sIBLeditpreview
Gallery
demoreel
matter

 

First we need to install pip, download the get-pip.py from here:
https://pip.pypa.io/en/latest/installing/
now drag on drop this file onto the python.exe in your nuke folder after nuke is done with the installation go to the new script folder
and open a shell window in it. (You should see a pip.exe in this folder)
now enter

   .\pip.exe install slackclient

pip will now install the slack client.

Now you create a new textfile with the following script:

from slackclient import SlackClient
slack_token = 'enter your token here'
sc = SlackClient(slack_token)

sc.api_call(
   "chat.postMessage",
   name="nukerender",
   channel="#your channel name here",
   text="RENDER DONE"
)


save it as slackout.py
although the slack guide does say you should not write the token inside the script itself, we want to keep things simple. Beside we don't want
to publish the script. For this reason its important that you place it _outside_ of any project folder
at some place where you won't accidentially publish it. (nuke folder itself is ok)

now go to slack.com and add a team chat. and a channel to wich you want to send these messages.

https://slack.com/get-started


after that, get your token here by visiting this link:
https://api.slack.com/custom-integrations/legacy-tokens

enter the token in the script. please notice that it has to be inside the ' ' characters.
also enter the channel name you want to use. please notice if you choose a channel name wich does not exist,
the message will land in data nirvana.

if things have been done correctly, you can drag and drop the slackout.py script on the python.exe in the nuke
dir and it will send out the message for testing purposes.

now we will add the script in nuke:
Go to the writer node, select the python tab. in the after render text line enter:

execfile('D:\\PATH\\TO\\YOUR\\slackout.py')

notice that the path is written inside the ' ' characters and that you
need to use double \ for the path.

if things work out, this script will inform you once a render is finished
on any device connected to the channel.