()
| 4 | |
| 5 | # The actual algorithm called by DarkRadiant is contained in the execute() function |
| 6 | def execute(): |
| 7 | shader = GlobalShaderSystem.getShaderForName('bc_rat') |
| 8 | print(shader.getName()) |
| 9 | |
| 10 | # the "Global*" variables like GlobalShaderSystem are already exposed to this scripts |
| 11 | # The rest needs to imported from the darkradiant module and referred to by the prefix "dr" |
| 12 | import darkradiant as dr |
| 13 | GlobalDialogManager.createMessageBox('Example Box', str(e), dr.Dialog.ERROR).run() |
| 14 | |
| 15 | # __executeCommand__ evaluates to true after DarkRadiant has successfully initialised |
| 16 | if __executeCommand__: |
no test coverage detected