AWS Thinkbox Discussion Forums

Houdini - How to Set Default Submission values through CustomSanityChecks?

Hi Guys,

The example for the customSanityChecks.py file in the Houdini Documentation only explains how to enable/disable a inputfield in the Submitter UI.

I’d like to set values for Pools, and submitscene for example.
How do I go about that?

Slight Bump?

Simple question, how do we set some defaullt values in the Houdini Submitter through CustomSanityChecks?

Hi Ricardo,

There is a little hint from the docs, but it’s not complete

https://docs.thinkboxsoftware.com/products/deadline/10.0/1_User%20Manual/manual/app-houdini.html#custom-sanity-check-setup

https://www.awsthinkbox.com/streamlining-job-submission-with-sanity-checks

I took a look at this and copied and pasted the example, then opened SubmitHoudiniToDeadline.py from the repo and copied out some of their values, seems to work for me (although the version bit they included doesn’t work?!)

# CustomSanityChecks.py

import hou

def RunSanityCheck( dialog ):
    # Disable the Job Name box.
    dialog.enableValue( "jobname.val", False )
    # Set Comment
    dialog.setValue( "comment.val", "custard samedi" )
    dialog.enableValue( "comment.val", False )
    dialog.setValue( "group.val", "houdini175293" )
    dialog.setValue( "priority.val", 69 )

    # Don't open the submitter if the version number of Houdini is less than 17.
    if hou.applicationVersion()[0] < 17:
        hou.ui.displayMessage( "Jobs can only be submitted from Houdini 17 and later.", title="Submit Houdini To Deadline" )
        return False

    return True

Keep in mind if you use the Deadline ROP it doesn’t work with the sanity script but you can create presets
https://docs.thinkboxsoftware.com/products/deadline/10.0/1_User%20Manual/manual/app-houdini.html#setting-defaults

Also if you’re testing it’s worth re-opening houdini as just running the submission button in houdini doesn’t always update

1 Like

Thanks for that!
:slight_smile:

About the update, I think thats down to the machine reading .pyc files instead.
I have actually disabled the writing of .pyc files system wide for our studio using PYTHONDONTWRITEBYTECODE=1 env variable.
This doesnt seem to adversely affect anything and actually seems to have sped up running python code a tiny bit. And it allows you to see immediate code changes :slight_smile:

1 Like

You can force the refresh of .pyc files in houdini python shell by running the following lines. First line you need to use only once per houdini session.

root = "//YOUR_REPO_ROOT/";import os;os.chdir(root + "custom/submission/Houdini/Main/");import SubmitHoudiniToDeadline; import CustomSanityChecks; import SubmitHoudiniToDeadlineFunctions; import SubmitDeadlineRop

reload(SubmitHoudiniToDeadline) ;reload(CustomSanityChecks) ;reload(SubmitHoudiniToDeadlineFunctions) ;reload(SubmitDeadlineRop)
1 Like
Privacy | Site terms | Cookie preferences