AWS Thinkbox Discussion Forums

Clarisse output directory through python

I am trying to build a python post script for Clarisse that requires me to know where the output directory is. I noticed this not available by default like most software. Obviously Deadline know gets it somehow to be able to render to the correct folder. Any idea how I can fetch that information?

Clarisse 3.5 SP3 using Cnode

Hello Mohamed,

Currently we do not know what the output directory is in the job. We are currently just telling Clarisse which image to render and letting Clarisse handle the output for that image.

Grant

Grant covered what we’re currently doing, but it shouldn’t actually be too hard to that information in yourself.

Currently in DeadlineRepository10/submission/Clarrise/Main/SubmitClarisseToDeadline.py, we have this snippet that grabs all the renderable images when submitting through Clarisse:

# Grab Images and their layers that have enabled 'render_to_disk'
objects = ix.api.OfObjectArray()
ix.application.get_factory().get_all_objects( "Image", objects )
renderableImages = []
for image in objects:
    if image.get_attribute( "render_to_disk" )[0]:
        renderableImages.append(image.get_full_name())
    for layer in image.get_module().get_all_layers():
        if layer.get_object().get_attribute( "render_to_disk" )[0]:
            renderableImages.append( layer.get_object().get_full_name() )

If we then modify this slightly, we can also grab the output paths.

# Grab Images and their layers that have enabled 'render_to_disk' and map those to their output paths
objects = ix.api.OfObjectArray()
ix.application.get_factory().get_all_objects( "Image", objects )
renderableImages = {}
for image in objects:
    if image.get_attribute( "render_to_disk" )[0]:
        renderableImages[ image.get_full_name() ] = image.get_attribute( "save_as" )[0]
    for layer in image.get_module().get_all_layers():
        if layer.get_object().get_attribute( "render_to_disk" )[0]:
            renderableImages[ layer.get_object().get_full_name() ] = layer.get_object().get_attribute( "save_as" )[0]

This changes renderableImages to a dict that has the renderableImage mapped to its output directory. However, this also requires you to change how we handle this new information in the submitter. So you’d also have to modify DeadlineRepository10/scripts/Submission/ClarisseSubmission.py to handle this different value type (and to later on pass these values to the job files).

This seems like a decent starting point, feel free to post back with your questions/results :smiley:!

Cheers

1 Like
Privacy | Site terms | Cookie preferences