Fix example python scripts to work in the UI as well

* In the UI program we can't import renderdoc (it's already imported) so we just
  alias it to rd.
This commit is contained in:
baldurk
2018-08-29 12:58:23 +01:00
parent 94fcff1616
commit 416646d027
6 changed files with 48 additions and 6 deletions
@@ -1,4 +1,11 @@
import renderdoc as rd
import sys
# Import renderdoc if not already imported (e.g. in the UI)
if 'renderdoc' not in sys.modules and '_renderdoc' not in sys.modules:
import renderdoc
# Alias renderdoc for legibility
rd = renderdoc
def loadCapture(filename):
# Open a capture file handle