Age | Commit message (Collapse) | Author |
|
These callbacks are used for marshaling by callables and generic Godot
collections.
C# generics don't support specialization the way C++ templates do.
I knew NativeAOT could optimize away many type checks when the types
are known at compile time, but I didn't trust the JIT would do as good
a job, so I initially went with cached function pointers.
Well, it turns out the JIT is also very good at optimizing in this
scenario, so I'm changing the methods to do the conversion directly,
rather than returning a function pointer for the conversion.
The methods were moved to `VariantUtils`, and were renamed from
`GetFromVariantCallback/GetToVariantCallback` to `ConvertTo/CreateFrom`.
The new implementation looks like it goes through many `if` checks
at runtime to find the right branch for the type, but in practice it
works pretty much like template specialization. The JIT only generates
code for the relevant branch. Together with inlining, the result is
very close or the same as doing the conversion manually:
```cs
godot_variant variant;
int foo = variant.Int;
int bar = VariantUtils.ConvertTo<int>(variant);
```
If the type is a generic Godot collection, the conversion still goes
through a function pointer call.
The new code happens to be much shorter as well, with the file going
from 1057 lines to 407.
Side note: `Variant.cs` was mistakenly created in the wrong folder,
so I moved it to the `Core` folder.
|
|
C#: Add Projection documentation
|
|
- Add documentation to Projection type
- Reorder Projection members to be consistent with other C# types
|
|
Fix drawing of Mesh2D
|
|
GDScript: Properly respect `int` type hint for `@export_range`
|
|
Ensure class name is printed in STATIC_CALLED_ON_INSTANCE warning
|
|
Fixes #69104.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
|
|
The batch was being discarded if no instance buffer was present, but an instance buffer is only needed for MultiMesh and particles.
|
|
|
|
Fix custom visual shader nodes not being loaded at startup
|
|
Cleanup remaining EditorUndoRedoManager usages
|
|
Add history dock to default editor layout, and prevent signal connecting multiple times
|
|
|
|
|
|
C#: Implement BezierDerivative
|
|
Fixes and improvements to Search Results dock
|
|
Make `Node.print_orphan_nodes()` static
|
|
Fix for documentation not appearing in preview in editor inspector
|
|
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
|
|
Make it clearer that printraw only prints to terminal
|
|
Refactor interpolating functions in some classes to use `Math` class
|
|
Cache materials in gltf as the abstract class of Material in GLTFDocument
|
|
Don't free instanced scenes when recreating tiles
|
|
Improve editor property capitalization
|
|
- add the history dock to the default editor layout, so when a user does Editor -> Editor Layout -> Default the history dock will no longer disappear
- change the enter tree notification to a ready notification to prevent the history dock from trying to connect 'on_history_changed' signal everytime the dock is moved in the editor layout
|
|
|
|
Use the abstract material class instead of BaseMaterial3D. This allows inserting ShaderMaterials into gltf. Like in VRM.
|
|
Adds `BezierDerivative` method to Mathf, Vector2 and Vector3 (already exposed in Core).
|
|
- Don't capitalize stop words such as "at", "in" or "to".
- Add more acronyms to capitalize.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
|
|
GDScript: Only check if ignoring warnings in debug build
|
|
Fix warning in Signal Documentation
|
|
Fix near one opacity in editor icons
|
|
Fix C# documentation for Godot.Object
|
|
Improve logic for detecting and tracking extensions
|
|
[Editor] Fix float dock shows incorrect title.
|
|
|
|
|
|
|
|
|
|
|
|
`Curve3D` bake refactor continue
|
|
AudioEffectDistortion docs & inspector edits
|
|
Document PhysicalSkyMaterial's `energy_multiplier` property
|
|
Partial support for Pico 4
|
|
Update remaining physics `exclude` parameters to use `TypedArray`
|
|
|
|
- Add and fix a few C# examples
- Add tips about avoiding allocating StringNames
|
|
The main change is to caculate tangent directly from bezier curve, without going
through discretized polyline, avoiding pitfalls of discretization.
Other changes are:
1. Add an bezier_derivative() method for Vector3, Vector2, and Math;
2. Add an tesselate_even_length() method to Curve3D, which tesselate bezier curve to even length segments adaptively;
3. Cache the tangent vectors in baked_tangent_vector_cache;
|
|
|
|
This makes the PhysicalSkyMaterial class 100% documented.
|