From fa27fb331a1f5c5ed15571c5f8c652295da026e6 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 29 Apr 2020 04:17:19 -0400 Subject: [PATCH 1/3] Blender: Use self.process consistently --- src/windows/views/blender_listview.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/windows/views/blender_listview.py b/src/windows/views/blender_listview.py index 493c7474ff..1db7af8a01 100644 --- a/src/windows/views/blender_listview.py +++ b/src/windows/views/blender_listview.py @@ -705,7 +705,7 @@ def Render(self, blend_file_path, target_script, preview_mode=False): log.info("Checking Blender version, command: {}".format( " ".join([shlex.quote(x) for x in command_get_version]))) - proc = subprocess.Popen( + self.process = subprocess.Popen( command_get_version, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, startupinfo=startupinfo, @@ -714,7 +714,7 @@ def Render(self, blend_file_path, target_script, preview_mode=False): # Check the version of Blender try: # Give Blender up to 10 seconds to respond - (out, err) = proc.communicate(timeout=10) + (out, err) = self.process.communicate(timeout=10) except subprocess.TimeoutExpired: self.blender_error_nodata.emit() return @@ -739,12 +739,11 @@ def Render(self, blend_file_path, target_script, preview_mode=False): log.info("Blender output:") # Run real command to render Blender project - proc = subprocess.Popen( + self.process = subprocess.Popen( command_render, bufsize=512, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, startupinfo=startupinfo, ) - self.process = proc self.is_running = True except subprocess.SubprocessError: @@ -757,8 +756,8 @@ def Render(self, blend_file_path, target_script, preview_mode=False): log.error("{}".format(ex)) return - while self.is_running and proc.poll() is None: - for outline in iter(proc.stdout.readline, b''): + while self.is_running and self.process.poll() is None: + for outline in iter(self.process.stdout.readline, b''): line = outline.decode('utf-8').strip() # Skip blank output From 904663c2fc481b312c845f6b112a4b8bec6995be Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 29 Apr 2020 04:18:09 -0400 Subject: [PATCH 2/3] Blender: Fix filename join --- src/windows/views/blender_listview.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/windows/views/blender_listview.py b/src/windows/views/blender_listview.py index 1db7af8a01..43e3a252be 100644 --- a/src/windows/views/blender_listview.py +++ b/src/windows/views/blender_listview.py @@ -148,9 +148,12 @@ def currentChanged(self, selected, deselected): continue param["values"][fileName] = "|".join( - file.data["path"], str(file.data["height"]), - str(file.data["width"]), file.data["media_type"], - str(file.data["fps"]["num"] / file.data["fps"]["den"]) + (file.data["path"], + str(file.data["height"]), + str(file.data["width"]), + file.data["media_type"], + str(file.data["fps"]["num"] / file.data["fps"]["den"]) + ) ) # Add normal values From de0ee93cc603a267b5e8299a451a8ca94cd70422 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 29 Apr 2020 18:31:53 -0400 Subject: [PATCH 3/3] Picture Frames: Remove "Path" from file labels As @badukibaduki pointed out in #3420, it's misleading to label the picture selections "Picture 1 Path", "Picture 2 Path", etc. We only allow the user to select existing Project Files, so they can't load an arbitrary file path. --- src/blender/picture_frames_4.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blender/picture_frames_4.xml b/src/blender/picture_frames_4.xml index 82bdf84ad1..b4d1f12385 100644 --- a/src/blender/picture_frames_4.xml +++ b/src/blender/picture_frames_4.xml @@ -11,28 +11,28 @@ TitleFileName - + - + - + - +