Nuke on Windows will be completely different.. but..

On Linux/OS X, Nuke only prints progress information to a TTY (e.g when it's running in a terminal, but not when called via subprocess)

You can run the subprocess in a pseudo-terminal with help from the "pty" module, but it's not necessarily straight forward.. Here is a quick attempt, which seems to mostly work on Linux:

https://gist.github.com/dbr/6985734

The pexpect module might work for this, making things much simpler and more reliable:
http://www.noah.org/wiki/pexpect


..but, yes, it would be nicer if there was a way to get the progress information in a dumb-terminal, without the above workaround (e.g "nuke -V3 -x ...")

On 15/10/13 03:32, Fredrik Averpil wrote:
Scratch that. The method should work, but it doesn't (with Nuke) because
how Nuke's outputting the percentage value. I just got this confirmed by
The Foundry. However they have an update coming for this, or at least
it's in their system.

So currently, it's not possible to catch Nuke's render progress from stdout.

// Fredrik

11 okt 2013 kl. 12:35 skrev Fredrik Averpil <fredrik.aver...@gmail.com
<mailto:fredrik.aver...@gmail.com>>:

Using a python wrapper script:
http://fredrikaverpil.tumblr.com/post/63722065215

// Fredrik



On Fri, Oct 11, 2013 at 11:40 AM, Jordan O <jorxs...@gmail.com
<mailto:jorxs...@gmail.com>> wrote:

    How did you manage to do it, out of curiousity?



    On Wed, Oct 2, 2013 at 11:50 AM, Fredrik Averpil
    <fredrik.aver...@gmail.com <mailto:fredrik.aver...@gmail.com>> wrote:

        Never mind, solved it!


        On Tue, Oct 1, 2013 at 10:11 PM, Fredrik Averpil
        <fredrik.aver...@gmail.com <mailto:fredrik.aver...@gmail.com>>
        wrote:

            I forgot to mention I'd like to print to stdout, not just
            "print".

            // Fredrik


            On Tue, Oct 1, 2013 at 9:30 PM, Fredrik Averpil
            <fredrik.aver...@gmail.com
            <mailto:fredrik.aver...@gmail.com>> wrote:

                Hi,

                Is it at all possible to print out a custom progress
                message while rendering?
                Let's say I'd like to print the progress percentage
                each Nth second or whenever the progress percentage
                increases by N percent, like this:

                Rendering 1%
                Rendering 2%
                Rendering 3%
                and so on...


                Regards,
                Fredrik




        _______________________________________________
        Nuke-python mailing list
        Nuke-python@support.thefoundry.co.uk
        <mailto:Nuke-python@support.thefoundry.co.uk>,
        http://forums.thefoundry.co.uk/
        http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python



    _______________________________________________
    Nuke-python mailing list
    Nuke-python@support.thefoundry.co.uk
    <mailto:Nuke-python@support.thefoundry.co.uk>,
    http://forums.thefoundry.co.uk/
    http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python




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

--
ben dickson
2D TD | ben.dick...@rsp.com.au
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to