Display name of project while rendering
This commit is contained in:
committed by
Laurent Clouet
parent
8c26f29efd
commit
e32f59ddb3
@@ -96,7 +96,7 @@ Answer with no error:
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<jobrequest status="0">
|
<jobrequest status="0">
|
||||||
<frames remaining="1187" />
|
<frames remaining="1187" />
|
||||||
<job id="1" use_gpu="1" archive_md5="11d046f9912267a29f99a731c7e4e3b0" revision="0" path="compute_method.blend" frame="0340" synchronous_upload="1">
|
<job id="1" use_gpu="1" archive_md5="11d046f9912267a29f99a731c7e4e3b0" revision="0" path="compute_method.blend" frame="0340" synchronous_upload="1" name="human name">
|
||||||
<renderer md5="ceda00890578762c6fac96f1a13f671a" commandline=".e --factory-startup --disable-autoexec -b .c -o .o -f .f -x 1" update_method="remainingtime"/>
|
<renderer md5="ceda00890578762c6fac96f1a13f671a" commandline=".e --factory-startup --disable-autoexec -b .c -o .o -f .f -x 1" update_method="remainingtime"/>
|
||||||
<script>import bpy
|
<script>import bpy
|
||||||
# disable the GPU for Cycles
|
# disable the GPU for Cycles
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ public class Job {
|
|||||||
private String rendererCommand;
|
private String rendererCommand;
|
||||||
private String script;
|
private String script;
|
||||||
private boolean useGPU;
|
private boolean useGPU;
|
||||||
|
private String name;
|
||||||
private String extras;
|
private String extras;
|
||||||
private String updateRenderingStatusMethod;
|
private String updateRenderingStatusMethod;
|
||||||
private boolean synchronousUpload;
|
private boolean synchronousUpload;
|
||||||
@@ -65,7 +66,7 @@ public class Job {
|
|||||||
private Configuration config;
|
private Configuration config;
|
||||||
private Log log;
|
private Log log;
|
||||||
|
|
||||||
public Job(Configuration config_, Gui gui_, Log log_, String id_, String frame_, String revision_, String path_, boolean use_gpu, String command_, String script_, String sceneMd5_, String rendererMd5_, String extras_, boolean synchronous_upload_, String update_method_) {
|
public Job(Configuration config_, Gui gui_, Log log_, String id_, String frame_, String revision_, String path_, boolean use_gpu, String command_, String script_, String sceneMd5_, String rendererMd5_, String name_, String extras_, boolean synchronous_upload_, String update_method_) {
|
||||||
config = config_;
|
config = config_;
|
||||||
id = id_;
|
id = id_;
|
||||||
numFrame = frame_;
|
numFrame = frame_;
|
||||||
@@ -75,6 +76,7 @@ public class Job {
|
|||||||
rendererCommand = command_;
|
rendererCommand = command_;
|
||||||
sceneMD5 = sceneMd5_;
|
sceneMD5 = sceneMd5_;
|
||||||
rendererMD5 = rendererMd5_;
|
rendererMD5 = rendererMd5_;
|
||||||
|
name = name_;
|
||||||
extras = extras_;
|
extras = extras_;
|
||||||
synchronousUpload = synchronous_upload_;
|
synchronousUpload = synchronous_upload_;
|
||||||
gui = gui_;
|
gui = gui_;
|
||||||
@@ -92,7 +94,7 @@ public class Job {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("Job (numFrame '%s' sceneMD5 '%s' rendererMD5 '%s' ID '%s' revision '%s' pictureFilename '%s' jobPath '%s' gpu %s extras '%s' updateRenderingStatusMethod '%s' render %s)", numFrame, sceneMD5, rendererMD5, id, revision, pictureFilename, path, useGPU, extras, updateRenderingStatusMethod, render);
|
return String.format("Job (numFrame '%s' sceneMD5 '%s' rendererMD5 '%s' ID '%s' revision '%s' pictureFilename '%s' jobPath '%s' gpu %s name '%s' extras '%s' updateRenderingStatusMethod '%s' render %s)", numFrame, sceneMD5, rendererMD5, id, revision, pictureFilename, path, useGPU, name, extras, updateRenderingStatusMethod, render);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
@@ -196,7 +198,7 @@ public class Job {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Error.Type render() {
|
public Error.Type render() {
|
||||||
gui.status("Rendering");
|
gui.status("Rendering " + this.name);
|
||||||
RenderProcess process = getProcessRender();
|
RenderProcess process = getProcessRender();
|
||||||
String core_script = "import bpy\n" + "bpy.context.user_preferences.system.compute_device_type = \"%s\"\n" + "bpy.context.scene.cycles.device = \"%s\"\n" + "bpy.context.user_preferences.system.compute_device = \"%s\"\n";
|
String core_script = "import bpy\n" + "bpy.context.user_preferences.system.compute_device_type = \"%s\"\n" + "bpy.context.scene.cycles.device = \"%s\"\n" + "bpy.context.user_preferences.system.compute_device = \"%s\"\n";
|
||||||
if (getUseGPU() && config.getGPUDevice() != null) {
|
if (getUseGPU() && config.getGPUDevice() != null) {
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] job_node_require_attribute = { "id", "archive_md5", "path", "revision", "use_gpu", "frame", "extras" };
|
String[] job_node_require_attribute = { "id", "archive_md5", "path", "revision", "use_gpu", "frame", "name", "extras" };
|
||||||
String[] renderer_node_require_attribute = { "md5", "commandline" };
|
String[] renderer_node_require_attribute = { "md5", "commandline" };
|
||||||
|
|
||||||
for (String e : job_node_require_attribute) {
|
for (String e : job_node_require_attribute) {
|
||||||
@@ -415,6 +415,7 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
|
|||||||
script,
|
script,
|
||||||
job_node.getAttribute("archive_md5"),
|
job_node.getAttribute("archive_md5"),
|
||||||
renderer_node.getAttribute("md5"),
|
renderer_node.getAttribute("md5"),
|
||||||
|
job_node.getAttribute("name"),
|
||||||
frame_extras,
|
frame_extras,
|
||||||
synchronous_upload,
|
synchronous_upload,
|
||||||
update_method
|
update_method
|
||||||
|
|||||||
Reference in New Issue
Block a user