Add more ENV variables and cleanup order

This commit is contained in:
Raimund58
2023-12-08 09:58:01 +00:00
committed by Sheepit Renderfarm
parent 4e1ef85dd6
commit 77183e5947

View File

@@ -219,18 +219,23 @@ import java.util.regex.Pattern;
Map<String, String> new_env = new HashMap<>();
new_env.put("TEMP", configuration.getWorkingDirectory().getAbsolutePath().replace("\\", "\\\\"));
new_env.put("TMP", configuration.getWorkingDirectory().getAbsolutePath().replace("\\", "\\\\"));
new_env.put("CORES", Integer.toString(configuration.getNbCores()));
new_env.put("PRIORITY", Integer.toString(configuration.getPriority()));
//make sure the system doesn´t interfere with the blender runtime, and that blender doesn´t attempt to load external libraries/scripts.
new_env.put("BLENDER_USER_RESOURCES", "");
new_env.put("BLENDER_USER_CONFIG", "");
new_env.put("BLENDER_USER_SCRIPTS", "");
new_env.put("BLENDER_SYSTEM_SCRIPTS", "");
new_env.put("BLENDER_USER_DATAFILES", "");
new_env.put("BLENDER_SYSTEM_RESOURCES", "");
new_env.put("BLENDER_SYSTEM_SCRIPTS", "");
new_env.put("BLENDER_SYSTEM_DATAFILES", "");
new_env.put("BLENDER_SYSTEM_PYTHON", "");
new_env.put("OCIO", ""); //prevent blender from loading a non-standard color configuration
new_env.put("TEMP", configuration.getWorkingDirectory().getAbsolutePath().replace("\\", "\\\\"));
new_env.put("TMP", configuration.getWorkingDirectory().getAbsolutePath().replace("\\", "\\\\"));
new_env.put("CORES", Integer.toString(configuration.getNbCores()));
new_env.put("PRIORITY", Integer.toString(configuration.getPriority()));
// Add own lib folder first, because Steam or other environments may set an LD_LIBRARY_PATH that has priority over the runpath in the Blender excutable,
// but contains incompatible libraries.