parameters: (self, line, left_token, right_token)
return_statement: return False, 0
docstring: Tries to extract the percentage of the current render progress in this line.
          
          Works with the old syntax:
              (...) RenderLayer | Rendered 136/510 Tiles, Denoised 96 tiles
          And the new syntax:
              (...) RenderLayer | Path Tracing Tile  136/510, Denoised 96 tiles
          
          Args:
              line (string) : blender cycles render output line to parse
              left_token (string) : separator string to extract the percentage on the left side
              right_token (string) : separator string to extract the percentage on the right side
              
          Returns:
              (bool) : True if a percentage got extracted, False if not
              (int)  : percentage value
docstring_summary: Tries to extract the percentage of the current render progress in this line.
          
          Works with the old syntax:
              (...) RenderLayer | Rendered 136/510 Tiles, Denoised 96 tiles
          And the new syntax:
              (...) RenderLayer | Path Tracing Tile  136/510, Denoised 96 tiles
          
          Args:
              line (string) : blender cycles render output line to parse
              left_token (string) : separator string to extract the percentage on the left side
              right_token (string) : separator string to extract the percentage on the right side
              
          Returns:
              (bool) : True if a percentage got extracted, False if not
              (int)  : percentage value
docstring_tokens: Tries to extract the percentage of the current render progress in this line . Works with the old syntax : ( ... ) RenderLayer | Rendered 136 / 510 Tiles Denoised 96 tiles And the new syntax : ( ... ) RenderLayer | Path Tracing Tile 136 / 510 Denoised 96 tiles Args : line ( string ) : blender cycles render output line to parse left_token ( string ) : separator string to extract the percentage on the left side right_token ( string ) : separator string to extract the percentage on the right side Returns : ( bool ) : True if a percentage got extracted False if not ( int ) : percentage value
function: def extractPercentage(self, line, left_token, right_token):
          """Tries to extract the percentage of the current render progress in this line.
          
          Works with the old syntax:
              (...) RenderLayer | Rendered 136/510 Tiles, Denoised 96 tiles
          And the new syntax:
              (...) RenderLayer | Path Tracing Tile  136/510, Denoised 96 tiles
          
          Args:
              line (string) : blender cycles render output line to parse
              left_token (string) : separator string to extract the percentage on the left side
              right_token (string) : separator string to extract the percentage on the right side
              
          Returns:
              (bool) : True if a percentage got extracted, False if not
              (int)  : percentage value
              
          """
          tokens = line.split(left_token)
          if len(tokens) > 1:
              tokens = tokens[1].split(right_token)   
              numbers = tokens[0].split('/')
              if len(numbers) == 2:
                  try:
                      part0 = int(numbers[0])
                      part1 = int(numbers[1])
                      if part1 > 0:
                          perc = int(100 * part0 / part1)
                          return True, perc
                  except:
                      pass
          return False, 0
function_tokens: def extractPercentage ( self , line , left_token , right_token ) : tokens = line . split ( left_token ) if len ( tokens ) > 1 : tokens = tokens [ 1 ] . split ( right_token ) numbers = tokens [ 0 ] . split ( '/' ) if len ( numbers ) == 2 : try : part0 = int ( numbers [ 0 ] ) part1 = int ( numbers [ 1 ] ) if part1 > 0 : perc = int ( 100 * part0 / part1 ) return True , perc except : pass return False , 0