AWS Thinkbox Discussion Forums

C4D Cinema 4D Custom Sanity

Deadline 9.0.10, Maxon C4D R17/R18

I get this problem on OSX / Windows with the Custom Sanity Check

Using the documentation example shown here
docs.thinkboxsoftware.com/produ … nity-check

[code]import c4d
from c4d import gui

def RunSanityCheck( dialog ):

dialog.SetString( dialog.DepartmentBoxID, "The Best Department!" )
dialog.SetLong( dialog.PriorityBoxID, 33 )
dialog.SetLong( dialog.ConcurrentTasksBoxID, 2 )

gui.MessageDialog( "This is a custom sanity check!" )

return True[/code]

I get the following error message

If I strip out the. dialog options and leave the gui message it works fine.

[code]import c4d
from c4d import gui

def RunSanityCheck( dialog ):

gui.MessageDialog( "This is a custom sanity check!" )

return True[/code]

Anyone done any customisation with this and have the same issue?

Hey Anthony,

This is a case of us missing an update to the documentation, sorry about that. During the lifetime of Deadline 9, we switched how we store the IDs of all the UI elements so that we could better handle the ID generation. So previously we had stored them straight in the “SubmitC4DToDeadlineDialog” object as instance variables, but now we store in them in a dict in that dialog object. To show you what I mean, this is what the updated documentation should look like:

import c4d
from c4d import gui

def RunSanityCheck( dialog ):

    dialog.SetString( dialog.dialogIDs[ "DepartmentBoxID" ], "The Best Department!" )
    dialog.SetLong( dialog.dialogIDs[ "PriorityBoxID" ], 33 )
    dialog.SetLong( dialog.dialogIDs[ "ConcurrentTasksBoxID" ], 2 )

    gui.MessageDialog( "This is a custom sanity check!" )

    return True

Fair warning, I haven’t actually tested this code yet, I just wrote it straight into this post, but we’ll be updating the documentation for the C4D CustomSanityCheck.py as part of this.

Let me know how this works for you!

Cheers

This works!

Thank you Morgan

Managed to get what I wanted done, which was to add an entry box on submission to request a Job Number (to ensure the farm statistics has this)

JN=gui.InputDialog( "Please Enter Job Number" ) dialog.SetString( dialog.dialogIDs[ "CommentBoxID" ], JN )

If I was smarter / had more time, i’d add an enforce number entry in there, etc but it’s just a quick fix

Ideally it would just trim the job number out of the filepath and stick that in but the job folders don’t always have the number in.

Is there a cookbook type page for this stuff? Is it the same as the events?

Privacy | Site terms | Cookie preferences