SourceForge.net Logo

CGRU

LinkedIn
Since 1.6.7 (at 2012.12.03) site moved to cgru.info

Afanasy Tasks Output Parsers


Parser read task output and calculate running percentage and frame (for multiply frames per render).

Python classes stored in
cgru/afanasy/python/parsers
and based from
cgru/afanasy/python/parsers/parser.py

It describes a parser:

  • Parser with this name exists.
  • Parsing function by overriding parser.do(self, data) method.

Parser method:

It has data on input to parse. During parsing it can set some properties:

  • self.percent (int) - Task execution percenage.
  • self.frame (int) - Task execution frame. May set for multiply frame tasks to show current frame in GUI.
  • self.percentframe (int) - Task execution current frame percentage.
  • self.warning (False/True) - Some warning. To notify user only.
  • self.error (False/True) - Error. Render will try to terminate and kill a task.
  • self.badresult (False/True) - Error. Task will finish with an error. In this case render will not try to kill it, sometimes you don`t need this. You can use at the end of task execution, at final result check.
  • self.finishedsuccess (False/True) - Success. Task will finish with a success. Parser can consider that task is aready done and should not to continue. Render will terminate(kill) task process and send "done" status to server (not an "error").
This method can return a string result. In such case this string will be stored instead of incoming data. You can use it to produce some message, by appending incoming data with your information. Or you can cut some useless information.

Since 1.6.7 (at 2012.12.03) site moved to cgru.info
SourceForge.net Project

CGRU

Libre Graphics World