rvDropping v1.3

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Frank Rueter
Website: www.ohufx.com
drop clips from RV's session manager into Nuke's DAG
6.2, 6.3 or later
Linux, Mac, Windows
10 Apr 2012

1.3: fixed indentation error

1.2: this should make it workable on windows as well. I haven't been able to test it, so please leave feedback if there are any problems.

1.1: some fixes to support various padding formats as well as white spaces in file names


This enables Nuke to receive data that was dragged out of RV's session manager to create Read nodes.
Right now only RV's source entities are supported.


To activate, place this file in your plugin path and add the following lines to your menu.py:

from rvDropping import rvDropping
nukescripts.addDropDataCallback( rvDropping )
Please login in order to download these files.


# Joerg Bruemmer 2011-04-19 10:11
Haha - looks like we had the same in mind. We pretty much did the same thing here. It a very cool way to "browser&import " footage.
# Ildus Gabidullin 2012-01-29 20:41
Thanks Frank
# Travis Button 2012-04-10 09:54
Hi Frank, this would be quite useful but I'm getting these errors when I try to open Nuke. I've tried moving your commented notes to a different line and everything, nothing seems to work other than just moving the error to a different area of the script.
File "C:/Users/Sikam ore Studios/.nukevD ropping.py", line 16
reMatch = re.match( r'.+{"(.+)"}', d ) #GET FILE PATH FORM RV SYNTAX
IndentationError: unindent does not match any outer indentation level

any ideas?
# frank rueter 2012-04-10 17:52
Hi Travis,

sorry about that, there was indeed a stray tab in line 15 that caused the error. I have corrected and re-uploaded, so give that a try and let me know if it works for you now.
# Travis Button 2012-04-11 09:26
Thanks! Yeah, I suppose had I been viewing that in a proper code based text editor it would have been more visibly obvious.
# frank rueter 2012-04-11 16:03
glad it works now. Not every editor makes this problem apparent. I use Wing, which is awesome as in many ways and warns you if it finds mixed (and therefore invalid) indentation. It also lets you convert the document to unify indentation and fix those kind of problems very easily. I obviously must have used something else when I saved out this script for Nukepedia :-D
# Brian Willard 2012-07-13 15:24

It might be nice to add support for dragging in 'rvlink' urls too. something like this:

if text.startswith ( 'rvlink' ):
print 'this is an rvlink file :-)'

decodeURL = urllib.url2path name(text)
filePath = decodeURL.strip ().split(' ')[-1]
cleanPath = nukescripts.rep laceHashes(file Path)
padRE = re.compile('%0( d+)d')
padMatch = padRE.search(cl eanPath)

if padMatch:
padSize = int(padMatch.gr oup(1))
frameList = sorted(glob.igl ob(padRE.sub('[ 0-9]' * padSize, cleanPath)))
first = os.path.splitex t(frameList[0]) [0][-padSize:]
last = os.path.splitex t(frameList[-1] )[0][-padSize:]

r = nuke.createNode ( 'Read', 'file {%s}' % ( cleanPath ), inpanel=False )
r['first'].setV alue( int(first) )
r['last'].setVa lue( int(last) )
r['origfirst']. setValue( int(first) )
r['origlast'].s etValue( int(last) )
return True
# Frank Rueter 2012-07-13 19:06
thanks Brian, will look into it on monday
# Frank Rueter 2012-07-17 19:43
Hi Brian, I just had a quick look and when I decode a rvlink here I just get the same (encoded) string back. Nothing I can parse for file names or frame ranges. How did you get your example to work?
# Brian Willard 2012-07-17 23:39

when I looked into it, rv has two ways to encode files -bakedURL and -encodeURL. if you have a bakedURL you can use something like this to decode:

filePath = '/Volumes/VFX/J OBS/12020/1ST_V ERSE_SCN_090.d .exr' # original file
bakedURL = 'rvlink://baked/207276202d6c202d706c6179202f566f6c756d65732f5646582f4a4f42532f31323032302f3153545f56455253455f53434e5f3039302e253035642e657872'
print 'rvlink://'+bakedURL.split('/')[-1].decode("hex")

If you have an encodeURL you can use urllib.url2path name() to decode the rvlink url like this:

encodedURL = 'rvlink:// rv -l -play /Volumes/VFX/JOBS/12020/1ST_VERSE_SCN_090.-).exr'
print urllib.url2pathname(encodedURL)

The problem I found using encodedURL is that nuke's frame padding d looks like a web encoded character so rv encodes/decodes it like this:

Brian-MacPro-Dev:~ kidb$ rv rv -l -play /Volumes/VFX/JO BS/12020/1ST_VE RSE_SCN_090.d. exr -encodeURL
INFO: command line for encoding ' rv -l -play /Volumes/VFX/JO BS/12020/1ST_VE RSE_SCN_090.d. exr'
Encoded URL: rvlink:// rv -l -play /Volumes/VFX/JO BS/12020/1ST_VE RSE_SCN_090.d. exr
Brian-MacPro-Dev:~ kidb$ rv rvlink:// rv -l -play /Volumes/VFX/JO BS/12020/1ST_VE RSE_SCN_090.d. exr
INFO: received URL 'rvlink:// rv -l -play /Volumes/VFX/JO BS/12020/1ST_VE RSE_SCN_090.d. exr'
INFO: decoded URL 'rvlink:// rv -l -play /Volumes/VFX/JO BS/12020/1ST_VE RSE_SCN_090.d.e xr'
ERROR: Cannot access file rv (0)
No files in sequence /Volumes/VFX/JO BS/12020/1ST_VE RSE_SCN_090.d.e xr (1)

the % in the padding needs to be converted to ascii hex which is % so when I was generating my email I was doing this to encode the path separately:

newFilePath = urllib.pathname2url(filePath)
...html email stuff...

Path to Frames:


I could work on some code for baked/encoded rvlink url handling if you like.
# Brian Willard 2012-07-17 23:44
ha! guess my html email stuff was processed, what I ment was basically this minus the tags.

Path to Frames:
href="rvlink: -l -play %(newFilePath)s ">%(filePath)s
# Frank Rueter 2012-07-18 16:32
I see. I am quite busy at the moment so won't have time to look into this now, but if you want to prep something I am more than happy to update my script with it.

You have no rights to post comments

We have 2424 guests and 50 members online