If you really need to put it in the proxy path, a simple find / replace
would do it
 
local_root = "/localcacheFolder/"
path = "/Volumes/RAID/project/file.exr"






def set_proxy_path(node):
convert_path = node['file'].value().replace("/Volumes", "_Volumes")
proxy_path =  local_root + convert_path
node['proxy'].setValue(proxy_path)



node = nuke.selectedNode()
 
 
 
--
Hugo Léveillé
Head of 2D, MELS
[email protected]
 
 
 
On Tue, Mar 22, 2016, at 18:24, Randy Little wrote:
> Do you need to do it like that? Auto localize doesn't work in this
> situation?  It won't populate the proxy input but it will use the
> localized file vs the server file. Then set the read to Cache locally
> always.   I'm sure you know all this but just throwing it out.  Since
> doing this can take quite some time on big shots on the wrong network.
>
> Randy S. Little
> http://www.rslittle.com/
> http://www.imdb.com/name/nm2325729/
>
>
> On Tue, Mar 22, 2016 at 6:06 PM, jean-luc <[email protected]> wrote:
>> I’m trying to populate the proxy path of a read node automatically
>> with the local cache path of the file.
>>
>> So If the read node is pointing at: */Volumes/RAID/project/file.exr*
>> I want the proxy path to be
>> */localcacheFolder/_Volumes/RAID/project/file.exr*
>>
>> In a perfect world, I’d have this in the nuke menu and I’d have “add
>> localized cache to proxy path”  and “remove localized cache from
>> proxy path”
>>
>> I have an easy way to add a local folder in front of the file path
>> but I’m stuck because of the underscore that is added in front of
>> “Volumes” in the local cache folder
>>
>> So if I put this in the proxy path: */localcacheFolder[knob file]
>> *it almost works except for that underscore thing. Is there a way to
>> skip the first folder of the [knob file]?
>>
>> cheers
>>
>> Jean-Luc
>>
>>
>>
>>
>> _______________________________________________
>>  Nuke-users mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
> _________________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to