@@ -148,9 +148,12 @@ def currentChanged(self, selected, deselected):
148
148
continue
149
149
150
150
param ["values" ][fileName ] = "|" .join (
151
- file .data ["path" ], str (file .data ["height" ]),
152
- str (file .data ["width" ]), file .data ["media_type" ],
153
- str (file .data ["fps" ]["num" ] / file .data ["fps" ]["den" ])
151
+ (file .data ["path" ],
152
+ str (file .data ["height" ]),
153
+ str (file .data ["width" ]),
154
+ file .data ["media_type" ],
155
+ str (file .data ["fps" ]["num" ] / file .data ["fps" ]["den" ])
156
+ )
154
157
)
155
158
156
159
# Add normal values
@@ -705,7 +708,7 @@ def Render(self, blend_file_path, target_script, preview_mode=False):
705
708
log .info ("Checking Blender version, command: {}" .format (
706
709
" " .join ([shlex .quote (x ) for x in command_get_version ])))
707
710
708
- proc = subprocess .Popen (
711
+ self . process = subprocess .Popen (
709
712
command_get_version ,
710
713
stdout = subprocess .PIPE , stderr = subprocess .STDOUT ,
711
714
startupinfo = startupinfo ,
@@ -714,7 +717,7 @@ def Render(self, blend_file_path, target_script, preview_mode=False):
714
717
# Check the version of Blender
715
718
try :
716
719
# Give Blender up to 10 seconds to respond
717
- (out , err ) = proc .communicate (timeout = 10 )
720
+ (out , err ) = self . process .communicate (timeout = 10 )
718
721
except subprocess .TimeoutExpired :
719
722
self .blender_error_nodata .emit ()
720
723
return
@@ -739,12 +742,11 @@ def Render(self, blend_file_path, target_script, preview_mode=False):
739
742
log .info ("Blender output:" )
740
743
741
744
# Run real command to render Blender project
742
- proc = subprocess .Popen (
745
+ self . process = subprocess .Popen (
743
746
command_render , bufsize = 512 ,
744
747
stdout = subprocess .PIPE , stderr = subprocess .STDOUT ,
745
748
startupinfo = startupinfo ,
746
749
)
747
- self .process = proc
748
750
self .is_running = True
749
751
750
752
except subprocess .SubprocessError :
@@ -757,8 +759,8 @@ def Render(self, blend_file_path, target_script, preview_mode=False):
757
759
log .error ("{}" .format (ex ))
758
760
return
759
761
760
- while self .is_running and proc .poll () is None :
761
- for outline in iter (proc .stdout .readline , b'' ):
762
+ while self .is_running and self . process .poll () is None :
763
+ for outline in iter (self . process .stdout .readline , b'' ):
762
764
line = outline .decode ('utf-8' ).strip ()
763
765
764
766
# Skip blank output
0 commit comments