AWS Thinkbox Discussion Forums

C4D Environment Variable problem

Hi,

We are having a small problem when rendering C4D + Redshift jobs. I’m not sure if this has anything to do with Deadline but maybe someone can help.

We have Redshift installed on a centralized network folder. And we set Evn Var for both Maya and Cinema 4D.

With Maya we have “no problems” and with Cinema the Env Var setup (C4D_PLUGINS_DIR) also works on the workstations, that is, when we launch C4D it sees the Env Var and loads Redshift.

But that doesn’t happen if we submit a job through Deadline. Is the submitted using that Env Var?

We are using Win 7 and 10 + C4D R18 latest update.

Hope someone can help.

Im attaching the log.

Tks in advance.
ErrorLog.txt (12.5 KB)

The new Deadline C4DBatch plugin relies on the “C4D_PLUGINS_DIR” env var, so if you are adding paths to this env var, make sure you “append” to this env and not overwrite it.

Ah ok, but that env var doesnt exist in the user or sys variables. How do I append?

Where are you setting it? This is the same issue:
forums.thinkboxsoftware.com/vie … DIR#p69191

Ok I’m setting it here. Check the attached image.

Can anyone please help. I just need to understand how and where to append that Path.

Cheers!

What you’re setting should be right. Just restart the machine to have Launcher / Slave pick up those changes.

If not, can you give us a call? Number’s in my signature. Ext 2 calls all of us.

It still doesn’t work. I’ve tried to call but I cant, might need the country code?

Was in a meeting, ext 2 should get you more than just my desk phone. :slight_smile:

In Northa America including Canada, +1 is the country code and 888 denotes free-phone/toll free. I’ll adjust my signature.

I should have asked you actually. Does the latest version of Deadline supports C4D19? In the Configure Plugins Window I can only see C4D 18 in my version ( 9.0.6.1 Release).

Edwin, I’ve noticed that if I check Use Batch Plugin it doesn’t work. I can only make Redshift load if I uncheck it. :open_mouth:

Not yet. Also, for future ref it looks like the Redshift plugin folder was just not loading. The environment turned out to be a-okay.

Hmm. Might be a different problem. What’s the error?

Looks like the same error Edwin. See attached.
ErrorOnUseBatch.txt (12.6 KB)

Ah! Now it’s down to us overriding that directory. I’d seen this in another thread but it didn’t click in my brain at the time, but this is where we’re running astray:

2017-09-14 18:43:43: 0: STDOUT: loading plugin directory: C:\Users\Admin\AppData\Local\Thinkbox\Deadline9\slave\gpu-1-instance-03\plugins\59babfac63a7f818ecdc7569

That’s so we load our own plugin for Batch mode. Going brutally technical for a minute, here’s the Python code that handles that:

        pluginDir = self.Plugin.GetPluginDirectory()
        c4dPluginDirs = self.Plugin.GetProcessEnvironmentVariable( "C4D_PLUGINS_DIR" )
        if not c4dPluginDirs == "":
            c4dPluginDirs = c4dPluginDirs + ";"
        c4dPluginDirs = c4dPluginDirs + pluginDir
        self.Plugin.SetProcessEnvironmentVariable( "C4D_PLUGINS_DIR", c4dPluginDirs )

I think our problem here is that GetProcessEnvironmentVariable() is blank because it’s not checking the Sandbox’s environment (which should be around since you set it system-wide), it’s checking what would be set in the Override Environment Variables section. This should be an easy fix, we just have to include the system’s variables as well.

What’s the exact version of Deadline you’re on? I should be able to patch this pretty quickly by just putting os.environ[‘C4D_PLUGINS_DIR’] in place of GetProcessEnvironmentVariable() and add an import os line at the top.

Ah great! We are on 9.0.6.1. But we will update soon to the latest. SO a patch to that one would be very helpful also :slight_smile:

Well, I’ve done a quick patch that should work on 9.0.6 and 9.0.7. The changes are these two lines:

import os # Line 20

...

c4dPluginDirs = os.environ['C4D_PLUGINS_DIR'] # Line 173

This’ll go into “[repo]/plugins/Cinema4DBatch”:
Cinema4DBatch.py.txt (46.5 KB)

It doesn’t seem to work.

See the files attached.

One with the UseBatch OFF log, and one with the Use Batch ON Log.
UseBatchON.txt (10.9 KB)
UseBatchOFF.txt (14.7 KB)

Another thing that I’ve noticed when Use Batch is not checked is that adding machines to the Black list or white list doesn’t work.

Btw, we are installing the latest Deadline Version tonight. Are you still able to help?

Privacy | Site terms | Cookie preferences