mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-26 11:50:59 +00:00
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:
@@ -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 printVar(v, indent = ''):
|
||||
print(indent + v.name + ":")
|
||||
|
||||
Reference in New Issue
Block a user