Skip to content

Commit f7c1b11

Browse files
authored
Merge branch 'godotengine:master' into master
2 parents f93ffe5 + b97110c commit f7c1b11

File tree

7,517 files changed

+1313582
-639571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,517 files changed

+1313582
-639571
lines changed

.clang-tidy

+18-43
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,22 @@
11
---
2-
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,cppcoreguidelines-pro-type-member-init,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-nullptr,readability-braces-around-statements,readability-redundant-member-init'
2+
Checks: >-
3+
-*,
4+
cppcoreguidelines-pro-type-member-init,
5+
modernize-redundant-void-arg,
6+
modernize-use-bool-literals,
7+
modernize-use-default-member-init,
8+
modernize-use-nullptr,
9+
readability-braces-around-statements,
10+
readability-redundant-member-init
311
WarningsAsErrors: ''
4-
HeaderFilterRegex: ''
5-
AnalyzeTemporaryDtors: false
6-
FormatStyle: none
12+
HeaderFileExtensions: ['', h, hh, hpp, hxx, inc, glsl]
13+
ImplementationFileExtensions: [c, cc, cpp, cxx, m, mm, java]
14+
HeaderFilterRegex: (core|doc|drivers|editor|main|modules|platform|scene|servers|tests)/
15+
FormatStyle: file
716
CheckOptions:
8-
- key: cert-dcl16-c.NewSuffixes
9-
value: 'L;LL;LU;LLU'
10-
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
11-
value: '0'
12-
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
13-
value: '1'
14-
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
15-
value: '1'
16-
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
17-
value: '1'
18-
- key: cppcoreguidelines-pro-type-member-init.UseAssignment
19-
value: '1'
20-
- key: google-readability-function-size.StatementThreshold
21-
value: '800'
22-
- key: google-readability-namespace-comments.ShortNamespaceLines
23-
value: '10'
24-
- key: google-readability-namespace-comments.SpacesBeforeComments
25-
value: '2'
26-
- key: modernize-loop-convert.MaxCopySize
27-
value: '16'
28-
- key: modernize-loop-convert.MinConfidence
29-
value: reasonable
30-
- key: modernize-loop-convert.NamingStyle
31-
value: CamelCase
32-
- key: modernize-pass-by-value.IncludeStyle
33-
value: llvm
34-
- key: modernize-replace-auto-ptr.IncludeStyle
35-
value: llvm
36-
- key: modernize-use-bool-literals.IgnoreMacros
37-
value: '0'
38-
- key: modernize-use-default-member-init.IgnoreMacros
39-
value: '0'
40-
- key: modernize-use-default-member-init.UseAssignment
41-
value: '1'
42-
- key: modernize-use-nullptr.NullMacros
43-
value: 'NULL'
44-
- key: readability-braces-around-statements.ShortStatementLines
45-
value: '0'
17+
cppcoreguidelines-pro-type-member-init.IgnoreArrays: true
18+
cppcoreguidelines-pro-type-member-init.UseAssignment: true
19+
modernize-use-bool-literals.IgnoreMacros: false
20+
modernize-use-default-member-init.IgnoreMacros: false
21+
modernize-use-default-member-init.UseAssignment: true
4622
...
47-

.editorconfig

+2-9
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,5 @@ indent_size = 4
2222
indent_style = space
2323
indent_size = 2
2424

25-
# GDScript unit test files
26-
[*.gd]
27-
indent_style = tab
28-
indent_size = 4
29-
insert_final_newline = true
30-
trim_trailing_whitespace = true
31-
32-
[*.out]
33-
insert_final_newline = true
25+
[*.svg]
26+
insert_final_newline = false

.git-blame-ignore-revs

+39
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,42 @@
1515

1616
# Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
1717
e956e80c1fa1cc8aefcb1533e5acf5cf3c8ffdd9
18+
19+
# One Copyright Update to rule them all
20+
d95794ec8a7c362b06a9cf080e2554ef77adb667
21+
22+
# Update copyright statements to 2022
23+
fe52458154c64fb1b741df4f7bd10106395f7cbd
24+
25+
# Update copyright statements to 2021
26+
b5334d14f7a471f94bcbd64d5bae2ad853d0b7f1
27+
28+
# Update copyright statements to 2020
29+
a7f49ac9a107820a62677ee3fb49d38982a25165
30+
31+
# Update copyright statements to 2019
32+
b16c309f82c77d606472c3c721a1857e323a09e7
33+
34+
# Update copyright statements to 2018
35+
b50a9114b105dafafdda8248a38653bca314a6f3
36+
37+
# Welcome in 2017, dear changelog reader!
38+
c7bc44d5ad9aae4902280012f7654e2318cd910e
39+
40+
# Update copyright to 2016 in headers
41+
5be9ff7b6715a661e85f99b108f96340de7ef435
42+
43+
# Updated copyright year in all headers
44+
fdaa2920eb21fff3320a17e9239e04dfadecdb00
45+
46+
# Add missing copyright headers and fix formatting
47+
e4213e66b2dd8f5a87d8cf5015ac83ba3143279d
48+
49+
# Use HTTPS URL for Godot's website in the headers
50+
bd282ff43f23fe845f29a3e25c8efc01bd65ffb0
51+
52+
# Add "Godot Engine contributors" copyright line
53+
df61dc4b2bd54a5a40c515493c76f5a458e5b541
54+
55+
# Enforce template syntax `typename` over `class`
56+
9903e6779b70fc03aae70a37b9cf053f4f355b91

.gitattributes

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ thirdparty/* linguist-vendored
55

66
# Normalize EOL for all files that Git considers text files
77
* text=auto eol=lf
8-
# Except for bat files, which are Windows only files
8+
# Except for Windows-only / Visual Studio files
99
*.bat eol=crlf
10+
*.sln eol=crlf
11+
*.csproj eol=crlf
12+
misc/msvs/*.template eol=crlf
1013
# And some test files where the EOL matters
1114
*.test.txt -text
1215

.github/CODEOWNERS

+6-3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ doc_classes/* @godotengine/documentation
3636
/drivers/xaudio2/ @godotengine/audio
3737

3838
## Rendering
39+
/drivers/d3d12/ @godotengine/rendering
3940
/drivers/dummy/ @godotengine/rendering
4041
/drivers/gles3/ @godotengine/rendering
4142
/drivers/spirv-reflect/ @godotengine/rendering
@@ -51,12 +52,14 @@ doc_classes/* @godotengine/documentation
5152
# Editor
5253

5354
/editor/*debugger* @godotengine/debugger
55+
/editor/gui/ @godotengine/usability @godotengine/gui-nodes
5456
/editor/icons/ @godotengine/usability
5557
/editor/import/ @godotengine/import
5658
/editor/plugins/*2d_*.* @godotengine/2d-editor
5759
/editor/plugins/*3d_*.* @godotengine/3d-editor
5860
/editor/plugins/script_*.* @godotengine/script-editor
5961
/editor/plugins/*shader*.* @godotengine/shaders
62+
/editor/themes/ @godotengine/usability @godotengine/gui-nodes
6063
/editor/code_editor.* @godotengine/script-editor
6164
/editor/*dock*.* @godotengine/docks
6265
/editor/*shader*.* @godotengine/shaders
@@ -68,6 +71,7 @@ doc_classes/* @godotengine/documentation
6871
# Misc
6972

7073
/misc/ @godotengine/buildsystem
74+
/misc/extension_api_validation/ @godotengine/gdextension @godotengine/dotnet
7175

7276
# Modules
7377

@@ -139,10 +143,9 @@ doc_classes/* @godotengine/documentation
139143

140144
/platform/android/ @godotengine/android
141145
/platform/ios/ @godotengine/ios
142-
/platform/javascript/ @godotengine/html5
143146
/platform/linuxbsd/ @godotengine/linux-bsd
144147
/platform/macos/ @godotengine/macos
145-
/platform/uwp/ @godotengine/uwp
148+
/platform/web/ @godotengine/web
146149
/platform/windows/ @godotengine/windows
147150

148151
# Scene
@@ -154,11 +157,11 @@ doc_classes/* @godotengine/documentation
154157
/scene/debugger/ @godotengine/debugger
155158
/scene/gui/ @godotengine/gui-nodes
156159
/scene/main/ @godotengine/core
157-
/scene/resources/default_theme/ @godotengine/gui-nodes
158160
/scene/resources/font.* @godotengine/gui-nodes
159161
/scene/resources/text_line.* @godotengine/gui-nodes
160162
/scene/resources/text_paragraph.* @godotengine/gui-nodes
161163
/scene/resources/visual_shader*.* @godotengine/shaders
164+
/scene/theme/ @godotengine/gui-nodes
162165

163166
# Servers
164167

.github/ISSUE_TEMPLATE/bug_report.yml

+21-14
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,25 @@ body:
55
- type: markdown
66
attributes:
77
value: |
8-
- When reporting bugs, you'll make our life simpler (and the fix will come sooner) if you follow the guidelines in this template.
8+
When reporting bugs, please follow the guidelines in this template. This helps identify the problem precisely and thus enables contributors to fix it faster.
99
- Write a descriptive issue title above.
1010
- The golden rule is to **always open *one* issue for *one* bug**. If you notice several bugs and want to report them, make sure to create one new issue for each of them.
1111
- Search [open](https://github.com/godotengine/godot/issues) and [closed](https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aclosed) issues to ensure it has not already been reported. If you don't find a relevant match or if you're unsure, don't hesitate to **open a new issue**. The bugsquad will handle it from there if it's a duplicate.
12-
- Verify that you are using a [supported Godot version](https://docs.godotengine.org/en/stable/about/release_policy.html).
12+
- Verify that you are using a [supported Godot version](https://docs.godotengine.org/en/latest/about/release_policy.html). Please always check if your issue is reproducible in the latest version – it may already have been fixed!
13+
- If you use a custom build, please test if your issue is reproducible in official builds too. Likewise if you use any C++ modules, GDExtensions, or editor plugins, you should check if the bug is reproducible in a project without these.
1314
14-
- type: input
15+
- type: textarea
1516
attributes:
16-
label: Godot version
17-
description: >
18-
Specify the Godot version, including the Git commit hash if using a development or non-official build. The exact Godot version (including the commit hash) can be copied by clicking the version shown in the editor (bottom bar) or in the project manager (top bar).
19-
If you use a custom build, please test if your issue is reproducible in official builds too.
20-
placeholder: 3.5.stable, 4.0.dev [3041becc6]
17+
label: Tested versions
18+
description: |
19+
To properly fix a bug, we need to identify if the bug was recently introduced in the engine, or if it was always present.
20+
- Please specify the Godot version you found the issue in, including the **Git commit hash** if using a development or non-official build. The exact Godot version (including the commit hash) can be copied by clicking the version shown in the editor (bottom bar) or in the project manager (top bar).
21+
- If you can, **please test earlier Godot versions** (previous stable branch, and development snapshots of the current feature release) and, if applicable, newer versions (development snapshots for the next feature release). Mention whether the bug is reproducible or not in the versions you tested. You can find all Godot releases in our [download archive](https://godotengine.org/download/archive/).
22+
- The aim is for us to identify whether a bug is a **regression**, i.e. an issue that didn't exist in a previous version, but was introduced later on, breaking existing functionality. For example, if a bug is reproducible in 4.2.stable but not in 4.1.stable, we would like you to test intermediate 4.2 dev and beta snapshots to find which snapshot is the first one where the issue can be reproduced.
23+
placeholder: |
24+
25+
- Reproducible in: 4.3.dev [d76c1d0e5], 4.2.stable, 4.2.dev5 and later 4.2 snapshots.
26+
- Not reproducible in: 4.1.3.stable, 4.2.dev4 and earlier 4.2 snapshots.
2127
validations:
2228
required: true
2329

@@ -39,7 +45,8 @@ body:
3945
label: Issue description
4046
description: |
4147
Describe your issue briefly. What doesn't work, and how do you expect it to work instead?
42-
You can include images or videos with drag and drop, and format code blocks or logs with <code>```</code> tags.
48+
You can include images or videos with drag and drop, and format code blocks or logs with <code>\`\`\`</code> tags, on separate lines before and after the text. (Use <code>\`\`\`gdscript</code> to add GDScript syntax highlighting.)
49+
Please do not add code examples or error messages as screenshots, but as text, this helps searching for issues and testing the code. If you are reporting a bug in the editor interface, like the script editor, please provide both a screenshot *and* the text of the code to help with testing.
4350
validations:
4451
required: true
4552

@@ -54,12 +61,12 @@ body:
5461

5562
- type: textarea
5663
attributes:
57-
label: Minimal reproduction project
64+
label: Minimal reproduction project (MRP)
5865
description: |
5966
- A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the `.godot` folder in the archive (but keep `project.godot`).
60-
- Required, unless the reproduction steps are trivial and don't require any project files to be followed. In this case, write "N/A" in the field.
61-
- Drag and drop a ZIP archive to upload it. **Do not select another field until the project is done uploading.**
62-
- **Note for C# users:** If your issue is *not* Mono-specific, please upload a minimal reproduction project written in GDScript or VisualScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available.
63-
- **If you've been asked by a maintainer to upload a minimal reproduction project, you *must* do so within 7 days.** Otherwise, your bug report will be closed as it'll be considered too difficult to diagnose.
67+
- Having an MRP is very important for contributors to be able to reproduce the bug in the same way that you are experiencing it. When testing a potential fix for the issue, contributors will use the MRP to validate that the fix is working as intended.
68+
- If the reproduction steps are not project dependent (e.g. the bug is visible in a brand new project), you can write "N/A" in the field.
69+
- Drag and drop a ZIP archive to upload it (max 10 MB). **Do not select another field until the project is done uploading.**
70+
- **Note for C# users:** If your issue is *not* C#-specific, please upload a minimal reproduction project written in GDScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a .NET setup available.
6471
validations:
6572
required: true

.github/PULL_REQUEST_TEMPLATE.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<!--
22
Please target the `master` branch in priority.
3-
PRs can target `3.x` if the same change was done in `master`, or is not relevant there.
43
54
Relevant fixes are cherry-picked for stable branches as needed by maintainers.
6-
You can mention in the description if the change is compatible with `3.x`.
75
86
To speed up the contribution process and avoid CI errors, please set up pre-commit hooks locally:
97
https://docs.godotengine.org/en/latest/contributing/development/code_style_guidelines.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Download Godot artifact
2+
description: Download the Godot artifact.
3+
inputs:
4+
name:
5+
description: The artifact name.
6+
default: "${{ github.job }}"
7+
path:
8+
description: The path to download and extract to.
9+
required: true
10+
default: "./"
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Download Godot Artifact
15+
uses: actions/download-artifact@v4
16+
with:
17+
name: ${{ inputs.name }}
18+
path: ${{ inputs.path }}
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dump Godot API
2+
description: Dump Godot API for GDExtension
3+
inputs:
4+
bin:
5+
description: The path to the Godot executable
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
# Dump GDExtension interface and API
11+
- name: Dump GDExtension interface and API for godot-cpp build
12+
shell: sh
13+
run: |
14+
${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api
15+
mkdir godot-api
16+
cp -f gdextension_interface.h godot-api/
17+
cp -f extension_api.json godot-api/
18+
19+
- name: Upload API dump
20+
uses: ./.github/actions/upload-artifact
21+
with:
22+
name: 'godot-api-dump'
23+
path: './godot-api/*'

.github/actions/godot-build/action.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ inputs:
1313
sconsflags:
1414
default: ""
1515
scons-cache:
16-
description: The scons cache path.
16+
description: The SCons cache path.
1717
default: "${{ github.workspace }}/.scons-cache/"
1818
scons-cache-limit:
19-
description: The scons cache size limit.
19+
description: The SCons cache size limit.
2020
# actions/cache has 10 GiB limit, and GitHub runners have a 14 GiB disk.
2121
# Limit to 7 GiB to avoid having the extracted cache fill the disk.
2222
default: 7168
@@ -31,6 +31,18 @@ runs:
3131
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
3232
run: |
3333
echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
34-
if [ "${{ inputs.target }}" != "editor" ]; then rm -rf editor; fi # Ensure we don't include editor code.
34+
35+
if [ "${{ inputs.target }}" != "editor" ]; then
36+
# Ensure we don't include editor code in export template builds.
37+
rm -rf editor
38+
fi
39+
40+
if [ "${{ github.event.number }}" != "" ]; then
41+
# Set build identifier with pull request number if available. This is displayed throughout the editor.
42+
export BUILD_NAME="gh-${{ github.event.number }}"
43+
else
44+
export BUILD_NAME="gh"
45+
fi
46+
3547
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
3648
ls -l bin/

.github/actions/godot-cache/action.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,31 @@ inputs:
55
description: The cache base name (job name by default).
66
default: "${{github.job}}"
77
scons-cache:
8-
description: The scons cache path.
8+
description: The SCons cache path.
99
default: "${{github.workspace}}/.scons-cache/"
1010
runs:
1111
using: "composite"
1212
steps:
13-
# Upload cache on completion and check it out now
14-
- name: Load .scons_cache directory
15-
uses: actions/cache@v3
13+
# Upload cache on completion and check it out now.
14+
- name: Load SCons cache directory
15+
uses: actions/cache@v4
1616
with:
1717
path: ${{inputs.scons-cache}}
1818
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
19+
20+
# We try to match an existing cache to restore from it. Each potential key is checked against
21+
# all existing caches as a prefix. E.g. 'linux-template-minimal' would match any cache that
22+
# starts with "linux-template-minimal", such as "linux-template-minimal-master-refs/heads/master-6588a4a29af1621086feac0117d5d4d37af957fd".
23+
#
24+
# We check these prefixes in this order:
25+
#
26+
# 1. The exact match, including the base branch, the commit reference, and the SHA hash of the commit.
27+
# 2. A partial match for the same base branch and the same commit reference.
28+
# 3. A partial match for the same base branch and the base branch commit reference.
29+
# 4. A partial match for the same base branch only (not ideal, matches any PR with the same base branch).
30+
1931
restore-keys: |
2032
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
2133
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
34+
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-refs/heads/${{env.GODOT_BASE_BRANCH}}
2235
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Test Godot project converter
2+
description: Test the Godot project converter.
3+
inputs:
4+
bin:
5+
description: The path to the Godot executable
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Test 3-to-4 conversion
11+
shell: sh
12+
run: |
13+
mkdir converter_test
14+
cd converter_test
15+
touch project.godot
16+
../${{ inputs.bin }} --headless --validate-conversion-3to4
17+
cd ..
18+
rm converter_test -rf

0 commit comments

Comments
 (0)