mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-29 18:06:37 +00:00
* The docs now explicitly tell people how to write UI scripts, then UI extensions, with as quick a start as possible, and go into detail in later documents. Use of the python module directly is also not featured prominently as this is a rare use-case for casual scripting needs.
27 lines
876 B
Python
27 lines
876 B
Python
if not pyrenderdoc.IsCaptureLoaded():
|
|
filename = pyrenderdoc.Extensions().OpenFileName("Choose a capture", "", "*.rdc")
|
|
|
|
pyrenderdoc.LoadCapture(filename, renderdoc.ReplayOptions(), filename, False, True)
|
|
|
|
eid = pyrenderdoc.CurEvent()
|
|
|
|
name = pyrenderdoc.GetEventBrowser().GetEventName(eid)
|
|
|
|
print(f"Currently we are at EID {eid} named: '{name}'")
|
|
if eid > 1:
|
|
prevname = pyrenderdoc.GetEventBrowser().GetEventName(eid - 1)
|
|
print(f" > the previous event {eid-1} is named: '{prevname}'")
|
|
|
|
pipe = pyrenderdoc.CurPipelineState()
|
|
|
|
outputs = pipe.GetOutputTargets()
|
|
|
|
for idx, out in enumerate(outputs):
|
|
if out.resource != renderdoc.ResourceId.Null():
|
|
name = pyrenderdoc.GetResourceName(out.resource)
|
|
print(f"Output {idx} is: {name}")
|
|
|
|
depth = pipe.GetDepthTarget()
|
|
|
|
name = pyrenderdoc.GetResourceName(depth.resource)
|
|
print(f"Depth is: {name}") |