mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-29 09:56:39 +00:00
Rewrite python docs & onboarding to be more opinionated
* 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.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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}")
|
||||
Reference in New Issue
Block a user