Improve run action inside Scripter plugin
ClosedPublic

Authored by eliakinalmeida on May 28 2017, 7:23 AM.

Details

Summary
  • Now we will execute files using importlib instead of exec.
  • Users can still executing scripts without save files (simple scripts).
  • Users have to define a "main" function to scripts that are modules.
  • Scripts are compiled to bytecode and then executed in an empty scope.
  • Documentation wrote to run slot inside RunAction.

Fixes T5885

Ref T1625

Test Plan

None

Diff Detail

Repository
R37 Krita
Branch
eliakincosta/T5885-kritas-scripting-showcase
Lint
No Linters Available
Unit
No Unit Test Coverage
eliakinalmeida created this revision.May 28 2017, 7:23 AM
woltherav accepted this revision.Dec 7 2017, 3:15 PM
This revision is now accepted and ready to land.Dec 7 2017, 3:15 PM
woltherav closed this revision.Dec 7 2017, 3:17 PM

This one actually gave me some grief, especially as it didn't take into account the issues with modified documents. That part is fixed in master now, so a bit of a moot point.