baldurk
b100e05053
Add autocomplete for python help entry
2026-08-27 13:43:14 +01:00
baldurk
9a2ec4aa19
Use python invoker wrapper everywhere for pyrenderdoc
...
* This includes in the parameters of extension callbacks.
2026-08-27 12:45:52 +01:00
baldurk
928cfcd80a
Ensure python compile error exceptions get handled properly
2026-08-27 12:42:57 +01:00
baldurk
1aeac957bd
Compile fixes
2026-08-13 23:23:27 +01:00
baldurk
e20c2b9985
Expose buffer interpretation helpers to python
2026-08-13 21:05:15 +01:00
baldurk
964ef04526
Fix some cases where type aliases were not used in reflection
2026-08-13 21:05:15 +01:00
baldurk
71f40cef1a
Remove any extra typing aliases that were pulled into module dir()s
2026-08-13 21:05:14 +01:00
baldurk
68bb7e1ceb
Track our own custom types for user-defined functions/classes
...
* This lets us track the docstrings of these for better tooltips
2026-08-13 21:05:14 +01:00
baldurk
b3710eba3b
Fetch & display tooltips for each entry along with autocomplete options
2026-08-13 21:05:14 +01:00
baldurk
79ad933913
Avoid accessing possibly deprecated typing members
2026-08-13 21:05:14 +01:00
baldurk
022a5e1438
Change python scripting 'debug' button to just attach, not run
2026-08-13 21:05:14 +01:00
baldurk
810e6a79d2
Run scripts in their place when they are on disk
...
* We only write the pytmp/script.py for unsaved scripts, so they can be
recovered.
2026-08-13 21:05:14 +01:00
baldurk
1416d92b09
Use properties consistently for custom dependency paths on windows
...
* This removes the (now undocumented) python env vars, and the never documented
Qt env vars. We add new build script arguments to specify these paths.
2026-08-13 21:05:12 +01:00
baldurk
bb4017a965
Add a spellchecking mode for sphinx and fix some typos
...
* The worst one was Persistant -> Persistent. This involved renaming
PersistentConfig but the impact of that is considered minimal enough to be
worth fixing.
2026-08-13 17:46:47 +01:00
baldurk
5e462c5ebe
Add type hints to python for class constructors
...
* We enforce default and copy constructors where possible, this isn't very
pythonic but we can't use copy.deepcopy on our types.
* The structs that have specialised constructors e.g. FloatVector or Subresource
also have those documented though we have no way to enforce it.
2026-08-13 17:46:47 +01:00
baldurk
a02741381b
For convenience expose InvokeOntoUIThread directly from CaptureContext
...
* This can be useful in python scripts and it's odd to have to go via the
MiniQtHelper just for this.
2026-08-13 17:46:46 +01:00
baldurk
2d0ba78a49
Add a function to fetch the texture display config from texture viewer
2026-08-13 17:46:46 +01:00
baldurk
7d2477026a
Add TextureViewer.GetChannelVisibility that returns a tuple
...
* This is more natural to access and use from python. The old function could
probably be removed but since we also changed the name we'll keep it.
2026-08-13 17:46:46 +01:00
baldurk
3f653cfbf2
Remove RENDERDOC_GetDefaultCaptureOptions, initialise in constructor
2026-08-13 17:46:46 +01:00
baldurk
e3b0fa0a24
Add UI thread invokers for all windows
...
* This is necessary as they expect to be run on the UI thread, but can be
fetched from python scripts running on the python script thread. We block
invoke over to the UI and suspend python's GIL to avoid deadlocks.
2026-08-13 17:46:46 +01:00
baldurk
db75eec620
Expose capture connection windows to python scripting
2026-08-13 17:46:46 +01:00
baldurk
e6cd4d2e98
Add an entry to the recent files list for unsaved/temp recovery script
2026-08-13 17:46:45 +01:00
baldurk
782e7101e6
Improve formatting of function tooltips
2026-08-13 17:46:45 +01:00
baldurk
b83fabce3a
Try to patch in 'pass' instead of commenting to preserve scopes
2026-08-13 17:46:45 +01:00
baldurk
21ebe7e6cc
When reloading an extension send errors to its output channel
2026-08-13 17:46:44 +01:00
baldurk
16a24406b2
In python extensions, set pyrenderdoc global before calling register()
2026-08-13 17:46:44 +01:00
baldurk
c97850e39b
Allow customisation of VS Code executable
2026-08-13 17:46:44 +01:00
baldurk
ca0ac6157a
Fix some issues with reference counting on python objects
2026-08-13 17:46:44 +01:00
baldurk
c95a69c8a1
Returning const arrays forces a copy
...
* This doesn't cover all cases but helps with 'pythonic' cases where a list
returned from a function should be expected to be mutable. Modifying direct
'members' can still modify through const.
2026-08-13 17:46:43 +01:00
baldurk
88782bea97
Use reflection script for autocomplete and help in python shell
...
* Also add syntax checking via parse attempts.
2026-08-13 17:46:43 +01:00
baldurk
8a86b754f6
Generate autocomplete tooltips inside python reflector
2026-08-13 17:46:43 +01:00
baldurk
b9595f3685
Handle forward-referenced string return annotations
2026-08-13 17:46:43 +01:00
baldurk
09c036bd36
Embed and initialise reflection script in python context
2026-08-13 17:46:42 +01:00
baldurk
be3d34fb93
Add support for aliasing modules when processing reflection
...
* This is a little specific to us, but when we see references to a `renderdoc`
module etc we want to be able to look up the generated stubs instead as they
have better type hints for processing.
2026-08-13 17:46:42 +01:00
baldurk
64645aa9d6
Add autocomplete helpers for members and function calls
...
* This requires a small quasi-hack for tracking user defined function calls
while looking up types.
2026-08-13 17:46:42 +01:00
baldurk
e0ca14d55a
Add a helper to figure out which function call and argument we're in
2026-08-13 17:46:42 +01:00
baldurk
575d8ed853
Add a function to figure out the trailing subexpression in an expr
...
* This is what will be used for autocompletion at a cursor point
2026-08-13 17:46:42 +01:00
baldurk
1b5ba59336
Return the correct type for list comprehension targets
2026-08-13 17:46:42 +01:00
baldurk
d7c3371777
Add a helper function that replaces contents of any strings with "xxx"
2026-08-13 17:46:42 +01:00
baldurk
6a2fca967c
Add a helper to get the friendly name for a type
2026-08-13 17:46:42 +01:00
baldurk
6b85e503fe
Add testing for type checking
2026-08-13 17:46:42 +01:00
baldurk
e7845446db
Add a query to pull the type of a given location
2026-08-13 17:46:41 +01:00
baldurk
f090436670
Determine best-effort type information for AST nodes
...
* This is not perfect but does a good enough job for most common cases.
2026-08-13 17:46:41 +01:00
baldurk
e57d9db9c4
Process scope declarations and identifiers in AST tree
...
* We don't generate type information yet, _get_type is stubbed out.
2026-08-13 17:46:41 +01:00
baldurk
b2b46e7e7c
Add structs for tracking identifiers and scopes
2026-08-13 17:46:41 +01:00
baldurk
08369056d3
Add python script for autocompletion parsing
...
* This tries to ast parse source that may contain an error.
* We don't try to fully error recover from unlimited problems, but a single
statement that is being edited can be tolerated by commenting out lines around
it
2026-08-13 17:46:41 +01:00
baldurk
23ca2cf053
Show syntax errors when editing in python script editor
2026-08-13 17:46:41 +01:00
baldurk
02ead51303
Add a status entry showing loaded python extensions & debugger status
2026-08-13 17:46:40 +01:00
baldurk
3c6dfd23b4
Add a drop-down for the script output panel to switch context
...
* By default we still display all messages, but this allows users to switch to
just seeing the output from one extension if desired.
2026-08-13 17:46:40 +01:00
baldurk
768d8fa615
Add a static context for connecting Qt signals for python extensions
2026-08-13 17:46:40 +01:00