summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore493
-rw-r--r--doc/classes/CPUParticles2D.xml11
-rw-r--r--doc/classes/CPUParticles3D.xml13
-rw-r--r--doc/classes/ParticlesMaterial.xml13
-rw-r--r--editor/import/dynamic_font_import_settings.cpp10
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp4
-rw-r--r--editor/scene_tree_dock.cpp8
-rw-r--r--main/main.cpp6
-rw-r--r--scene/2d/cpu_particles_2d.cpp10
-rw-r--r--scene/2d/cpu_particles_2d.h1
-rw-r--r--scene/3d/cpu_particles_3d.cpp12
-rw-r--r--scene/3d/cpu_particles_3d.h1
-rw-r--r--scene/animation/animation_blend_tree.cpp2
-rw-r--r--scene/resources/particles_material.cpp15
-rw-r--r--scene/resources/particles_material.h1
15 files changed, 302 insertions, 298 deletions
diff --git a/.gitignore b/.gitignore
index 5a8f6aec40..9327cdde4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,74 @@
-# Godot auto generated files
+# Godot .gitignore config
+#
+# Aims to encompass the most commonly found files that we don't want committed
+# to Git, such as compilation output, IDE specific files, etc.
+#
+# It doesn't cover *all* thirdparty IDE extensions under the sun so if you have
+# specific needs covered here, you can add them to:
+# .git/info/exclude
+#
+# Or contribute them to this file if they're common enough that a good number of
+# users would benefit from the shared rules.
+#
+# This file is organized by sections, with subsections ordered alphabetically.
+# - Build configuration
+# - Godot generated files
+# - General build output
+# - IDE and tool specific
+# - Visual Studio specific
+# - OS specific
+
+###########################
+### Build configuration ###
+###########################
+
+/custom.py
+
+#############################
+### Godot generated files ###
+#############################
+
+# Buildsystem
+bin/
*.gen.*
+compile_commands.json
+platform/windows/godot_res.res
+
+# Generated by Godot binary
.import/
+extension_api.json
+logs/
-# Documentation generated by doxygen or from classes.xml
-doc/_build/
+# Generated by unit tests
+tests/data/*.translation
-# Extension API dump
-extension_api.json
+############################
+### General build output ###
+############################
-# Javascript specific
-*.bc
+# C/C++ generated
+*.a
+*.ax
+*.d
+*.dll
+*.lib
+*.lo
+*.o
+*.os
+*.ox
+*.Plo
+*.so
+# Binutils tmp linker output of the form "stXXXXXX" where "X" is alphanumeric
+st[A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9]
-# CLion
-cmake-build-debug
+# Python generated
+__pycache__/
+*.pyc
-# clangd
-.clangd/
+# Documentation
+doc/_build/
-# Android specific
+# Android
.gradle
local.properties
*.iml
@@ -29,118 +80,192 @@ platform/android/java/app/libs/*
platform/android/java/lib/.cxx/*
platform/android/java/nativeSrcsConfigs/.cxx/
-# General c++ generated files
-*.lib
-*.o
-*.ox
-*.a
-*.ax
-*.d
-*.so
-*.os
-*.Plo
-*.lo
-# Binutils tmp linker output of the form "stXXXXXX" where "X" is alphanumeric
-st[A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9]
+# iOS
+*.dSYM
+
+# Javascript
+*.bc
+
+# Misc
+*.debug
-# Libs generated files
+#############################
+### IDE and tool specific ###
+#############################
+
+# Automake
.deps/*
.dirstamp
-# Gprof output
-gmon.out
+# ccls
+.ccls-cache/
-# Vim temp files
-*.swo
-*.swp
+# clangd
+.clangd/
+.cache/
-# Qt project files
-*.config
-*.creator
-*.creator.*
-*.files
-*.includes
-*.cflags
-*.cxxflags
+# CLion
+cmake-build-debug
-# Code::Blocks files
+# Code::Blocks
*.cbp
*.layout
*.depend
-# Eclipse CDT files
+# CodeLite
+*.project
+*.workspace
+.codelite/
+
+# Cppcheck
+*.cppcheck
+cppcheck-cppcheck-build-dir/
+
+# Eclipse CDT
.cproject
.settings/
*.pydevproject
*.launch
-# Geany/geany-plugins files
+# Gcov and Lcov code coverage
+*.gcno
+*.gcda
+*.gcov.html
+*.func.html
+*.func-sort-c.html
+*index-sort-f.html
+*index-sort-l.html
+*index.html
+godot.info
+amber.png
+emerald.png
+glass.png
+ruby.png
+snow.png
+updown.png
+gcov.css
+
+# Geany
*.geany
.geanyprj
+# Gprof
+gmon.out
+
# Jetbrains IDEs
.idea/
-# Misc
-.DS_Store
-__MACOSX
-logs/
+# Kate
+*.kate-swp
+
+# Kdevelop
+*.kdev4
+
+# Qt Creator
+*.config
+*.creator
+*.creator.*
+*.files
+*.includes
+*.cflags
+*.cxxflags
-# for projects that use SCons for building: https://www.scons.org/
+# SCons
.sconf_temp
.sconsign*.dblite
-*.pyc
+.scons_env.json
+.scons_node_count
+
+# Sourcetrail
+*.srctrl*
+
+# Tags
+# https://github.com/github/gitignore/blob/master/Global/Tags.gitignore
+# Ignore tags created by etags, ctags, gtags (GNU global) and cscope
+TAGS
+!TAGS/
+tags
+*.tags
+!tags/
+gtags.files
+GTAGS
+GRTAGS
+GPATH
+cscope.files
+cscope.out
+cscope.in.out
+cscope.po.out
+
+# Vim
+*.swo
+*.swp
+
+# Visual Studio Code
+.vscode/
+*.code-workspace
+.history/
+
+# Xcode
+xcuserdata/
+*.xcscmblueprint
+*.xccheckout
+*.xcodeproj/*
+
+##############################
+### Visual Studio specific ###
+##############################
# https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
+# Ignore Visual Studio temporary files, build results, and
+# files generated by popular Visual Studio add-ons.
+
+# Actual VS project files we don't use
+*.sln
+*.vcxproj*
# User-specific files
+*.rsuser
*.suo
*.user
+*.userosscache
*.sln.docstates
-*.sln
-*.vcxproj*
-# Custom SCons configuration override
-/custom.py
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
+[Rr]eleases/
x64/
-build/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
-*.debug
-*.dSYM
+[Ll]og/
+[Ll]ogs/
-# Visual Studio cache/options directory
+# Visual Studio 2015/2017 cache/options directory
.vs/
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# Hints for improving IntelliSense, created together with VS project
-cpp.hint
-
-#NUNIT
-*.VisualState.xml
-TestResult.xml
+# Visual Studio 2017 auto generated files
+Generated\ Files/
-*.o
-*.a
+# Files built by Visual Studio
*_i.c
*_p.c
-*_i.h
+*_h.h
*.ilk
*.meta
*.obj
+*.iobj
*.pch
*.pdb
+*.ipdb
*.pgc
*.pgd
*.rsp
@@ -150,249 +275,89 @@ TestResult.xml
*.tlh
*.tmp
*.tmp_proj
-*.bak
+*_wpftmp.csproj
*.log
+*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
-*.nib
-
-# Chutzpah Test files
-_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
+*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
-*.VC.opendb
*.VC.VC.opendb
-enc_temp_folder/
# Visual Studio profiler
*.psess
*.vsp
*.vspx
+*.sap
-# CodeLite project files
-*.project
-*.workspace
-.codelite/
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
+# Visual Studio Trace Files
+*.e2e
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
-# JustCode is a .NET coding addin-in
-.JustCode
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# NCrunch
-*.ncrunch*
-_NCrunch_*
-.*crunch*.local.xml
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-
-# NuGet Packages Directory
-## TODO: If you have NuGet Package Restore enabled, uncomment the next line
-#packages/*
-## TODO: If the tool you use requires repositories.config, also uncomment the next line
-#!packages/repositories.config
-
-# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
-# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)
-!packages/build/
-
-# Windows Azure Build Output
-csx/
-*.build.csdef
-
-# Windows Store app package directory
-AppPackages/
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
# Others
-sql/
-*.Cache
ClientBin/
-[Ss]tyle[Cc]op.*
~$*
-*~
*.dbmdl
*.dbproj.schemaview
+*.jfm
*.pfx
*.publishsettings
-node_modules/
-__pycache__/
-
-# KDE
-.directory
-
-# Kdevelop project files
-*.kdev4
-
-# Kate swap files
-*.kate-swp
-
-# Xcode
-xcuserdata/
-*.xcscmblueprint
-*.xccheckout
-*.xcodeproj/*
-
-# RIA/Silverlight projects
-Generated_Code/
+orleans.codegen.cs
-# Backup & report files from converting an old project file to a newer
-# Visual Studio version. Backup files are not needed, because we have git ;-)
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
-# SQL Server files
-App_Data/*.mdf
-App_Data/*.ldf
+###################
+### OS specific ###
+###################
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-
-# Microsoft Fakes
-FakesAssemblies/
+# Linux
+*~
+.directory
-# =========================
-# Windows detritus
-# =========================
+# macOS
+.DS_Store
+__MACOSX
-# Windows image file caches
+# Windows
+# https://github.com/github/gitignore/blob/main/Global/Windows.gitignore
[Tt]humbs.db
[Tt]humbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
-
-# Windows stackdumps
*.stackdump
-
-# Windows shortcuts
-*.lnk
-
-# Folder config file
[Dd]esktop.ini
-
-# Recycle Bin used on file shares
$RECYCLE.BIN/
-logo.h
-*.autosave
-
-# https://github.com/github/gitignore/blob/master/Global/Tags.gitignore
-# Ignore tags created by etags, ctags, gtags (GNU global) and cscope
-TAGS
-!TAGS/
-tags
-*.tags
-!tags/
-gtags.files
-GTAGS
-GRTAGS
-GPATH
-cscope.files
-cscope.out
-cscope.in.out
-cscope.po.out
-godot.creator.*
-
-projects/
-platform/windows/godot_res.res
-
-# Visual Studio 2017 and Visual Studio Code workspace folder
-/.vs
-/.vscode
-
-# Visual Studio Code workspace file
-*.code-workspace
-
-# Scons construction environment dump
-.scons_env.json
-
-# Scons progress indicator
-.scons_node_count
-
-# ccls cache (https://github.com/MaskRay/ccls)
-.ccls-cache/
-
-# compile commands (https://clang.llvm.org/docs/JSONCompilationDatabase.html)
-compile_commands.json
-
-# Cppcheck
-*.cppcheck
-cppcheck-cppcheck-build-dir/
-
-# Gcov and Lcov code coverage
-*.gcno
-*.gcda
-*.gcov.html
-*.func.html
-*.func-sort-c.html
-*index-sort-f.html
-*index-sort-l.html
-*index.html
-godot.info
-amber.png
-emerald.png
-glass.png
-ruby.png
-snow.png
-updown.png
-gcov.css
-
-# https://clangd.llvm.org/ cache folder
-.clangd/
-.cache/
-
-# Generated by unit tests files
-tests/data/*.translation
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+*.lnk
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index 4a7ffe1536..dacdca1cee 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -313,18 +313,21 @@
All particles will be emitted from a single point.
</constant>
<constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape">
+ Particles will be emitted in the volume of a sphere flattened to two dimensions.
+ </constant>
+ <constant name="EMISSION_SHAPE_SPHERE_SURFACE" value="2" enum="EmissionShape">
Particles will be emitted on the surface of a sphere flattened to two dimensions.
</constant>
- <constant name="EMISSION_SHAPE_RECTANGLE" value="2" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_RECTANGLE" value="3" enum="EmissionShape">
Particles will be emitted in the area of a rectangle.
</constant>
- <constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_POINTS" value="4" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors].
</constant>
- <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="5" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].
</constant>
- <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_MAX" value="6" enum="EmissionShape">
Represents the size of the [enum EmissionShape] enum.
</constant>
</constants>
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index 7152f67f48..f2a0040ed4 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -370,19 +370,22 @@
<constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape">
Particles will be emitted in the volume of a sphere.
</constant>
- <constant name="EMISSION_SHAPE_BOX" value="2" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_SPHERE_SURFACE" value="2" enum="EmissionShape">
+ Particles will be emitted on the surface of a sphere.
+ </constant>
+ <constant name="EMISSION_SHAPE_BOX" value="3" enum="EmissionShape">
Particles will be emitted in the volume of a box.
</constant>
- <constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_POINTS" value="4" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors].
</constant>
- <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="5" enum="EmissionShape">
Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].
</constant>
- <constant name="EMISSION_SHAPE_RING" value="5" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_RING" value="6" enum="EmissionShape">
Particles will be emitted in a ring or cylinder.
</constant>
- <constant name="EMISSION_SHAPE_MAX" value="6" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_MAX" value="7" enum="EmissionShape">
Represents the size of the [enum EmissionShape] enum.
</constant>
</constants>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index e05853e816..885bedbc04 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -325,19 +325,22 @@
<constant name="EMISSION_SHAPE_SPHERE" value="1" enum="EmissionShape">
Particles will be emitted in the volume of a sphere.
</constant>
- <constant name="EMISSION_SHAPE_BOX" value="2" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_SPHERE_SURFACE" value="2" enum="EmissionShape">
+ Particles will be emitted on the surface of a sphere.
+ </constant>
+ <constant name="EMISSION_SHAPE_BOX" value="3" enum="EmissionShape">
Particles will be emitted in the volume of a box.
</constant>
- <constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_POINTS" value="4" enum="EmissionShape">
Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle color will be modulated by [member emission_color_texture].
</constant>
- <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="5" enum="EmissionShape">
Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture].
</constant>
- <constant name="EMISSION_SHAPE_RING" value="5" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_RING" value="6" enum="EmissionShape">
Particles will be emitted in a ring or cylinder.
</constant>
- <constant name="EMISSION_SHAPE_MAX" value="6" enum="EmissionShape">
+ <constant name="EMISSION_SHAPE_MAX" value="7" enum="EmissionShape">
Represents the size of the [enum EmissionShape] enum.
</constant>
<constant name="SUB_EMITTER_DISABLED" value="0" enum="SubEmitterMode">
diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp
index 8904e012cf..5d8f14a978 100644
--- a/editor/import/dynamic_font_import_settings.cpp
+++ b/editor/import/dynamic_font_import_settings.cpp
@@ -1408,7 +1408,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
// Page 1 layout: Rendering Options
VBoxContainer *page1_vb = memnew(VBoxContainer);
- page1_vb->set_meta("_tab_name", TTR("Rendering options"));
+ page1_vb->set_name(TTR("Rendering Options"));
main_pages->add_child(page1_vb);
page1_description = memnew(Label);
@@ -1439,7 +1439,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
// Page 2 layout: Configurations
VBoxContainer *page2_vb = memnew(VBoxContainer);
- page2_vb->set_meta("_tab_name", TTR("Sizes and variations"));
+ page2_vb->set_name(TTR("Sizes and Variations"));
main_pages->add_child(page2_vb);
page2_description = memnew(Label);
@@ -1491,7 +1491,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
// Page 3 layout: Text to select glyphs
VBoxContainer *page3_vb = memnew(VBoxContainer);
- page3_vb->set_meta("_tab_name", TTR("Glyphs from the text"));
+ page3_vb->set_name(TTR("Glyphs from the Text"));
main_pages->add_child(page3_vb);
page3_description = memnew(Label);
@@ -1548,7 +1548,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
// Page 4 layout: Character map
VBoxContainer *page4_vb = memnew(VBoxContainer);
- page4_vb->set_meta("_tab_name", TTR("Glyphs from the character map"));
+ page4_vb->set_name(TTR("Glyphs from the Character Map"));
main_pages->add_child(page4_vb);
page4_description = memnew(Label);
@@ -1599,7 +1599,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() {
// Page 4 layout: Metadata override
VBoxContainer *page5_vb = memnew(VBoxContainer);
- page5_vb->set_meta("_tab_name", TTR("Metadata override"));
+ page5_vb->set_name(TTR("Metadata Override"));
main_pages->add_child(page5_vb);
page5_description = memnew(Label);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 7f30dd91e5..d83cf17048 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1773,8 +1773,6 @@ void VisualShaderEditor::_change_input_port_name(const String &p_text, Object *p
undo_redo->create_action(TTR("Change Input Port Name"));
undo_redo->add_do_method(node.ptr(), "set_input_port_name", p_port_id, validated_name);
undo_redo->add_undo_method(node.ptr(), "set_input_port_name", p_port_id, node->get_input_port_name(p_port_id));
- undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node_id);
- undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node_id);
undo_redo->commit_action();
}
@@ -1801,8 +1799,6 @@ void VisualShaderEditor::_change_output_port_name(const String &p_text, Object *
undo_redo->create_action(TTR("Change Output Port Name"));
undo_redo->add_do_method(node.ptr(), "set_output_port_name", p_port_id, validated_name);
undo_redo->add_undo_method(node.ptr(), "set_output_port_name", p_port_id, prev_name);
- undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, p_node_id);
- undo_redo->add_undo_method(graph_plugin.ptr(), "update_node", type, p_node_id);
undo_redo->commit_action();
}
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 8d7916685a..13ece9011b 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -2735,7 +2735,10 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
if (profile_allow_editing) {
+ bool add_separator = false;
+
if (full_selection.size() == 1) {
+ add_separator = true;
menu->add_icon_shortcut(get_theme_icon(SNAME("Rename"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/rename"), TOOL_RENAME);
}
@@ -2748,11 +2751,14 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
if (can_replace) {
+ add_separator = true;
menu->add_icon_shortcut(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/change_node_type"), TOOL_REPLACE);
}
if (scene_tree->get_selected() != edited_scene) {
- menu->add_separator();
+ if (add_separator) {
+ menu->add_separator();
+ }
menu->add_icon_shortcut(get_theme_icon(SNAME("MoveUp"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/move_up"), TOOL_MOVE_UP);
menu->add_icon_shortcut(get_theme_icon(SNAME("MoveDown"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/move_down"), TOOL_MOVE_DOWN);
menu->add_icon_shortcut(get_theme_icon(SNAME("Duplicate"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/duplicate"), TOOL_DUPLICATE);
diff --git a/main/main.cpp b/main/main.cpp
index f0e74c3bb7..6134ad5146 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2399,10 +2399,10 @@ bool Main::start() {
"display/window/stretch/aspect",
PROPERTY_HINT_ENUM,
"ignore,keep,keep_width,keep_height,expand"));
- GLOBAL_DEF_BASIC("display/window/stretch/shrink", 1.0);
- ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink",
+ GLOBAL_DEF_BASIC("display/window/stretch/scale", 1.0);
+ ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/scale",
PropertyInfo(Variant::FLOAT,
- "display/window/stretch/shrink",
+ "display/window/stretch/scale",
PROPERTY_HINT_RANGE,
"1.0,8.0,0.1"));
sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true));
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index cd2153b132..dd9df3c485 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -500,7 +500,7 @@ bool CPUParticles2D::get_split_scale() {
}
void CPUParticles2D::_validate_property(PropertyInfo &property) const {
- if (property.name == "emission_sphere_radius" && emission_shape != EMISSION_SHAPE_SPHERE) {
+ if (property.name == "emission_sphere_radius" && (emission_shape != EMISSION_SHAPE_SPHERE && emission_shape != EMISSION_SHAPE_SPHERE_SURFACE)) {
property.usage = PROPERTY_USAGE_NONE;
}
@@ -762,6 +762,11 @@ void CPUParticles2D::_particles_process(double p_delta) {
//do none
} break;
case EMISSION_SHAPE_SPHERE: {
+ real_t t = Math_TAU * Math::randf();
+ real_t radius = emission_sphere_radius * Math::randf();
+ p.transform[2] = Vector2(Math::cos(t), Math::sin(t)) * radius;
+ } break;
+ case EMISSION_SHAPE_SPHERE_SURFACE: {
real_t s = Math::randf(), t = Math_TAU * Math::randf();
real_t radius = emission_sphere_radius * Math::sqrt(1.0 - s * s);
p.transform[2] = Vector2(Math::cos(t), Math::sin(t)) * radius;
@@ -1357,7 +1362,7 @@ void CPUParticles2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("convert_from_particles", "particles"), &CPUParticles2D::convert_from_particles);
ADD_GROUP("Emission Shape", "emission_");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_emission_shape", "get_emission_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Sphere Surface,Box,Points,Directed Points", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_emission_shape", "get_emission_shape");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "emission_rect_extents"), "set_emission_rect_extents", "get_emission_rect_extents");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "emission_points"), "set_emission_points", "get_emission_points");
@@ -1447,6 +1452,7 @@ void CPUParticles2D::_bind_methods() {
BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINT);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_SPHERE);
+ BIND_ENUM_CONSTANT(EMISSION_SHAPE_SPHERE_SURFACE);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_RECTANGLE);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINTS);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS);
diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h
index 8c8f161d74..7ae51e3966 100644
--- a/scene/2d/cpu_particles_2d.h
+++ b/scene/2d/cpu_particles_2d.h
@@ -69,6 +69,7 @@ public:
enum EmissionShape {
EMISSION_SHAPE_POINT,
EMISSION_SHAPE_SPHERE,
+ EMISSION_SHAPE_SPHERE_SURFACE,
EMISSION_SHAPE_RECTANGLE,
EMISSION_SHAPE_POINTS,
EMISSION_SHAPE_DIRECTED_POINTS,
diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp
index ab28a83806..8c8596fc2e 100644
--- a/scene/3d/cpu_particles_3d.cpp
+++ b/scene/3d/cpu_particles_3d.cpp
@@ -508,7 +508,7 @@ bool CPUParticles3D::get_split_scale() {
}
void CPUParticles3D::_validate_property(PropertyInfo &property) const {
- if (property.name == "emission_sphere_radius" && emission_shape != EMISSION_SHAPE_SPHERE) {
+ if (property.name == "emission_sphere_radius" && (emission_shape != EMISSION_SHAPE_SPHERE && emission_shape != EMISSION_SHAPE_SPHERE_SURFACE)) {
property.usage = PROPERTY_USAGE_NONE;
}
@@ -804,6 +804,13 @@ void CPUParticles3D::_particles_process(double p_delta) {
case EMISSION_SHAPE_SPHERE: {
real_t s = 2.0 * Math::randf() - 1.0;
real_t t = Math_TAU * Math::randf();
+ real_t x = Math::randf();
+ real_t radius = emission_sphere_radius * Math::sqrt(1.0 - s * s);
+ p.transform.origin = Vector3(0, 0, 0).lerp(Vector3(radius * Math::cos(t), radius * Math::sin(t), emission_sphere_radius * s), x);
+ } break;
+ case EMISSION_SHAPE_SPHERE_SURFACE: {
+ real_t s = 2.0 * Math::randf() - 1.0;
+ real_t t = Math_TAU * Math::randf();
real_t radius = emission_sphere_radius * Math::sqrt(1.0 - s * s);
p.transform.origin = Vector3(radius * Math::cos(t), radius * Math::sin(t), emission_sphere_radius * s);
} break;
@@ -1530,7 +1537,7 @@ void CPUParticles3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("convert_from_particles", "particles"), &CPUParticles3D::convert_from_particles);
ADD_GROUP("Emission Shape", "emission_");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points,Ring", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_emission_shape", "get_emission_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Sphere Surface,Box,Points,Directed Points,Ring", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_emission_shape", "get_emission_shape");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "emission_points"), "set_emission_points", "get_emission_points");
@@ -1627,6 +1634,7 @@ void CPUParticles3D::_bind_methods() {
BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINT);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_SPHERE);
+ BIND_ENUM_CONSTANT(EMISSION_SHAPE_SPHERE_SURFACE);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_BOX);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINTS);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS);
diff --git a/scene/3d/cpu_particles_3d.h b/scene/3d/cpu_particles_3d.h
index 5eeb5e75d3..521b6c615e 100644
--- a/scene/3d/cpu_particles_3d.h
+++ b/scene/3d/cpu_particles_3d.h
@@ -71,6 +71,7 @@ public:
enum EmissionShape {
EMISSION_SHAPE_POINT,
EMISSION_SHAPE_SPHERE,
+ EMISSION_SHAPE_SPHERE_SURFACE,
EMISSION_SHAPE_BOX,
EMISSION_SHAPE_POINTS,
EMISSION_SHAPE_DIRECTED_POINTS,
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 3d0ac291b8..433f21f91f 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -376,7 +376,7 @@ void AnimationNodeOneShot::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadein_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadein_time", "get_fadein_time");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fadeout_time", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_fadeout_time", "get_fadeout_time");
- ADD_GROUP("autorestart_", "Auto Restart");
+ ADD_GROUP("Auto Restart", "autorestart_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autorestart"), "set_autorestart", "has_autorestart");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "autorestart_delay", PROPERTY_HINT_RANGE, "0,60,0.01,or_greater"), "set_autorestart_delay", "get_autorestart_delay");
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index 1ef2b3496f..01a0411545 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -190,6 +190,9 @@ void ParticlesMaterial::_update_shader() {
case EMISSION_SHAPE_SPHERE: {
code += "uniform float emission_sphere_radius;\n";
} break;
+ case EMISSION_SHAPE_SPHERE_SURFACE: {
+ code += "uniform float emission_sphere_radius;\n";
+ } break;
case EMISSION_SHAPE_BOX: {
code += "uniform vec3 emission_box_extents;\n";
} break;
@@ -398,6 +401,13 @@ void ParticlesMaterial::_update_shader() {
case EMISSION_SHAPE_SPHERE: {
code += " float s = rand_from_seed(alt_seed) * 2.0 - 1.0;\n";
code += " float t = rand_from_seed(alt_seed) * 2.0 * pi;\n";
+ code += " float p = rand_from_seed(alt_seed);\n";
+ code += " float radius = emission_sphere_radius * sqrt(1.0 - s * s);\n";
+ code += " TRANSFORM[3].xyz = mix(vec3(0.0, 0.0, 0.0), vec3(radius * cos(t), radius * sin(t), emission_sphere_radius * s), p);\n";
+ } break;
+ case EMISSION_SHAPE_SPHERE_SURFACE: {
+ code += " float s = rand_from_seed(alt_seed) * 2.0 - 1.0;\n";
+ code += " float t = rand_from_seed(alt_seed) * 2.0 * pi;\n";
code += " float radius = emission_sphere_radius * sqrt(1.0 - s * s);\n";
code += " TRANSFORM[3].xyz = vec3(radius * cos(t), radius * sin(t), emission_sphere_radius * s);\n";
} break;
@@ -1165,7 +1175,7 @@ RID ParticlesMaterial::get_shader_rid() const {
}
void ParticlesMaterial::_validate_property(PropertyInfo &property) const {
- if (property.name == "emission_sphere_radius" && emission_shape != EMISSION_SHAPE_SPHERE) {
+ if (property.name == "emission_sphere_radius" && (emission_shape != EMISSION_SHAPE_SPHERE && emission_shape != EMISSION_SHAPE_SPHERE_SURFACE)) {
property.usage = PROPERTY_USAGE_NONE;
}
@@ -1388,7 +1398,7 @@ void ParticlesMaterial::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime_randomness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_lifetime_randomness", "get_lifetime_randomness");
ADD_GROUP("Emission Shape", "emission_");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Box,Points,Directed Points,Ring"), "set_emission_shape", "get_emission_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "emission_shape", PROPERTY_HINT_ENUM, "Point,Sphere,Sphere Surface,Box,Points,Directed Points,Ring"), "set_emission_shape", "get_emission_shape");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "emission_sphere_radius", PROPERTY_HINT_RANGE, "0.01,128,0.01,or_greater"), "set_emission_sphere_radius", "get_emission_sphere_radius");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "emission_box_extents"), "set_emission_box_extents", "get_emission_box_extents");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "emission_point_texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_emission_point_texture", "get_emission_point_texture");
@@ -1496,6 +1506,7 @@ void ParticlesMaterial::_bind_methods() {
BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINT);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_SPHERE);
+ BIND_ENUM_CONSTANT(EMISSION_SHAPE_SPHERE_SURFACE);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_BOX);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINTS);
BIND_ENUM_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS);
diff --git a/scene/resources/particles_material.h b/scene/resources/particles_material.h
index fd00c58468..57da344ce0 100644
--- a/scene/resources/particles_material.h
+++ b/scene/resources/particles_material.h
@@ -73,6 +73,7 @@ public:
enum EmissionShape {
EMISSION_SHAPE_POINT,
EMISSION_SHAPE_SPHERE,
+ EMISSION_SHAPE_SPHERE_SURFACE,
EMISSION_SHAPE_BOX,
EMISSION_SHAPE_POINTS,
EMISSION_SHAPE_DIRECTED_POINTS,