rvDropping v1.3
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Frank Rueter
drop clips from RV's session manager into Nuke's DAG
Requirements:
6.2, 6.3 or later
Linux, Mac, Windows
6.2, 6.3 or later
Linux, Mac, Windows


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:
1 2 |
from rvDropping import rvDropping nukescripts.addDropDataCallback( rvDropping ) |
Please login in order to download these files.
Comments
------------------------------------
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?
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.
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:]
# CREATE THE READ NODE
r = nuke.createNode ( 'Read', 'file {%s}' % ( cleanPath ), inpanel=False )
try:
r['first'].setV alue( int(first) )
r['last'].setVa lue( int(last) )
r['origfirst']. setValue( int(first) )
r['origlast'].s etValue( int(last) )
except:
pass
return True
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:
%(filePath)s
I could work on some code for baked/encoded rvlink url handling if you like.
Path to Frames:
href="rvlink: -l -play %(newFilePath)s ">%(filePath)s
RSS feed for comments to this post