Menu

How to use previewcmds ?

2012-03-20
2012-12-11
  • Jin-Kuen Lin

    Jin-Kuen Lin - 2012-03-20

    Thanks for your powerful render farm manager.
    Afanasy helps me alot for queuing and managing our render jobs!

    I find "previewcmds" in the document of "Afanasy Watch Configuration". This is a good function to preview and check images immediately. But I can't find the option in the menu of Watch UI. Can you give me some examples ?

    Thank you !

     
  • Timur Hairulin

    Timur Hairulin - 2012-03-20

    Hi. See cgru/config_default.xml. Here is some text from it:

    <!- Commands argument = "@ARG@"
         To clear a list specify an empty element text.
    ->
       <previewcmds>nuke -v @ARG@</previewcmds>
       <previewcmds>imf_disp @ARG@</previewcmds>
       <previewcmds>mplay @ARG@</previewcmds>

    This commands will appear in AfWatch GUI in job tasks window in task RMB menu.
    Choose menu item to launch specific command.

     
  • Anonymous

    Anonymous - 2012-03-21

    I miss the setting of setFiles() so the previewcmd doesn't appear in the GUI.
    SInce I try to set it. I get some trouble.
    There is my code.

    import af
    job = af.Job('test')
    block = af.Block('block of tasks')
    block.setWorkingDirectory('/')
    block.setCommand('ls ooxx.@#@.exr')
    block.setFiles('ooxx.@#@.exr')
    for f in xrange(10):
        frame = '%04i' % f
        task = af.Task(frame)
        task.setCommand(frame)
        block.tasks.append(task)
    job.setNeedOS('linux')
    job.blocks.append(block)
    job.setPriority(0)
    job.send()

    It's a non-numeric job.
    The command generated by afanasy works fine.
    But the file name not.

    ex:
    command: ls ooxx.0001.exr
    files: ooxx.@#@.exr

    Did I do anything wrong ?

     
  • Timur Hairulin

    Timur Hairulin - 2012-03-21

    You missed
    task.setFiles( frame)

     
  • Anonymous

    Anonymous - 2012-03-22

    I add this.
    The command and file are correct.
    But when I execute previewcmd, the @ARG@ has no frame number.

    ex:
    I execute the previewcmd as "echo @ARG@ > /tmp/ooxx" for checking the file name.

    Files in AfWatch GUI: ooxx.0004.exr
    cat /tmp/ooxx: ooxx..exr

     
  • Timur Hairulin

    Timur Hairulin - 2012-03-22

    Oh. Is seems that there is a bug in afwatch.
    (I never used preview for non-numeric blocks at all :) We use only numeric blocks for all software services(submitters), and non-numeric for some specific tools, where no preview needed).
    And it is not a simple mistake, tasks list has no info about tasks command and files, it was done so to speed up sytem on huge tasks number. That list has full info only about blocks. When you double-click a task, it requests tasks full data from server.
    So now afwatch preview working only with numeric blocks.
    I should make some another mechanism to preview non-numeric blocks, that request full data of selected task. But not in the   next 1.6.0 release that coming soon, later, i'll try in 1.6.1.

    ps
    Try to use numeric blocks with services that are split-able by frames (as in your example). It reduces network traffic, server database usage and generally speeds-up entire system.

     
  • Anonymous

    Anonymous - 2012-03-22

    Sometimes we need to render separate frames for fail rendering. Our tool provide custom frames setting for render.
    Ex: 1,3-4,10-18 for render frame one, three to four, and ten to eighteen.

    Do you have any idea about our condition with numeric block ?

    Thank you !

     
  • Timur Hairulin

    Timur Hairulin - 2012-03-22

    You can generate several numeric blocks (for your example - 3 blocks for each range).
    But job will be not comfortable (for GUI) if number if blocks will be big.
    Or you can send several jobs.
    (
    or simple wait 1-2 month for 1.6.1
    or we can contact earlier when code will be written and you can compile afwatch with the fix
    )
    ps
    Also i should think about some GUI optimization for huge blocks amount.

     
  • Timur Hairulin

    Timur Hairulin - 2012-03-27

    It is already implemented in sources.
    AfWatch can preview non-numeric tasks in a task window (by double click on a task).
    ( this way GUI requests full task info)

     

Log in to post a comment.