Cinema 4D Dealine submmision

I’m trying to modify the Cinema4DSubmission.py so that I can put in a custom job name. But I can’t figure out how the script is populating the “NameBox”. I know the Modo script has a section that pulls in arguments from the DeadlineModoClient.pl. But the Cinema4D script doesn’t seem to be passing any arguments along.

Can any devs out there pass along some insight?

Thanks

Hello,

I am wondering how you are submitting, as the monitor and integrated submission scripts both have a place for the name for the job… Any insight you have on the process you are using would be great.

At the moment we’re just using the basic scripts provided with Deadline 6 and launching the job from Cinema4D. I’m just trying to figure out how the Cinema4D script gets that file name and where it is assigning it in the GUI script. Does that make sense?

Hello,

I am thinking I must be missing something, as looking at even the more basic script from inside the Monitor, the first field is Job Name, which you can name whatever you want. Perhaps you could give some examples of what you are looking for in the way of a screenshot?

Cheers,

OK, let me see if I can lay out what I’m doing in the Modo scripts as an analogy:

In the \renderfarm\DeadlineRepository6\scripts\SubmissionModoSubmission.py

This is where the Job name box is defined for the GUI

line 52 - scriptDialog.AddControl( “NameLabel”, “LabelControl”, “Job Name”, labelWidth, -1, “The name of your job. This is optional, and if left blank, it will default to ‘Untitled’.” )
line 53 - scriptDialog.AddControl( “NameBox”, “TextControl”, “Untitled”, tabWidth - labelWidth - 24, -1 )

So I looked for where the name box is being assigned further down. I found this set of code starting at line 271:

[b] appSubmission = False
if len( args ) > 0:
scriptDialog.SetValue( “SceneBox”, args[0] )
scriptDialog.SetValue( “FramesBox”, args[1] )

    sceneName = Path.GetFileName( args[0] )
    jobName = sceneName[:-4]
    scriptDialog.SetValue( "NameBox", jobName )
    #scriptDialog.SetValue( "NameBox", sceneName )
    
    appSubmission = True
    [/b]

If you notice what I changed is that I took the file name and removed the file extension from the string. I am then using that string as the Job name for submission to Deadline. Those arguments are passed along from the \renderfarm\DeadlineRepository6\submission\Modo\Client\DeadlineModoClient.pl script.

So I am trying to do the same thing with Cinema4D. The code looks similar, but I can’t find out where the “NameBox” is being assigned with the file name. It looks like it might be pulling information from a .ini file but I can’t find that file anywhere. So I’m just wondering how I can access the boxes (mainly the NameBox) like I can in the Modo script. Does that clarify things for you?

Hi
It’s in “/DeadlineRepository6/submission/Cinema4D/Main/SubmitC4DToDeadline.py” line 305

def InitValues( self ): scene = documents.GetActiveDocument() sceneName = scene.GetDocumentName() frameRate = scene.GetFps()

There you can set “sceneName” to what ever you want :slight_smile:

Cheers
Bonsak

Ahh thank you Bonsak, I was just going to say that. :slight_smile:

Interesting. When does this script come into play…I mean where does it get called? I know you install the client script as a plugin for c4d. So I’m assuming this gets called from either that script or the Cinema4DSubmission.py

Oh never mind, I see it down at the bottom of the DeadlineC4DClient.pyp.

Thanks for the help!

Hi
The client script calls the main script and thats the script that shows you the dialog and writes the job- and plugin-files when you hit submit :slight_smile: Happy hacking.

-b