MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / execute

Function execute

install/scripts/commands/example.py:6–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5# The actual algorithm called by DarkRadiant is contained in the execute() function
6def 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
16if __executeCommand__:

Callers 1

example.pyFile · 0.70

Calls 5

strClass · 0.85
printFunction · 0.50
getNameMethod · 0.45
runMethod · 0.45
createMessageBoxMethod · 0.45

Tested by

no test coverage detected