Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-30 Thread Magno Borgo

I usually place the tcl inside the label of a backdropnode to test the results, in fact I have a toolset with several expressions saved on it:[join [lrange [split [file dirname [knob root.name]] "/"] 0 end-1] "/"]

[file dirname [value root.name]]

[lindex [split [value root.name] /] end]

[lindex [split [lindex [split [value root.name] /] end] .] 0]


[file tail [value root.name]]
[file rootname [file tail [value root.name]]]

[date %Hh%Mm%Ss]I like to append the date one on the filename of the quicktime previews, this way a new preview is always created, instead of overwriting and you can compare versions.Magno.Magno,That's a nice, compact way to disassemble and reassemble pathname components! I have used something similar with split before, but I didn't use join, which makes it a lot shorter than what I was doing! ;^)One question I have is, how do you debug your evaluated _expression_ to make sure your pathname is what you want? What I've been doing is to attach a Text node after the Write node and view the result of the text message "[value Write1.file]" - or whatever the name of the Write node happens to be... That gives me an overlay of the printed path. When I look at the result of your _expression_, however, it is not evaluated. I get the same code that is typed in the file section - essentially what "[knob Write1.file]" would report. But when I use something like "[file dirname [file dirname [value root.name]]]" - I get the actual pathname that it's going to write to. Not sure why that would be. Any idea...?Thanks,Rich
Rich BoboSenior VFX CompositorMobile: (248) 840-2665Web: http://richbobo.com/

On Apr 26, 2012, at 11:14 AM, Magno Borgo wrote:Try this one.[join [lrange [split [file dirname [knob root.name]] "/"] 0 end-1] "/"]Change "end-1" to end-2, end-3, and so on to go back on the directory structureHoward,Hmm... That just seems to append /../ to the path and doesn't actually perform the change directory command... Unless I'm missing something.Thanks,RichOn Apr 26, 2012, at 9:14 AM, Howard Jones wrote:[file dirname [value root.name]]/../to be more preciseHowardFrom:Howard Jones mrhowardjo...@yahoo.comTo:Nuke user discussion nuke-users@support.thefoundry.co.ukSent:Thursday, 26 April 2012, 14:11Subject:Re: [Nuke-users] Write node - TCL directory navigation question[file dirname [value root.name]]/../ [file tail [value root.name]]should do it I thinkHowardFrom:Rich Bobo richb...@mac.comTo:Nuke-Users Mailing List nuke-users@support.thefoundry.co.ukSent:Thursday, 26 April 2012, 13:57Subject:[Nuke-users] Write node - TCL directory navigation questionHi,Does anyone know how to indicate a relative directory change in TCL? In a Write node, I'd like to designate the directory to write files to that is parallel to the one the script is in. I'm using this typical form to get the current script directory:[file dirname [file tail [value root.name]]]Then, I'd like to do the equivalent of 'cd ../different_dir'. So, I'd like to have a (hopefully short) chunk of code that would a) grab the script's current directory, b) navigate up one directory and c) indicate the parallel directory to write the files to. Should be easy - I just don't know if it's possible with TCL or if I have to combine some Python in there...Thanks for any help!RichRich BoboSenior VFX CompositorMobile: (248) 840-2665Web: http://richbobo.com/___Nuke-users mailing listNuke-users@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users___Nuke-users mailing listNuke-users@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users___Nuke-users mailing listNuke-users@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users--**Magno Borgowww.borgo.tvwww.boundaryvfx.com___Nuke-users mailing listNuke-users@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users-- **Magno Borgowww.borgo.tvwww.boundaryvfx.com___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-27 Thread Magno Borgo


Try this one. [join [lrange [split [file dirname [knob root.name]] "/"] 0 end-1] "/"]Change "end-1" to end-2, end-3, and so on to go back on the directory structureHoward,Hmm... That just seems to append /../ to the path and doesn't actually perform the change directory command... Unless I'm missing something.Thanks,RichOn Apr 26, 2012, at 9:14 AM, Howard Jones wrote:[file dirname [value root.name]]/../to be more preciseHowardFrom: Howard Jones mrhowardjo...@yahoo.com To: Nuke user discussion nuke-users@support.thefoundry.co.uk  Sent: Thursday, 26 April 2012,
 14:11 Subject: Re: [Nuke-users] Write node - TCL directory navigation question   [file dirname [value root.name]]/../ [file tail [value root.name]] should do it I thinkHowardFrom: Rich Bobo richb...@mac.com To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk  Sent:
 Thursday, 26 April 2012, 13:57 Subject: [Nuke-users] Write node - TCL directory navigation question   Hi,Does anyone know how to indicate a relative directory change in TCL? In a Write node, I'd like to designate the directory to write files to that is parallel to the one the script is in. I'm using this typical form to get the current script directory:[file dirname [file tail [value root.name]]]Then, I'd like to do the equivalent of 'cd ../different_dir'. So, I'd like to have a (hopefully short) chunk of code that would a) grab the script's current directory, b) navigate up one directory and c) indicate the parallel directory to write the files to. Should be easy - I just don't know if it's possible
 with TCL or if I have to combine some Python in there...Thanks for any help!Rich
Rich BoboSenior VFX CompositorMobile: (248)
 840-2665Web: http://richbobo.com/

___Nuke-users mailing listNuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users  ___Nuke-users mailing listNuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users  ___Nuke-users mailing listNuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users-- **Magno Borgowww.borgo.tvwww.boundaryvfx.com___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-27 Thread Rich Bobo
Magno,

That's a nice, compact way to disassemble and reassemble pathname components! I 
have used something similar with split before, but I didn't use join, which 
makes it a lot shorter than what I was doing!  ;^)

One question I have is, how do you debug your evaluated expression to make sure 
your pathname is what you want? What I've been doing is to attach a Text node 
after the Write node and view the result of the text message [value 
Write1.file] - or whatever the name of the Write node happens to be... That 
gives me an overlay of the printed path. When I look at the result of your 
expression, however, it is not evaluated. I get the same code that is typed in 
the file section - essentially what [knob Write1.file] would report. But when 
I use something like [file dirname [file dirname [value root.name]]] - I get 
the actual pathname that it's going to write to.  Not sure why that would be. 
Any idea...?

Thanks,
Rich


Rich Bobo
Senior VFX Compositor

Mobile:  (248) 840-2665
Web:  http://richbobo.com/

On Apr 26, 2012, at 11:14 AM, Magno Borgo wrote:

 Try this one.
 [join [lrange [split [file dirname [knob root.name]] /] 0 end-1] /]
 
 Change end-1 to end-2, end-3, and so on to go back on the directory 
 structure
 
 
 
 
 
 Howard,
 
 Hmm... That just seems to append /../ to the path and doesn't actually 
 perform the change directory command... Unless I'm missing something.
 
 Thanks,
 Rich
 
 
 On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:
 
 [file dirname  [value root.name]]/../
 to be more precise
  
 Howard
 
 From: Howard Jones mrhowardjo...@yahoo.com
 To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 14:11
 Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 
 [file dirname  [value root.name]]/../ [file tail [value root.name]] 
 should do it I think
  
 Howard
 
 From: Rich Bobo richb...@mac.com
 To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 13:57
 Subject: [Nuke-users] Write node - TCL directory navigation question
 
 Hi,
 
 Does anyone know how to indicate a relative directory change in TCL? In a 
 Write node, I'd like to designate the directory to write files to that is 
 parallel to the one the script is in. I'm using this typical form to get the 
 current script directory:
 
 [file dirname [file tail [value root.name]]] 
 
 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
 to have a (hopefully short) chunk of code that would a) grab the script's 
 current directory, b) navigate up one directory and c) indicate the parallel 
 directory to write the files to. Should be easy - I just don't know if it's 
 possible with TCL or if I have to combine some Python in there...
 
 Thanks for any help!
 
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 
 
 --
 **
 Magno Borgo
 
 www.borgo.tv
 www.boundaryvfx.com
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-27 Thread Magno Borgo

I usually place the tcl inside the label of a backdropnode to test the results, in fact I have a toolset with several expressions saved on it:[join [lrange [split [file dirname [knob root.name]] "/"] 0 end-1] "/"]

[file dirname [value root.name]]

[lindex [split [value root.name] /] end]

[lindex [split [lindex [split [value root.name] /] end] .] 0]


[file tail [value root.name]]
[file rootname [file tail [value root.name]]]

[date %Hh%Mm%Ss]I like to append the date one on the filename of the quicktime previews, this way a new preview is always created, instead of overwriting and you can compare versions.Magno.Magno,That's a nice, compact way to disassemble and reassemble pathname components! I have used something similar with split before, but I didn't use join, which makes it a lot shorter than what I was doing! ;^)One question I have is, how do you debug your evaluated _expression_ to make sure your pathname is what you want? What I've been doing is to attach a Text node after the Write node and view the result of the text message "[value Write1.file]" - or whatever the name of the Write node happens to be... That gives me an overlay of the printed path. When I look at the result of your _expression_, however, it is not evaluated. I get the same code that is typed in the file section - essentially what "[knob Write1.file]" would report. But when I use something like "[file dirname [file dirname [value root.name]]]" - I get the actual pathname that it's going to write to. Not sure why that would be. Any idea...?Thanks,Rich
Rich BoboSenior VFX CompositorMobile: (248) 840-2665Web: http://richbobo.com/

On Apr 26, 2012, at 11:14 AM, Magno Borgo wrote:Try this one.[join [lrange [split [file dirname [knob root.name]] "/"] 0 end-1] "/"]Change "end-1" to end-2, end-3, and so on to go back on the directory structureHoward,Hmm... That just seems to append /../ to the path and doesn't actually perform the change directory command... Unless I'm missing something.Thanks,RichOn Apr 26, 2012, at 9:14 AM, Howard Jones wrote:[file dirname [value root.name]]/../to be more preciseHowardFrom:Howard Jones mrhowardjo...@yahoo.comTo:Nuke user discussion nuke-users@support.thefoundry.co.ukSent:Thursday, 26 April 2012, 14:11Subject:Re: [Nuke-users] Write node - TCL directory navigation question[file dirname [value root.name]]/../ [file tail [value root.name]]should do it I thinkHowardFrom:Rich Bobo richb...@mac.comTo:Nuke-Users Mailing List nuke-users@support.thefoundry.co.ukSent:Thursday, 26 April 2012, 13:57Subject:[Nuke-users] Write node - TCL directory navigation questionHi,Does anyone know how to indicate a relative directory change in TCL? In a Write node, I'd like to designate the directory to write files to that is parallel to the one the script is in. I'm using this typical form to get the current script directory:[file dirname [file tail [value root.name]]]Then, I'd like to do the equivalent of 'cd ../different_dir'. So, I'd like to have a (hopefully short) chunk of code that would a) grab the script's current directory, b) navigate up one directory and c) indicate the parallel directory to write the files to. Should be easy - I just don't know if it's possible with TCL or if I have to combine some Python in there...Thanks for any help!RichRich BoboSenior VFX CompositorMobile: (248) 840-2665Web: http://richbobo.com/___Nuke-users mailing listNuke-users@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users___Nuke-users mailing listNuke-users@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users___Nuke-users mailing listNuke-users@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users--**Magno Borgowww.borgo.tvwww.boundaryvfx.com___Nuke-users mailing listNuke-users@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users-- **Magno Borgowww.borgo.tvwww.boundaryvfx.com___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-27 Thread Rich Bobo
Magno,

Thanks for those!

Here are a couple of other 'date' command flavors that may be of use to 
somebody...

Date Formatting:
[date %D]   12/28/11
[date %m%d%y]   122811


Rich

Rich Bobo
Senior VFX Compositor

Mobile:  (248) 840-2665
Web:  http://richbobo.com/


On Apr 27, 2012, at 1:33 PM, Magno Borgo wrote:

 I usually place the tcl inside the label of a backdropnode to test the 
 results, in fact I have a toolset with several expressions saved on it:
 
 [join [lrange [split [file dirname [knob root.name]] /] 0 end-1] /]
 [file dirname [value root.name]]
 [lindex [split [value root.name] /] end]
 [lindex [split [lindex [split [value root.name] /] end] .] 0]
 [file tail [value root.name]]
 [file rootname [file tail [value root.name]]]
 [date %Hh%Mm%Ss]

 
 I like to append the date one on the filename of the quicktime previews, this 
 way a new preview is always created, instead of overwriting and you can 
 compare versions.
 
 Magno.
 
 
 
 Magno,
 
 That's a nice, compact way to disassemble and reassemble pathname components! 
 I have used something similar with split before, but I didn't use join, which 
 makes it a lot shorter than what I was doing!  ;^)
 
 One question I have is, how do you debug your evaluated expression to make 
 sure your pathname is what you want? What I've been doing is to attach a Text 
 node after the Write node and view the result of the text message [value 
 Write1.file] - or whatever the name of the Write node happens to be... That 
 gives me an overlay of the printed path. When I look at the result of your 
 expression, however, it is not evaluated. I get the same code that is typed 
 in the file section - essentially what [knob Write1.file] would report. But 
 when I use something like [file dirname [file dirname [value root.name]]] - 
 I get the actual pathname that it's going to write to.  Not sure why that 
 would be. Any idea...?
 
 Thanks,
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 On Apr 26, 2012, at 11:14 AM, Magno Borgo wrote:
 
 Try this one.
 [join [lrange [split [file dirname [knob root.name]] /] 0 end-1] /]
 
 Change end-1 to end-2, end-3, and so on to go back on the directory 
 structure
 
 
 
 
 
 Howard,
 
 Hmm... That just seems to append /../ to the path and doesn't actually 
 perform the change directory command... Unless I'm missing something.
 
 Thanks,
 Rich
 
 
 On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:
 
 [file dirname  [value root.name]]/../
 to be more precise
  
 Howard
 
 From: Howard Jones mrhowardjo...@yahoo.com
 To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 14:11
 Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 
 [file dirname  [value root.name]]/../ [file tail [value root.name]] 
 should do it I think
  
 Howard
 
 From: Rich Bobo richb...@mac.com
 To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 13:57
 Subject: [Nuke-users] Write node - TCL directory navigation question
 
 Hi,
 
 Does anyone know how to indicate a relative directory change in TCL? In a 
 Write node, I'd like to designate the directory to write files to that is 
 parallel to the one the script is in. I'm using this typical form to get 
 the current script directory:
 
 [file dirname [file tail [value root.name]]] 
 
 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
 to have a (hopefully short) chunk of code that would a) grab the script's 
 current directory, b) navigate up one directory and c) indicate the 
 parallel directory to write the files to. Should be easy - I just don't 
 know if it's possible with TCL or if I have to combine some Python in 
 there...
 
 Thanks for any help!
 
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 
 
 --
 **
 Magno Borgo
 
 www.borgo.tv
 www.boundaryvfx.com
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 
 
 --
 **
 Magno Borgo
 
 www.borgo.tv
 www.boundaryvfx.com

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-27 Thread Michael Hatton
In keeping with the tcl time theme, here's a little date/time format i put
into my Write nodes label

[expr { ([clock seconds] -[file mtime [value knob.file]]) /86400 }]d[clock
format [expr { [clock seconds] -[file mtime [value knob.file]] }] -format
{%Hh%Mm} -gmt true] ago


Tells me how long ago the node was rendered.


Michael


On Fri, Apr 27, 2012 at 3:33 PM, Rich Bobo richb...@mac.com wrote:

 Magno,

 Thanks for those!

 Here are a couple of other 'date' command flavors that may be of use to
 somebody...
 *
 *
 *Date Formatting:*
 [date %D] 12/28/11
 [date %m%d%y] 122811


 Rich

 Rich Bobo
 Senior VFX Compositor

 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/


 On Apr 27, 2012, at 1:33 PM, Magno Borgo wrote:

 I usually place the tcl inside the label of a backdropnode to test the
 results, in fact I have a toolset with several expressions saved on it:

 [join [lrange [split [file dirname [knob root.name]] /] 0 end-1] /]
 [file dirname [value root.name]]
 [lindex [split [value root.name] /] end]
 [lindex [split [lindex [split [value root.name] /] end] .] 0]
 [file tail [value root.name]]
 [file rootname [file tail [value root.name]]]
 [date %Hh%Mm%Ss]


 I like to append the date one on the filename of the quicktime previews,
 this way a new preview is always created, instead of overwriting and you
 can compare versions.

 Magno.



 Magno,

 That's a nice, compact way to disassemble and reassemble pathname
 components! I have used something similar with split before, but I didn't
 use join, which makes it a lot shorter than what I was doing!  ;^)

 One question I have is, how do you debug your evaluated expression to make
 sure your pathname is what you want? What I've been doing is to attach a
 Text node after the Write node and view the result of the text message
 [value Write1.file] - or whatever the name of the Write node happens to
 be... That gives me an overlay of the printed path. When I look at the
 result of your expression, however, it is not evaluated. I get the same
 code that is typed in the file section - essentially what [knob
 Write1.file] would report. But when I use something like [file dirname
 [file dirname [value root.name]]] - I get the actual pathname that it's
 going to write to.  Not sure why that would be. Any idea...?

 Thanks,
 Rich


 Rich Bobo
 Senior VFX Compositor

 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/

 On Apr 26, 2012, at 11:14 AM, Magno Borgo wrote:

 Try this one.
 [join [lrange [split [file dirname [knob root.name]] /] 0 end-1] /]

 Change end-1 to end-2, end-3, and so on to go back on the directory
 structure





 Howard,

 Hmm... That just seems to append /../ to the path and doesn't actually
 perform the change directory command... Unless I'm missing something.

 Thanks,
 Rich


 On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:

 [file dirname  [value root.name]]/../
 to be more precise

 Howard

 --
 *From:* Howard Jones mrhowardjo...@yahoo.com
 *To:* Nuke user discussion nuke-users@support.thefoundry.co.uk
 *Sent:* Thursday, 26 April 2012, 14:11
 *Subject:* Re: [Nuke-users] Write node - TCL directory navigation question

 [file dirname  [value root.name]]/../ [file tail [value root.name]]
 should do it I think

 Howard

 --
 *From:* Rich Bobo richb...@mac.com
 *To:* Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk
 *Sent:* Thursday, 26 April 2012, 13:57
 *Subject:* [Nuke-users] Write node - TCL directory navigation question

 Hi,

 Does anyone know how to indicate a relative directory change in TCL? In a
 Write node, I'd like to designate the directory to write files to that is
 parallel to the one the script is in. I'm using this typical form to get
 the current script directory:

 [file dirname [file tail [value root.name]]]

 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd
 like to have a (hopefully short) chunk of code that would a) grab the
 script's current directory, b) navigate up one directory and c) indicate
 the parallel directory to write the files to. Should be easy - I just don't
 know if it's possible with TCL or if I have to combine some Python in
 there...

 Thanks for any help!

 Rich


 Rich Bobo
 Senior VFX Compositor

 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/


 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Rich Bobo
OK, I shouldn't try to write emails *before* I've had my morning coffee! The 
code I'm using to get the script path is actually:

[file rootname [value root.name]]

Rich

On Apr 26, 2012, at 8:57 AM, Rich Bobo wrote:

 Hi,
 
 Does anyone know how to indicate a relative directory change in TCL? In a 
 Write node, I'd like to designate the directory to write files to that is 
 parallel to the one the script is in. I'm using this typical form to get the 
 current script directory:
 
 [file dirname [file tail [value root.name]]] 
 
 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
 to have a (hopefully short) chunk of code that would a) grab the script's 
 current directory, b) navigate up one directory and c) indicate the parallel 
 directory to write the files to. Should be easy - I just don't know if it's 
 possible with TCL or if I have to combine some Python in there...
 
 Thanks for any help!
 
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Howard Jones
[file dirname  [value root.name]]/../ [file tail [value root.name]] 

should do it I think

 
Howard




 From: Rich Bobo richb...@mac.com
To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 13:57
Subject: [Nuke-users] Write node - TCL directory navigation question
 

Hi,


Does anyone know how to indicate a relative directory change in TCL? In a 
Write node, I'd like to designate the directory to write files to that is 
parallel to the one the script is in. I'm using this typical form to get the 
current script directory:


[file dirname [file tail [value root.name]]] 


Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like to 
have a (hopefully short) chunk of code that would a) grab the script's current 
directory, b) navigate up one directory and c) indicate the parallel directory 
to write the files to. Should be easy - I just don't know if it's possible 
with TCL or if I have to combine some Python in there...


Thanks for any help!


Rich


Rich Bobo
Senior VFX Compositor

Mobile:  (248) 840-2665Web:  http://richbobo.com/ 

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Howard Jones
[file dirname  [value root.name]]/../
to be more precise

 
Howard




 From: Howard Jones mrhowardjo...@yahoo.com
To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 14:11
Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 

[file dirname  [value root.name]]/../ [file tail [value root.name]] 

should do it I think
 
Howard




 From: Rich Bobo richb...@mac.com
To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 13:57
Subject: [Nuke-users] Write node - TCL directory navigation question
 

Hi,


Does anyone know how to indicate a relative directory change in TCL? In a 
Write node, I'd like to designate the directory to write files to that is 
parallel to the one the script is in. I'm using this typical form to get the 
current script directory:


[file dirname [file tail [value root.name]]] 


Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
to have a (hopefully short) chunk of code that would a) grab the script's 
current directory, b) navigate up one directory and c) indicate the parallel 
directory to write the files to. Should be easy - I just don't know if it's 
possible with TCL or if I have to combine some Python in there...


Thanks for any help!


Rich


Rich Bobo
Senior VFX Compositor

Mobile:  (248) 840-2665Web:  http://richbobo.com/ 

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Rich Bobo
Howard,

Hmm... That just seems to append /../ to the path and doesn't actually perform 
the change directory command... Unless I'm missing something.

Thanks,
Rich


On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:

 [file dirname  [value root.name]]/../
 to be more precise
  
 Howard
 
 From: Howard Jones mrhowardjo...@yahoo.com
 To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 14:11
 Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 
 [file dirname  [value root.name]]/../ [file tail [value root.name]] 
 should do it I think
  
 Howard
 
 From: Rich Bobo richb...@mac.com
 To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 13:57
 Subject: [Nuke-users] Write node - TCL directory navigation question
 
 Hi,
 
 Does anyone know how to indicate a relative directory change in TCL? In a 
 Write node, I'd like to designate the directory to write files to that is 
 parallel to the one the script is in. I'm using this typical form to get the 
 current script directory:
 
 [file dirname [file tail [value root.name]]] 
 
 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
 to have a (hopefully short) chunk of code that would a) grab the script's 
 current directory, b) navigate up one directory and c) indicate the parallel 
 directory to write the files to. Should be easy - I just don't know if it's 
 possible with TCL or if I have to combine some Python in there...
 
 Thanks for any help!
 
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Rich Bobo
I tried...

[file dirname [value root.name]][cd ../Comp]

...and it gives me the error couldn't change working directory to ../Comp: 
no such file or directory.  So, I'm thinking that I have to somehow embed the 
cd command as part of the original dirname command. It seems that the cd 
doesn't work because it's outside of that command and is handled as a 
separate, unrelated command...

Rich


On Apr 26, 2012, at 9:38 AM, Rich Bobo wrote:

 Howard,
 
 Hmm... That just seems to append /../ to the path and doesn't actually 
 perform the change directory command... Unless I'm missing something.
 
 Thanks,
 Rich
 
 
 On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:
 
 [file dirname  [value root.name]]/../
 to be more precise
  
 Howard
 
 From: Howard Jones mrhowardjo...@yahoo.com
 To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 14:11
 Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 
 [file dirname  [value root.name]]/../ [file tail [value root.name]] 
 should do it I think
  
 Howard
 
 From: Rich Bobo richb...@mac.com
 To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 13:57
 Subject: [Nuke-users] Write node - TCL directory navigation question
 
 Hi,
 
 Does anyone know how to indicate a relative directory change in TCL? In a 
 Write node, I'd like to designate the directory to write files to that is 
 parallel to the one the script is in. I'm using this typical form to get the 
 current script directory:
 
 [file dirname [file tail [value root.name]]] 
 
 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
 to have a (hopefully short) chunk of code that would a) grab the script's 
 current directory, b) navigate up one directory and c) indicate the parallel 
 directory to write the files to. Should be easy - I just don't know if it's 
 possible with TCL or if I have to combine some Python in there...
 
 Thanks for any help!
 
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Nathan Rusch
[file dirname [file dirname [value root.name]]] should do it.

Nathan

On Apr 26, 2012, at 6:46 AM, Rich Bobo richb...@mac.com wrote:

 I tried...
 
 [file dirname [value root.name]][cd ../Comp]
 
 ...and it gives me the error couldn't change working directory to ../Comp: 
 no such file or directory.  So, I'm thinking that I have to somehow embed 
 the cd command as part of the original dirname command. It seems that the cd 
 doesn't work because it's outside of that command and is handled as a 
 separate, unrelated command...
 
 Rich
 
 
 On Apr 26, 2012, at 9:38 AM, Rich Bobo wrote:
 
 Howard,
 
 Hmm... That just seems to append /../ to the path and doesn't actually 
 perform the change directory command... Unless I'm missing something.
 
 Thanks,
 Rich
 
 
 On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:
 
 [file dirname  [value root.name]]/../
 to be more precise
  
 Howard
 
 From: Howard Jones mrhowardjo...@yahoo.com
 To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 14:11
 Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 
 [file dirname  [value root.name]]/../ [file tail [value root.name]] 
 should do it I think
  
 Howard
 
 From: Rich Bobo richb...@mac.com
 To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 13:57
 Subject: [Nuke-users] Write node - TCL directory navigation question
 
 Hi,
 
 Does anyone know how to indicate a relative directory change in TCL? In a 
 Write node, I'd like to designate the directory to write files to that is 
 parallel to the one the script is in. I'm using this typical form to get 
 the current script directory:
 
 [file dirname [file tail [value root.name]]] 
 
 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
 to have a (hopefully short) chunk of code that would a) grab the script's 
 current directory, b) navigate up one directory and c) indicate the 
 parallel directory to write the files to. Should be easy - I just don't 
 know if it's possible with TCL or if I have to combine some Python in 
 there...
 
 Thanks for any help!
 
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Rich Bobo
Wow. I knew it had to be simple - thanks, Nathan!

Rich


On Apr 26, 2012, at 11:13 AM, Nathan Rusch wrote:

 [file dirname [file dirname [value root.name]]] should do it.
 
 Nathan
 
 On Apr 26, 2012, at 6:46 AM, Rich Bobo richb...@mac.com wrote:
 
 I tried...
 
 [file dirname [value root.name]][cd ../Comp]
 
 ...and it gives me the error couldn't change working directory to 
 ../Comp: no such file or directory.  So, I'm thinking that I have to 
 somehow embed the cd command as part of the original dirname command. It 
 seems that the cd doesn't work because it's outside of that command and is 
 handled as a separate, unrelated command...
 
 Rich
 
 
 On Apr 26, 2012, at 9:38 AM, Rich Bobo wrote:
 
 Howard,
 
 Hmm... That just seems to append /../ to the path and doesn't actually 
 perform the change directory command... Unless I'm missing something.
 
 Thanks,
 Rich
 
 
 On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:
 
 [file dirname  [value root.name]]/../
 to be more precise
  
 Howard
 
 From: Howard Jones mrhowardjo...@yahoo.com
 To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 14:11
 Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 
 [file dirname  [value root.name]]/../ [file tail [value root.name]] 
 should do it I think
  
 Howard
 
 From: Rich Bobo richb...@mac.com
 To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 13:57
 Subject: [Nuke-users] Write node - TCL directory navigation question
 
 Hi,
 
 Does anyone know how to indicate a relative directory change in TCL? In a 
 Write node, I'd like to designate the directory to write files to that is 
 parallel to the one the script is in. I'm using this typical form to get 
 the current script directory:
 
 [file dirname [file tail [value root.name]]] 
 
 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd 
 like to have a (hopefully short) chunk of code that would a) grab the 
 script's current directory, b) navigate up one directory and c) indicate 
 the parallel directory to write the files to. Should be easy - I just 
 don't know if it's possible with TCL or if I have to combine some Python 
 in there...
 
 Thanks for any help!
 
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Howard Jones
You must be missing something or I'm misunderstanding what you want

[file dirname  [value root.name]]/../foo/bar.%04d.exr

will render up one directory from the script - then into 'foo' with img seq' 
bar' which is what I understand you want to do
at least it does here.

 
Howard




 From: Rich Bobo richb...@mac.com
To: Howard Jones mrhowardjo...@yahoo.com; Nuke user discussion 
nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 14:38
Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 

Howard,


Hmm... That just seems to append /../ to the path and doesn't actually perform 
the change directory command... Unless I'm missing something.


Thanks,
Rich




On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:

[file dirname  [value root.name]]/../
to be more precise

 
Howard




 From: Howard Jones mrhowardjo...@yahoo.com
To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 14:11
Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 

[file dirname  [value root.name]]/../ [file tail [value root.name]] 

should do it I think
 
Howard




 From: Rich Bobo richb...@mac.com
To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 13:57
Subject: [Nuke-users] Write node - TCL directory navigation question
 

Hi,


Does anyone know how to indicate a relative directory change in TCL? In a 
Write node, I'd like to designate the directory to write files to that is 
parallel to the one the script is in. I'm using this typical form to get 
the current script directory:


[file dirname [file tail [value root.name]]] 


Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
to have a (hopefully short) chunk of code that would a) grab the script's 
current directory, b) navigate up one directory and c) indicate the 
parallel directory to write the files to. Should be easy - I just don't 
know if it's possible with TCL or if I have to combine some Python in 
there...


Thanks for any help!


Rich


Rich Bobo
Senior VFX Compositor

Mobile:  (248) 840-2665Web:  http://richbobo.com/ 

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Rich Bobo
Howard,

Thanks. Maybe it does render to the correct place when actually processing a 
render. I was only looking at what it evaluated to and it was just showing me 
the /../ in the path and not the actual evaluated path - where it was going 
to go. Nathan's suggestion of adding another enclosing dirname did the trick 
for what I needed:

[file dirname [file dirname [value root.name]]] 

Thanks for the help!

Rich

On Apr 26, 2012, at 1:13 PM, Howard Jones wrote:

 You must be missing something or I'm misunderstanding what you want
 
 [file dirname  [value root.name]]/../foo/bar.%04d.exr
 
 will render up one directory from the script - then into 'foo' with img seq' 
 bar' which is what I understand you want to do
 at least it does here.
  
 Howard
 
 From: Rich Bobo richb...@mac.com
 To: Howard Jones mrhowardjo...@yahoo.com; Nuke user discussion 
 nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 14:38
 Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 
 Howard,
 
 Hmm... That just seems to append /../ to the path and doesn't actually 
 perform the change directory command... Unless I'm missing something.
 
 Thanks,
 Rich
 
 
 On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:
 
 [file dirname  [value root.name]]/../
 to be more precise
  
 Howard
 
 From: Howard Jones mrhowardjo...@yahoo.com
 To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 14:11
 Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 
 [file dirname  [value root.name]]/../ [file tail [value root.name]] 
 should do it I think
  
 Howard
 
 From: Rich Bobo richb...@mac.com
 To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
 Sent: Thursday, 26 April 2012, 13:57
 Subject: [Nuke-users] Write node - TCL directory navigation question
 
 Hi,
 
 Does anyone know how to indicate a relative directory change in TCL? In a 
 Write node, I'd like to designate the directory to write files to that is 
 parallel to the one the script is in. I'm using this typical form to get the 
 current script directory:
 
 [file dirname [file tail [value root.name]]] 
 
 Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
 to have a (hopefully short) chunk of code that would a) grab the script's 
 current directory, b) navigate up one directory and c) indicate the parallel 
 directory to write the files to. Should be easy - I just don't know if it's 
 possible with TCL or if I have to combine some Python in there...
 
 Thanks for any help!
 
 Rich
 
 
 Rich Bobo
 Senior VFX Compositor
 
 Mobile:  (248) 840-2665
 Web:  http://richbobo.com/
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] Write node - TCL directory navigation question

2012-04-26 Thread Howard Jones
Yes - I've used that as well, the only problem is it becomes less clear when 
you need to go up several directories for example,
which is why I use this method (for proxy generation in this case).

But as you say it will not evaluate in the file path (though does show you 
correctly in the browser section).

 
Howard




 From: Rich Bobo richb...@mac.com
To: Howard Jones mrhowardjo...@yahoo.com; Nuke user discussion 
nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 20:28
Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 

Howard,


Thanks. Maybe it does render to the correct place when actually processing a 
render. I was only looking at what it evaluated to and it was just showing me 
the /../ in the path and not the actual evaluated path - where it was going 
to go. Nathan's suggestion of adding another enclosing dirname did the trick 
for what I needed:


[file dirname [file dirname [value root.name]]] 


Thanks for the help!


Rich


On Apr 26, 2012, at 1:13 PM, Howard Jones wrote:

You must be missing something or I'm misunderstanding what you want


[file dirname  [value root.name]]/../foo/bar.%04d.exr


will render up one directory from the script - then into 'foo' with img seq' 
bar' which is what I understand you want to do
at least it does here.

 
Howard




 From: Rich Bobo richb...@mac.com
To: Howard Jones mrhowardjo...@yahoo.com; Nuke user discussion 
nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 14:38
Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 

Howard,


Hmm... That just seems to append /../ to the path and doesn't actually 
perform the change directory command... Unless I'm missing something.


Thanks,
Rich




On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:

[file dirname  [value root.name]]/../
to be more precise

 
Howard




 From: Howard Jones mrhowardjo...@yahoo.com
To: Nuke user discussion nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 14:11
Subject: Re: [Nuke-users] Write node - TCL directory navigation question
 

[file dirname  [value root.name]]/../ [file tail [value root.name]] 

should do it I think
 
Howard




 From: Rich Bobo richb...@mac.com
To: Nuke-Users Mailing List nuke-users@support.thefoundry.co.uk 
Sent: Thursday, 26 April 2012, 13:57
Subject: [Nuke-users] Write node - TCL directory navigation question
 

Hi,


Does anyone know how to indicate a relative directory change in TCL? In a 
Write node, I'd like to designate the directory to write files to that is 
parallel to the one the script is in. I'm using this typical form to get 
the current script directory:


[file dirname [file tail [value root.name]]] 


Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd 
like to have a (hopefully short) chunk of code that would a) grab the 
script's current directory, b) navigate up one directory and c) indicate 
the parallel directory to write the files to. Should be easy - I just 
don't know if it's possible with TCL or if I have to combine some Python 
in there...


Thanks for any help!


Rich


Rich Bobo
Senior VFX Compositor

Mobile:  (248) 840-2665Web:  http://richbobo.com/ 

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users