AWS Thinkbox Discussion Forums

C4D Version Metadata Pulled by Deadline

I’m trying to setup my machines on the farm so that we have two separate installs of C4D 2024 for use: 2024.3 with RS 3.5.21 & 2024.4 with RS 3.6 - allowing us to migrate between versions project by project in the event of unforseen bugs.

Initially I thought I could just update the standard Deadline files (Cinema4DSubmission.py, Cinema4D.param, and Cinema4DBatch.param) that we update each year when we move to a new full version of Cinema (I,e - 2023 → 2024). Normally we’d add additional entries to each file for the new version, but I’m not sure what the key part of those entries is that helps to communicate to Deadline which version is being used for a given submission.

For example: One of my coworkers has 2024.1 installed in a separate install path, something like “C:\Program Files\Maxon Cinema 4D 2024_v1”; however, when she launches a job from that version, Deadline just recognizes it as a standard 2024 job, and goes to the default 2024 path’s described in the py/param files (“C:\Program Files\Maxon Cinema 4D 2024”). So it doesn’t appear as though Deadline is looking at the install path to determine which version to use on the farm, and it isn’t using the name of the exe - as that doesn’t change between versions.

Does anyone know which piece of metadata is seen in the submitting machine to tell Deadline which version of C4D from the full list of entries to use for the job? Once I know that, I can hopefully customize my installs & those scripts so that they launch the correct version of 2024.x that I want for a particular job.

For reference, here are the appropriate parts of Cinema4DSubmission.py, Cinema4D.param, and Cinema4DBatch.param that I would be editing.

Thanks,
Luke

SUPPORTED_VERSIONS = ["12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "2023","2024"]
[C4D_2023_RenderExecutable]
Label=C4D 2023 Executable
Category=Render Executables
CategoryOrder=0
Index=18
Type=multilinemultifilename
Default=C:\Program Files\Maxon Cinema 4D 2023\Commandline.exe;/Applications/MAXON CINEMA 4D 2023/Commandline.app/Contents/MacOS/Commandline;C:\Program Files\Maxon CINEMA 4D 2023\CINEMA 4D.exe;/Applications/MAXON CINEMA 4D 2023/CINEMA 4D.app/Contents/MacOS/CINEMA 4D;
Description=The path to the Cinema 4D executable file used for rendering. Enter alternative paths on separate lines.
[C4D_2023_RenderExecutable]
Label=C4D 2023 Executable
Category=Render Executables
CategoryOrder=0
Index=17
Type=multilinemultifilename
Default=C:\Program Files\Maxon Cinema 4D 2023\Commandline.exe;/Applications/MAXON CINEMA 4D 2023/Commandline.app/Contents/MacOS/Commandline;C:\Program Files\Maxon CINEMA 4D 2023\CINEMA 4D.exe;/Applications/MAXON CINEMA 4D 2023/CINEMA 4D.app/Contents/MacOS/CINEMA 4D;
Description=The path to the Cinema 4D executable file used for rendering. Enter alternative paths on separate lines.

Hello @Luke_Letellier

It looks like we are getting the major version number of Cinema 4D and storing it in the variable self.c4dMajorVersion. in [Repo]/submission/Cinema4D/Main/SubmitC4DToDeadline.py around line #150

The line:

self.c4dMajorVersion = c4d.GetC4DVersion() // 1000

Is getting the full version number returned by c4d.GetC4DVersion(), but then dividing it by 1000 to isolate just the major version component.

So for example, if the full version was 2023.456, c4d.GetC4DVersion() would return 2023456, but by dividing by 1000, it isolates just the 2023 major version component and stores that in self.c4dMajorVersion.

Dividing by 1000 works because Cinema 4D version numbers will always have 3 decimal places, with the major, minor, and revision numbers separated. So this is a simple way to extract just the major version for whatever version of C4D is being used.

So you can try removing the division by 1000 then can work around the version value to use.

Very interesting; I’ll have to muddle with this a bit to figure out the best method of adjusting things so that I don’t break submitting with previous versions as well.

Thank you!!

1 Like

After further thought, I believe the best way forward would be to add two additional lines of code to this to create an exception that would divide by 100 if the major version was 2024; I would then adjust Cinema4DSubmission.py, Cinema4D.param, and Cinema4DBatch.param to have entries for “20243” and “20244”.

My pseudocode looks something like what you see below; would this be the correct formatting? Would I need an else statement afterward?

self.c4dMajorVersion = c4d.GetC4DVersion() // 1000

if self.c4dMajorVersion ["2024"] :
    self.c4dMajorVersion = c4d.GetC4DVersion() // 100

Thanks!
Luke

Follow up:

I couldn’t get the IF statement to work, so I divided C4DmajorVersion by 100 & added entries in Cinema4D.param, Cinema4dBatch.param, and Cinema4DSubmission.py for 20243 and 20244, along with an entry for 20232 for some of our jobs that are still using it, and this setup appears to be working fine.

1 Like

Hello

Thanks for the update here and making it work. I am sure it will be useful workflow for other people in the community.

1 Like
Privacy | Site terms | Cookie preferences