In general it's easy, just evaluate the file knob and set it as new value:

filex = node['file'].evaluate()
node['file'].setValue(filex)

The problem is that the frame number also gets evaluated so you have to find a 
way to bring back "%04d" or whatever framepadding you are using.

----- Original Message -----
From: [email protected]
To: [email protected]
Date: 21.09.2011 14:54:44
Subject: Re: [Nuke-users] Replace Python with constant string


> I'm sure this can be done, I have no idea how, though. I was just wondering
> why you would want something like this. Now I know.
> 
> Cheers,
> Ron Ganbar
> email: [email protected]
> tel: +44 (0)7968 007 309 [UK]
>      +972 (0)54 255 9765 [Israel]
> url: http://ronganbar.wordpress.com/
> 
> 
> 
> On 20 September 2011 21:35, Eddie Offermann  wrote:
> 
> > **
> > Good point Ron, though it may be possible (I say this not being in any way
> > familiar with Anselm's code) that the values that are being computed may be
> > related to the user's environment and may not persist on the farm.
> >
> > In our facility, we have a number of situations like this and have chosen
> > to use callback functions in many places. Rather than having python directly
> > in the fields that we want to populate, the python callback sets the value
> > of the field.
> >
> >
> > On 09/19/2011 10:20 PM, Ron Ganbar wrote:
> >
> > Won't royal render simply be launching Nuke and Nuke will
> > be interpreting the Python?
> >
> >
> > Ron Ganbar
> > email: [email protected]
> > tel: +44 (0)7968 007 309 [UK]
> >      +972 (0)54 255 9765 [Israel]
> > url: http://ronganbar.wordpress.com/
> >
> >
> >
> > On 20 September 2011 08:17, Anselm Lier  wrote:
> >
> >> Hi all,
> >>
> >> how can I replace the python in all my Read nodes at once with the
> >> constant string that the python would create? I need to do this to make my
> >> comp work in royal render (render farm). Or does anyone know how royal
> >> render would understand the python code?
> >>
> >> I already tried the search and replace command (shift+ctrl+backslash i
> >> think it is) and it didn't work. I think it works when you put python into
> >> the file path, but it can't remove it.
> >>
> >> Regards,
> >> Anselm_______________________________________________
> >> Nuke-users mailing list
> >> [email protected], http://forums.thefoundry.co.uk/
> >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
> >>
> >
> >
> >
> > --
> > *Eddie Offermann* *|* *method studios la*
> > *t:* +1 310 434 6500 *|* *f:* +1 310 434 6501
> > 730 arizona ave *|* santa monica *|* ca 90401 *|* www.methodstudios.com
> >
> > This e-mail and any attachments are intended only for use by the
> > addressee(s) named herein and may contain confidential information. If you
> > are not the intended recipient of this e-mail, you are hereby notified any
> > dissemination, distribution or copying of this email and any attachments is
> > strictly prohibited. If you receive this email in error, please immediately
> > notify the sender by return email and permanently delete the original, any
> > copy and any printout thereof. The integrity and security of e-mail cannot
> > be guaranteed.
> >
> > _______________________________________________
> > 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