GDB supports custom pretty-printers implemented in Python.
When debugging Godot, checking the values of Strings and StringNames
in the debugger was very inconvenient as the data is fairly deep
in the structure. This makes the values immediately visible.
The custom pretty printer can be taken into use manually by calling
`source misc/scripts/godot_gdb_pretty_print.py` in the GDB console.
In VS code, it can be activated by default by adding the source
command to the `setupCommands` of the configuration in launch.json.
Like this:
```json
// launch.json
{
"configurations": [
{
"name": "C/C++: debug,
"type": "cppdbg",
...
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Load custom pretty-printers for Godot types.",
"text": "source ${workspaceRoot}/misc/scripts/godot_gdb_pretty_print.py"
}
],
"miDebuggerPath": "gdb"
}
],
"version": "2.0.0"
}
```
Extended the pretty-printer python script to support Vectors.
The printer needs to be uncomfortably aware of CowData
implementation details, but I don't think there is any
way around that.
The color replacing code in the icon loader only works with the fill/stroke/stop-color properties and not with colors defined inside the style attribute. This changes the SVG files to use that instead.
Finally reading the docs for `SCons.Variables.Update` let me find this optional
parameter, which solves the hacks and pain we've dealt with for years:
> args (optional) – a dictionary of keys and values to update in env.
> If omitted, uses the variables from the commandline.
By passing the environment itself, we preserve the values we've overridden in
`SConstruct` or `detect.py`.
* Separates find_intersects from test_intersects for rays, and wraps the former.
* Changes parameter name to "r_intersection_point".
* Fixes broken old version which returned per axis t.
* Returns whether the ray origin is within the AABB.
* Returns intersection point when origin outside.
* Returns "backtracking" intersection point when inside.
* Returns sensible normal when inside.
* Returns valid results on borders.
* Returns robust results dealing with floating point error.
Co-authored-by: Claire Blackshaw <evilkimau@gmail.com>
The documentation makes it seem like CryptoKey can only hold an RSA key. This is compounded by the fact that Cypto only has a function generate an RSA based key. Godot however is perfectly happy loading and using ECC based keys.