More pythonic and functional
More pythonic and functional

Replaced 'str' by 'data' (str() already exists in python)
One liner for grease and panel variables
Made the last part more modular, the modelEditor command is only written once (added strokes to the "joint" case)

You could also do not check the version and do a try/except and remove the greasepencils argument if the command fails (more pythonic).
tb-animator/tbtools