shortCopy v1.3


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: eden an
A simple python script to help people more easily share nuke nodes.
Requirements:
12.0, 11.3, 11.2, 11.1, 11.0, 10.5 or later
Linux, Mac, Windows
18 Jun 2020
70

Perhaps some of you agree with how annoying it is to share a very large nuke node through email or messenger.

Here's a simple python script to help people more easily share nuke nodes with a short URL style. 

 

Copy anything as usual !

Screen Shot 2020-06-16 at 7.13.55 PM

and Share it !

Screen Shot 2020-06-16 at 7.16.09 PM

 

How to install:

1. Download the attached python file into your nuke-readable directory such as .nuke

2. Modify a couple of variables in the python file:

KEYWORD_URL = 'company'  # you can use any strings here
SERVER_SAVE_PATH = '/path/to/save'  # Set a shareable network directory

3. Add the codes below to your menu.py

import shortCopy
menu.addCommand('Edit/Short Copy', 'shortCopy.short_copy()', 'ctrl+shift+c', index=5)
nukescripts.addDropDataCallback(shortCopy.dropShortCopy)

 

How to use:

Once you install the script, 'Short Copy' menu will be registered to Nuke menu > Edit > ShortCopy (Ctrl+Shift+C)

1. Select some nodes and copy them via Ctrl(Command) + Shift + C

2. Share a copied short URL via Ctrl + V

scpy://nukepedia/name-200615092155964.nk

3. Other users can import the nodes by pasting the short URL in Nuke

 

Update log: 

1.3
- Fixed menu addition guide

1.2
- Updated to use a more portable version of platform user name

 

Enjoy!

 

Please login in order to download these files.

Comments   

 
0 # fast abst 2020-06-17 15:19
Sounds super useful!

At the moment I have this issue:

KEYWORD_HOST = os.uname()[1].s plit('-', 1)[0]
AttributeError: 'module' object has no attribute 'uname'
 
 
0 # eden an 2020-06-17 20:39
Thank you reporting this. I just updated the version to v1.2 which should fix this issue!

The value of KEYWORD_HOST will be used in shortCopy url to have an user-base keyword, in case multiple users copy a node simultaneously. So feel free to modify the value if you want.

Cheers
 
 
0 # fast abst 2020-06-17 15:33
os.uname works on Linux.
 
 
0 # fast abst 2020-06-18 01:02
Now it works! This looks very similar to my current company tool.

At the moment menu.y code is not working and some users might have an issue to install it,
something like this will work:

menubar = nuke.menu ('Nuke')
menubar.addCommand('Edit/Short Copy', 'shortCopy.shor t_copy()', 'ctrl+shift+c', index=5)
nukescripts.addDropDataCallback(shortCopy.dropShortCopy)
 
 
0 # eden an 2020-06-18 20:23
Good catch, I missed the definition of menu variable.
Thank you for flagging It out!
 

You have no rights to post comments

We have 3666 guests and 82 members online