Skip to content

Commit

Permalink
Merge pull request godotengine#9936 from mhilbrunner/3-6-cherrypicks
Browse files Browse the repository at this point in the history
3.6 cherrypicks
  • Loading branch information
mhilbrunner authored Sep 10, 2024
2 parents 19c8d42 + 0d9540a commit d3d93e0
Show file tree
Hide file tree
Showing 34 changed files with 228 additions and 96 deletions.
5 changes: 4 additions & 1 deletion _static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ article ol,
}

body,
.rst-content table.docutils thead {
.rst-content table.docutils thead,
.rst-content table.docutils caption {
color: var(--body-color);
}

Expand Down Expand Up @@ -644,7 +645,9 @@ footer {
}

.wy-body-for-nav {
position: relative;
background-color: var(--content-wrap-background-color);
overflow: visible;
}

@media only screen and (min-width: 769px) {
Expand Down
5 changes: 1 addition & 4 deletions about/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Windows
- Move the Godot executable to a stable location (i.e. outside of your Downloads folder),
so you don't accidentally move it and break the shortcut in the future.
- Right-click the Godot executable and choose **Create Shortcut**.
- Move the created shortcut to ``%LOCALAPPDATA%\Microsoft\Windows\Start Menu\Programs``.
- Move the created shortcut to ``%APPDATA%\Microsoft\Windows\Start Menu\Programs``.
This is the user-wide location for shortcuts that will appear in the Start menu.
You can also pin Godot in the task bar by right-clicking the executable and choosing
**Pin to Task Bar**.
Expand Down Expand Up @@ -436,9 +436,6 @@ When creating a non-game application, make sure to enable
:ref:`low-processor mode <class_ProjectSettings_property_application/run/low_processor_mode>`
in the Project Settings to decrease CPU and GPU usage.

That said, we wouldn't recommend using Godot to create a *mobile* application
since low-processor mode isn't supported on mobile platforms yet.

Check out `Material Maker <https://github.com/RodZill4/material-maker>`__ and
`Pixelorama <https://github.com/Orama-Interactive/Pixelorama>`__ for examples of
open source applications made with Godot.
Expand Down
23 changes: 23 additions & 0 deletions about/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,29 @@ resolve this, open **Project > Project Settings** and enable **Display > Window
> Dpi > Allow Hidpi**. On top of that, make sure your project is configured to
support :ref:`multiple resolutions <doc_multiple_resolutions>`.

The editor or project appears to have washed out colors
-------------------------------------------------------

On Windows, this is usually caused by incorrect OS or monitor settings, as Godot
currently does not support :abbr:`HDR (High Dynamic Range)` *output*
(even though it may internally render in HDR).

As `most displays are not designed to display SDR content in HDR mode <https://tftcentral.co.uk/articles/heres-why-you-should-only-enable-hdr-mode-on-your-pc-when-you-are-viewing-hdr-content>`__,
it is recommended to disable HDR in the Windows settings when not running applications
that use HDR output. On Windows 11, this can be done by pressing
:kbd:`Windows + Alt + B` (this shortcut is part of the Xbox Game Bar app).
To toggle HDR automatically based on applications currently running, you can use
`AutoActions <https://github.com/Codectory/AutoActions>`__.

If you insist on leaving HDR enabled, it is possible to somewhat improve the
result by ensuring the display is configured to use :abbr:`HGIG (HDR Gaming Interest Group)`
tonemapping (as opposed to :abbr:`DTM (Dynamic Tone Mapping)`), then
`using the Windows HDR calibration app <https://support.microsoft.com/en-us/windows/calibrate-your-hdr-display-using-the-windows-hdr-calibration-app-f30f4809-3369-43e4-9b02-9eabebd23f19>`__.
It is also strongly recommended to use Windows 11 instead of Windows 10 when using HDR.
The end result will still likely be inferior to disabling HDR on the display, though.

Support for HDR *output* is planned in a future release.

The editor/project freezes or displays glitched visuals after resuming the PC from suspend
------------------------------------------------------------------------------------------

Expand Down
116 changes: 58 additions & 58 deletions community/contributing/code_style_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,35 +160,35 @@ Example:

.. code-block:: cpp
/*************************************************************************/
/* my_new_file.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
/**************************************************************************/
/* my_new_file.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef MY_NEW_FILE_H
#define MY_NEW_FILE_H
Expand All @@ -205,35 +205,35 @@ Example:
.. code-block:: cpp
/*************************************************************************/
/* my_new_file.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
/**************************************************************************/
/* my_new_file.cpp */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#include "my_new_file.h"
Expand Down
40 changes: 36 additions & 4 deletions community/contributing/pr_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,16 @@ do:

$ git push origin better-project-manager

Git will ask you for your username and password, and the changes will be sent
to your remote. If you check the fork's page on GitHub, you should see a new
branch with your added commits.
Git will ask you for your username and password. For your password, enter your
GitHub Personal Access Token (PAT). If you do not have a GitHub Personal Access
Token, or do not have one with the correct permissions for your newly forked
repository, you will need to create one. Follow this link to create your Personal
Access Token: `Creating a personal access token
<https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token>`_.

After you have successfully verified your account using your PAT, the changes
will be sent to your remote repository. If you check the fork's page on GitHub,
you should see a new branch with your added commits.

Issuing a pull request
----------------------
Expand Down Expand Up @@ -511,7 +518,7 @@ will raise an error:
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart.

This is a sane behavior, Git will not let you push changes that would
This is reasonable behavior, Git will not let you push changes that would
override remote content. But that's actually what we want to do here, so we
will have to *force* it:

Expand All @@ -523,6 +530,31 @@ And tadaa! Git will happily *replace* your remote branch with what you had
locally (so make sure that's what you wanted, using ``git log``). This will
also update the PR accordingly.

Rebasing onto another branch
----------------------------

If you have accidentally opened your PR on the wrong branch, or need to target another branch
for some reason, you might need to filter out a lot of commits that differ between the old branch
(for example ``4.2``) and the new branch (for example ``master``). This can make rebasing difficult
and tedious. Fortunately ``git`` has a command just for this situation, ``git rebase --onto``.

If your PR was created from the ``4.2`` branch and you want to update it to instead start at ``master``
the following steps *should* fix this in one step:

.. code-block:: text
$ git rebase -i --onto master 4.2
This will take all the commits on your branch *after* the ``4.2`` branch, and then splice them on top of ``master``,
ignoring any commits from the ``4.2`` branch not on the ``master`` branch. You may still need to do some fixing, but
this command should save you a lot of tedious work removing commits.

Just like above for the interactive rebase you need to force push your branch to handle the different changes:

::

$ git push --force origin better-project-manager

Deleting a Git branch
---------------------

Expand Down
11 changes: 11 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
# we can ignore this so we still can treat other warnings as errors.
sphinx_tabs_nowarn = True

# Disable collapsing tabs for codeblocks.
sphinx_tabs_disable_tab_closing = True

# Custom 4O4 page HTML template.
# https://github.com/readthedocs/sphinx-notfound-page
notfound_context = {
Expand Down Expand Up @@ -113,7 +116,14 @@
"zh_TW": "Godot Engine %s 正體中文 (台灣) 文件",
}

# RTD normalized their language codes to ll-cc (e.g. zh-cn),
# but Sphinx did not and still uses ll_CC (e.g. zh_CN).
# `language` is the Sphinx configuration so it needs to be converted back.
language = os.getenv("READTHEDOCS_LANGUAGE", "en")
if "-" in language:
(lang_name, lang_country) = language.split("-")
language = lang_name + "_" + lang_country.upper()

if not language in supported_languages.keys():
print("Unknown language: " + language)
print("Supported languages: " + ", ".join(supported_languages.keys()))
Expand All @@ -123,6 +133,7 @@
language = "en"

is_i18n = tags.has("i18n") # noqa: F821
print("Build language: {}, i18n tag: {}".format(language, is_i18n))

exclude_patterns = ["_build"]

Expand Down
16 changes: 16 additions & 0 deletions development/compiling/compiling_for_osx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,22 @@ template from the official Godot distribution::

zip -q -9 -r osx.zip osx_template.app

Using Pyston for faster development
-----------------------------------

You can use `Pyston <https://www.pyston.org/>`__ to run SCons. Pyston is a
JIT-enabled implementation of the Python language (which SCons is written in).
Its "full" version is currently only compatible with Linux, but Pyston-lite is
also compatible with macOS (both x86 and ARM). Pyston can speed up incremental
builds significantly, often by a factor between 1.5× and 2×. Pyston can be
combined with alternative likers such as LLD or Mold to get even faster builds.

To install Pyston-lite, run ``python -m pip install pyston_lite_autoload`` then
run SCons as usual. This will automatically load a subset of Pyston's
optimizations in any Python program you run. However, this won't bring as much
of a performance improvement compared to installing "full" Pyston (which
currently can't be done on macOS).

Cross-compiling for macOS from Linux
------------------------------------

Expand Down
7 changes: 7 additions & 0 deletions development/compiling/compiling_for_x11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,10 @@ to get even faster builds.

If you can't run ``pyston-scons`` after creating the symbolic link,
make sure ``$HOME/.local/bin/`` is part of your user's ``PATH`` environment variable.

.. note::

Alternatively, you can run ``python -m pip install pyston_lite_autoload``
then run SCons as usual. This will automatically load a subset of Pyston's
optimizations in any Python program you run. However, this won't bring as
much of a performance improvement compared to installing "full" Pyston.
2 changes: 1 addition & 1 deletion development/cpp/custom_modules_in_cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ Run command:

::

user@host:~/godot/bin$ ./bin/<godot_binary> --doctool .
user@host:~/godot$ ./bin/<godot_binary> --doctool .

Now if you go to the ``godot/modules/summator/doc_classes`` folder, you will see
that it contains a ``Summator.xml`` file, or any other classes, that you referenced
Expand Down
2 changes: 2 additions & 0 deletions development/cpp/macos_debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Create an ``editor.entitlements`` text file with the following contents:
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
Expand Down
2 changes: 1 addition & 1 deletion development/editor/introduction_to_editor_development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ from ``servers/`` and ``core/``, it cannot depend on includes from ``editor/``.

Currently, there are some dependencies to ``editor/`` includes in ``scene/``
files, but
`they are in the process of being removed <https://github.com/godotengine/godot/issues/29730>`__.
`they are in the process of being removed <https://github.com/godotengine/godot/issues/53295>`__.

Development tips
----------------
Expand Down
2 changes: 1 addition & 1 deletion getting_started/introduction/first_look_at_the_editor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Project manager
-------------------

When you launch Godot, the first window you see is the Project Manager. In the
default tab, "Projects," you can manage existing projects, import or create new
default tab **Local Projects**, you can manage existing projects, import or create new
ones, and more.

.. image:: img/editor_intro_project_manager.png
Expand Down
Loading

0 comments on commit d3d93e0

Please sign in to comment.