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:
baldurk
2026-08-13 21:05:12 +01:00
parent e032466be2
commit 5b90b75b79
18 changed files with 627 additions and 0 deletions
+27
View File
@@ -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}")