0

Shotgun and qube rendering in Nuke

Hi,

Nuke renders submited to render farm give following error:

[10:35.38] ERROR: None_output_v004: 'WriteTank': unknown command. This is most likely from a corrupt .nk file, or from a missing or unlicensed plug-in. Can't render from that Node.
You must specify a file name to write to.

I've tried approach described here https://toolkit.shotgunsoftware.com/entries/23481723 but it doesn't solve our issue. What exactly Shotgun does during Nuke startup to initialize it's nodes?

 

regards

Adam

댓글 2개

  • 0
    Avatar
    Adam

    Hi,

    thanks for this explanation. Indeed, environment didn't have tk-nuke-writenode app. Plus I passed incorrect path to init_sgtk. It is all working now.

    regards

    Adam

  • 0
    Avatar
    Alan Dann

    Hi Adam,

    The Shotgun Write Node is implemented as a Gizmo and the tk-nuke-writenode app is responsible for setting this up so that Nuke can find it.

    If you've set up your init.py as described in the documentation (https://support.shotgunsoftware.com/entries/95440797 then the most likely problem is that the environment Toolkit is initialising doesn't contain the tk-nuke-writenode app!

    The environment Toolkit uses will depend on the contents of the context the init.py manages to construct from the file path.  For example, if the context contains a Shot entity but no Step then, in our default configuration Toolkit will load the Shot.yml environment which doesn't contain the tk-nuke-writenode app.  If it does contain a Step then Toolkit would load the Shot_step.yml environment which does contain the tk-nuke-writenode app.

    In init.py, the context is constructed from the path - if you specify a nuke script as part of the command line then this will be used, otherwise it will use default_work_area_path as defined in init.py.  Toolkit will then look for entities that match parts of this path and try to build a context from those entities.  If your path contains a Step then this should work fine but if not then the step in the resulting context will be empty which will potentially lead to the wrong environment being loaded - a quick look at your templates will show if you use Step in your nuke work file paths or not.

    Sorry for the long-winded explanation!

    Now, to get Toolkit loading the correct environment (I'm assuming you have a Shot_Step.yml environment and your paths don't contain Step - if this isn't the case then I'll need to take a closer look at your configuration!), you'll need to customise init.py so that it finds the Step information from somewhere else and builds a new context with the Step included so that Toolkit can initialise the Shot_Step.yml environment.

    If you have Task in your path and each task is associated with a step then this is fairly straightforward - just create a new context from the task of the previous context, e.g.:

    ...
    import sgtk
    tk = sgtk.Sgtk(default_work_area_path)
    ctx = tk.context_from_path(work_area_path)

    if not ctx.step and ctx.task:
    # create a new context from the previous context's Task:
    ctx = tk.context_from_entity("Task", ctx.task["id"])

    sgtk.platform.start_engine("tk-nuke", tk, ctx)
    ...

    If your paths don't contain Task or Step then it's more complicated as you'll need to pass the full context through some other mechanism, e.g. the environment - hopefully the above example will work for you though?

    I'll update the documentation with this as well.

    Thanks

    Alan

     

     

댓글을 남기려면 로그인하세요.