diff options
71 files changed, 431 insertions, 252 deletions
diff --git a/core/class_db.cpp b/core/class_db.cpp index 6565d242a2..052a4586fe 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -936,9 +936,8 @@ void ClassDB::add_property(StringName p_class, const PropertyInfo &p_pinfo, cons } #ifdef DEBUG_METHODS_ENABLED - if (type->property_setget.has(p_pinfo.name)) { - ERR_EXPLAIN("Object already has property: " + p_class); + ERR_EXPLAIN("Object " + p_class + " already has property: " + p_pinfo.name); ERR_FAIL(); } #endif diff --git a/core/math/math_defs.h b/core/math/math_defs.h index a5feee6eb5..db9055cee2 100644 --- a/core/math/math_defs.h +++ b/core/math/math_defs.h @@ -93,9 +93,9 @@ enum Corner { }; /** - * The "Real" type is an abstract type used for real numbers, such as 1.5, + * The "Real" type is an abstract type used for real numbers, such as 1.5, * in contrast to integer numbers. Precision can be controlled with the - * presence or absence of the REAL_T_IS_DOUBLE define. + * presence or absence of the REAL_T_IS_DOUBLE define. */ #ifdef REAL_T_IS_DOUBLE typedef double real_t; diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp index 6f7c8ea08a..3d41c374ea 100644 --- a/core/undo_redo.cpp +++ b/core/undo_redo.cpp @@ -325,7 +325,7 @@ bool UndoRedo::undo() { return true; } -void UndoRedo::clear_history() { +void UndoRedo::clear_history(bool p_increase_version) { ERR_FAIL_COND(action_level > 0); _discard_redo(); @@ -333,7 +333,8 @@ void UndoRedo::clear_history() { while (actions.size()) _pop_history_tail(); - version++; + if (p_increase_version) + version++; } String UndoRedo::get_current_action_name() const { @@ -493,7 +494,7 @@ void UndoRedo::_bind_methods() { ClassDB::bind_method(D_METHOD("add_undo_property", "object", "property", "value"), &UndoRedo::add_undo_property); ClassDB::bind_method(D_METHOD("add_do_reference", "object"), &UndoRedo::add_do_reference); ClassDB::bind_method(D_METHOD("add_undo_reference", "object"), &UndoRedo::add_undo_reference); - ClassDB::bind_method(D_METHOD("clear_history"), &UndoRedo::clear_history); + ClassDB::bind_method(D_METHOD("clear_history", "increase_version"), &UndoRedo::clear_history, DEFVAL(true)); ClassDB::bind_method(D_METHOD("get_current_action_name"), &UndoRedo::get_current_action_name); ClassDB::bind_method(D_METHOD("get_version"), &UndoRedo::get_version); ClassDB::bind_method(D_METHOD("redo"), &UndoRedo::redo); diff --git a/core/undo_redo.h b/core/undo_redo.h index 22dcd60472..f09fca9a78 100644 --- a/core/undo_redo.h +++ b/core/undo_redo.h @@ -112,7 +112,7 @@ public: bool redo(); bool undo(); String get_current_action_name() const; - void clear_history(); + void clear_history(bool p_increase_version = true); uint64_t get_version() const; diff --git a/doc/Doxyfile b/doc/Doxyfile index c1904f17c9..a7aa204741 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = Godot # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -171,7 +171,7 @@ STRIP_FROM_PATH = # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't @@ -238,13 +238,13 @@ TAB_SIZE = 4 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = +ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. -TCL_SUBST = +TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For @@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. -EXTENSION_MAPPING = +EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -632,7 +632,7 @@ GENERATE_DEPRECATEDLIST= YES # sections, marked by \if <section_label> ... \endif and \cond <section_label> # ... \endcond blocks. -ENABLED_SECTIONS = +ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the @@ -674,7 +674,7 @@ SHOW_NAMESPACES = YES # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated @@ -687,7 +687,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = +LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -697,7 +697,7 @@ LAYOUT_FILE = # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. -CITE_BIB_FILES = +CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages @@ -756,7 +756,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -844,7 +844,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -860,7 +860,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -871,13 +871,13 @@ EXCLUDE_PATTERNS = # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = +EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -897,7 +897,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -914,7 +914,7 @@ IMAGE_PATH = # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. -INPUT_FILTER = +INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the @@ -923,7 +923,7 @@ INPUT_FILTER = # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = +FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for @@ -938,7 +938,7 @@ FILTER_SOURCE_FILES = NO # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. -FILTER_SOURCE_PATTERNS = +FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page @@ -1050,7 +1050,7 @@ CLANG_ASSISTED_PARSING = NO # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. -CLANG_OPTIONS = +CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index @@ -1076,7 +1076,7 @@ COLS_IN_ALPHA_INDEX = 5 # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output @@ -1120,7 +1120,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1130,7 +1130,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1142,7 +1142,7 @@ HTML_FOOTER = # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets @@ -1155,7 +1155,7 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1165,7 +1165,7 @@ HTML_EXTRA_STYLESHEET = # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to @@ -1293,7 +1293,7 @@ GENERATE_HTMLHELP = NO # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_FILE = +CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, @@ -1301,7 +1301,7 @@ CHM_FILE = # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -HHC_LOCATION = +HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). @@ -1314,7 +1314,7 @@ GENERATE_CHI = NO # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it @@ -1345,7 +1345,7 @@ GENERATE_QHP = NO # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. -QCH_FILE = +QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace @@ -1370,7 +1370,7 @@ QHP_VIRTUAL_FOLDER = doc # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom @@ -1378,21 +1378,21 @@ QHP_CUST_FILTER_NAME = # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_SECT_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. -QHG_LOCATION = +QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To @@ -1525,7 +1525,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = +MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site @@ -1533,7 +1533,7 @@ MATHJAX_EXTENSIONS = # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_CODEFILE = +MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and @@ -1593,7 +1593,7 @@ EXTERNAL_SEARCH = NO # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the @@ -1609,7 +1609,7 @@ SEARCHDATA_FILE = searchdata.xml # projects and redirect the results back to the right project. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH_ID = +EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are @@ -1619,7 +1619,7 @@ EXTERNAL_SEARCH_ID = # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # This tag requires that the tag SEARCHENGINE is set to YES. -EXTRA_SEARCH_MAPPINGS = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # Configuration options related to the LaTeX output @@ -1680,7 +1680,7 @@ PAPER_TYPE = a4 # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first @@ -1696,7 +1696,7 @@ EXTRA_PACKAGES = # to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_HEADER = +LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last @@ -1707,7 +1707,7 @@ LATEX_HEADER = # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_FOOTER = +LATEX_FOOTER = # The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined # LaTeX style sheets that are included after the standard style sheets created @@ -1718,7 +1718,7 @@ LATEX_FOOTER = # list). # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_STYLESHEET = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output @@ -1726,7 +1726,7 @@ LATEX_EXTRA_STYLESHEET = # markers available. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_FILES = +LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will @@ -1826,14 +1826,14 @@ RTF_HYPERLINKS = NO # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is # similar to doxygen's config file. A template extensions file can be generated # using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = # If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code # with syntax highlighting in the RTF output. @@ -1878,7 +1878,7 @@ MAN_EXTENSION = .3 # MAN_EXTENSION with the initial . removed. # This tag requires that the tag GENERATE_MAN is set to YES. -MAN_SUBDIR = +MAN_SUBDIR = # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # will generate one additional man file for each entity documented in the real @@ -1991,7 +1991,7 @@ PERLMOD_PRETTY = YES # overwrite each other's variables. # This tag requires that the tag GENERATE_PERLMOD is set to YES. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor @@ -2032,7 +2032,7 @@ SEARCH_INCLUDES = YES # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH = +INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -2040,7 +2040,7 @@ INCLUDE_PATH = # used. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. @@ -2050,7 +2050,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2059,7 +2059,7 @@ PREDEFINED = # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have @@ -2088,13 +2088,13 @@ SKIP_FUNCTION_MACROS = YES # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES, all external class will be listed in # the class index. If set to NO, only the inherited external classes will be @@ -2143,14 +2143,14 @@ CLASS_DIAGRAMS = YES # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. # If left empty dia is assumed to be found in the default search path. -DIA_PATH = +DIA_PATH = # If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. @@ -2199,7 +2199,7 @@ DOT_FONTSIZE = 10 # the path where dot can find it using this tag. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTPATH = +DOT_FONTPATH = # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # each documented class showing the direct and indirect inheritance relations. @@ -2337,26 +2337,26 @@ INTERACTIVE_SVG = NO # found. If left blank, it is assumed the dot tool can be found in the path. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_PATH = +DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the \dotfile # command). # This tag requires that the tag HAVE_DOT is set to YES. -DOTFILE_DIRS = +DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the \mscfile # command). -MSCFILE_DIRS = +MSCFILE_DIRS = # The DIAFILE_DIRS tag can be used to specify one or more directories that # contain dia files that are included in the documentation (see the \diafile # command). -DIAFILE_DIRS = +DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the # path where java can find the plantuml.jar file. If left blank, it is assumed @@ -2364,12 +2364,12 @@ DIAFILE_DIRS = # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -PLANTUML_JAR_PATH = +PLANTUML_JAR_PATH = # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. -PLANTUML_INCLUDE_PATH = +PLANTUML_INCLUDE_PATH = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index 413370ed0b..bf72902410 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -45,8 +45,8 @@ </return> <description> Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. - After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. - Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. + After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. + Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD. </description> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index f189e6451d..169fbcd5a8 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -7,7 +7,7 @@ An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. [codeblock] # This creates an animation that makes the node "Enemy" move to the right by - # 100 pixels in 1 second. + # 100 pixels in 1 second. var animation = Animation.new() var track_index = animation.add_track(Animation.TYPE_VALUE) animation.track_set_path(track_index, "Enemy:position.x") diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index 87c622e3bb..008c644466 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="damping" type="float" setter="set_damping" getter="get_damping"> - Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code]. + Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="dry" type="float" setter="set_dry" getter="get_dry"> Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: [code]1[/code]. diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index cc58c56404..a9e2a38dcf 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -41,6 +41,17 @@ Erase a dictionary key/value pair by key. </description> </method> + <method name="get"> + <return type="Variant"> + </return> + <argument index="0" name="key" type="Variant"> + </argument> + <argument index="1" name="default" type="Variant" default="Null"> + </argument> + <description> + Returns the current value for the specified key in the [code]Dictionary[/code]. If the key does not exist, the method returns the value of the optional default argument, or Null if it is omitted. + </description> + </method> <method name="has"> <return type="bool"> </return> @@ -87,17 +98,6 @@ Return the list of values in the [code]Dictionary[/code]. </description> </method> - <method name="get"> - <return type="Variant"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> - <argument index="1" name="default" type="Variant" default="null"> - </argument> - <description> - Returns the current value for the specified key in the [code]Dictionary[/code]. If the key does not exist, the method returns the value of the optional default argument, or Null if it is omitted. - </description> - </method> </methods> <constants> </constants> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 4c2c83e55f..949c93761e 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -5,7 +5,6 @@ </brief_description> <description> Resource for environment nodes (like [WorldEnvironment]) that define multiple environment operations (such as background [Sky] or [Color], ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is: - - DOF Blur - Motion Blur - Bloom @@ -120,6 +119,8 @@ <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled"> Enables the fog depth. </member> + <member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end"> + </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled"> Enables the fog. Needs fog_height_enabled and/or for_depth_enabled to actually display fog. </member> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 1745389833..058bb09090 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -330,7 +330,7 @@ <method name="store_csv_line"> <return type="void"> </return> - <argument index="0" name="values" type="PoolStringArray" default="",""> + <argument index="0" name="values" type="PoolStringArray"> </argument> <argument index="1" name="delim" type="String" default="",""> </argument> diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml index 0863ead4ec..e1046e282a 100644 --- a/doc/classes/Generic6DOFJoint.xml +++ b/doc/classes/Generic6DOFJoint.xml @@ -113,6 +113,30 @@ <member name="angular_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z"> Target speed for the motor at the z-axis. </member> + <member name="angular_spring_x/damping" type="float" setter="set_param_x" getter="get_param_x"> + </member> + <member name="angular_spring_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> + </member> + <member name="angular_spring_x/equilibrium_point" type="float" setter="set_param_x" getter="get_param_x"> + </member> + <member name="angular_spring_x/stiffness" type="float" setter="set_param_x" getter="get_param_x"> + </member> + <member name="angular_spring_y/damping" type="float" setter="set_param_y" getter="get_param_y"> + </member> + <member name="angular_spring_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> + </member> + <member name="angular_spring_y/equilibrium_point" type="float" setter="set_param_y" getter="get_param_y"> + </member> + <member name="angular_spring_y/stiffness" type="float" setter="set_param_y" getter="get_param_y"> + </member> + <member name="angular_spring_z/damping" type="float" setter="set_param_z" getter="get_param_z"> + </member> + <member name="angular_spring_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> + </member> + <member name="angular_spring_z/equilibrium_point" type="float" setter="set_param_z" getter="get_param_z"> + </member> + <member name="angular_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z"> + </member> <member name="linear_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x"> The amount of damping that happens at the x-motion. </member> @@ -194,6 +218,30 @@ <member name="linear_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z"> The speed that the linear motor will attempt to reach on the z-axis. </member> + <member name="linear_spring_x/damping" type="float" setter="set_param_x" getter="get_param_x"> + </member> + <member name="linear_spring_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> + </member> + <member name="linear_spring_x/equilibrium_point" type="float" setter="set_param_x" getter="get_param_x"> + </member> + <member name="linear_spring_x/stiffness" type="float" setter="set_param_x" getter="get_param_x"> + </member> + <member name="linear_spring_y/damping" type="float" setter="set_param_y" getter="get_param_y"> + </member> + <member name="linear_spring_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> + </member> + <member name="linear_spring_y/equilibrium_point" type="float" setter="set_param_y" getter="get_param_y"> + </member> + <member name="linear_spring_y/stiffness" type="float" setter="set_param_y" getter="get_param_y"> + </member> + <member name="linear_spring_z/damping" type="float" setter="set_param_z" getter="get_param_z"> + </member> + <member name="linear_spring_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> + </member> + <member name="linear_spring_z/equilibrium_point" type="float" setter="set_param_z" getter="get_param_z"> + </member> + <member name="linear_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z"> + </member> </members> <constants> <constant name="PARAM_LINEAR_LOWER_LIMIT" value="0" enum="Param"> @@ -217,34 +265,34 @@ <constant name="PARAM_LINEAR_MOTOR_FORCE_LIMIT" value="6" enum="Param"> The maximum force the linear motor will apply while trying to reach the velocity target. </constant> - <constant name="PARAM_ANGULAR_LOWER_LIMIT" value="7" enum="Param"> + <constant name="PARAM_ANGULAR_LOWER_LIMIT" value="10" enum="Param"> The minimum rotation in negative direction to break loose and rotate around the axes. </constant> - <constant name="PARAM_ANGULAR_UPPER_LIMIT" value="8" enum="Param"> + <constant name="PARAM_ANGULAR_UPPER_LIMIT" value="11" enum="Param"> The minimum rotation in positive direction to break loose and rotate around the axes. </constant> - <constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="9" enum="Param"> + <constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="12" enum="Param"> The speed of all rotations across the axes. </constant> - <constant name="PARAM_ANGULAR_DAMPING" value="10" enum="Param"> + <constant name="PARAM_ANGULAR_DAMPING" value="13" enum="Param"> The amount of rotational damping across the axes. The lower, the more dampening occurs. </constant> - <constant name="PARAM_ANGULAR_RESTITUTION" value="11" enum="Param"> + <constant name="PARAM_ANGULAR_RESTITUTION" value="14" enum="Param"> The amount of rotational restitution across the axes. The lower, the more restitution occurs. </constant> - <constant name="PARAM_ANGULAR_FORCE_LIMIT" value="12" enum="Param"> + <constant name="PARAM_ANGULAR_FORCE_LIMIT" value="15" enum="Param"> The maximum amount of force that can occur, when rotating around the axes. </constant> - <constant name="PARAM_ANGULAR_ERP" value="13" enum="Param"> + <constant name="PARAM_ANGULAR_ERP" value="16" enum="Param"> When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. </constant> - <constant name="PARAM_ANGULAR_MOTOR_TARGET_VELOCITY" value="14" enum="Param"> + <constant name="PARAM_ANGULAR_MOTOR_TARGET_VELOCITY" value="17" enum="Param"> Target speed for the motor at the axes. </constant> - <constant name="PARAM_ANGULAR_MOTOR_FORCE_LIMIT" value="15" enum="Param"> + <constant name="PARAM_ANGULAR_MOTOR_FORCE_LIMIT" value="18" enum="Param"> Maximum acceleration for the motor at the axes. </constant> - <constant name="PARAM_MAX" value="16" enum="Param"> + <constant name="PARAM_MAX" value="22" enum="Param"> End flag of PARAM_* constants, used internally. </constant> <constant name="FLAG_ENABLE_LINEAR_LIMIT" value="0" enum="Flag"> @@ -253,12 +301,16 @@ <constant name="FLAG_ENABLE_ANGULAR_LIMIT" value="1" enum="Flag"> If [code]set[/code] there is rotational motion possible. </constant> - <constant name="FLAG_ENABLE_MOTOR" value="2" enum="Flag"> + <constant name="FLAG_ENABLE_LINEAR_SPRING" value="3" enum="Flag"> + </constant> + <constant name="FLAG_ENABLE_ANGULAR_SPRING" value="2" enum="Flag"> + </constant> + <constant name="FLAG_ENABLE_MOTOR" value="4" enum="Flag"> If [code]set[/code] there is a rotational motor across these axes. </constant> - <constant name="FLAG_ENABLE_LINEAR_MOTOR" value="3" enum="Flag"> + <constant name="FLAG_ENABLE_LINEAR_MOTOR" value="5" enum="Flag"> </constant> - <constant name="FLAG_MAX" value="4" enum="Flag"> + <constant name="FLAG_MAX" value="6" enum="Flag"> End flag of FLAG_* constants, used internally. </constant> </constants> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index fcd105d66b..86de830d56 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -348,6 +348,16 @@ If set to true, signal emission is blocked. </description> </method> + <method name="set_deferred"> + <return type="void"> + </return> + <argument index="0" name="property" type="String"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <description> + </description> + </method> <method name="set_indexed"> <return type="void"> </return> diff --git a/doc/classes/OrientedPathFollow.xml b/doc/classes/OrientedPathFollow.xml index 85d60936ad..bc6af4711b 100644 --- a/doc/classes/OrientedPathFollow.xml +++ b/doc/classes/OrientedPathFollow.xml @@ -4,7 +4,7 @@ Oriented point sampler for a [Path]. </brief_description> <description> - This node behaves like [PathFollow], except it uses its parent [Path] up vector information to enforce orientation. + This node behaves like [PathFollow], except it uses its parent [Path] up vector information to enforce orientation. Make sure to check if the curve of this node's parent [Path] has up vectors enabled. See [PathFollow] and [Curve3D] for further information. </description> <tutorials> diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/PHashTranslation.xml index 18c72a0576..e5745375b0 100644 --- a/doc/classes/PHashTranslation.xml +++ b/doc/classes/PHashTranslation.xml @@ -17,6 +17,7 @@ <argument index="0" name="from" type="Translation"> </argument> <description> + Generates and sets an optimized translation from the given [Translation] resource. </description> </method> </methods> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index c836414dd2..7dfc8e66d4 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -1401,31 +1401,31 @@ <constant name="G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT" value="6" enum="G6DOFJointAxisParam"> The maximum force that the linear motor can apply while trying to reach the target velocity. </constant> - <constant name="G6DOF_JOINT_ANGULAR_LOWER_LIMIT" value="7" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_LOWER_LIMIT" value="10" enum="G6DOFJointAxisParam"> The minimum rotation in negative direction to break loose and rotate around the axes. </constant> - <constant name="G6DOF_JOINT_ANGULAR_UPPER_LIMIT" value="8" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_UPPER_LIMIT" value="11" enum="G6DOFJointAxisParam"> The minimum rotation in positive direction to break loose and rotate around the axes. </constant> - <constant name="G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS" value="9" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS" value="12" enum="G6DOFJointAxisParam"> A factor that gets multiplied onto all rotations across the axes. </constant> - <constant name="G6DOF_JOINT_ANGULAR_DAMPING" value="10" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_DAMPING" value="13" enum="G6DOFJointAxisParam"> The amount of rotational damping across the axes. The lower, the more dampening occurs. </constant> - <constant name="G6DOF_JOINT_ANGULAR_RESTITUTION" value="11" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_RESTITUTION" value="14" enum="G6DOFJointAxisParam"> The amount of rotational restitution across the axes. The lower, the more restitution occurs. </constant> - <constant name="G6DOF_JOINT_ANGULAR_FORCE_LIMIT" value="12" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_FORCE_LIMIT" value="15" enum="G6DOFJointAxisParam"> The maximum amount of force that can occur, when rotating around the axes. </constant> - <constant name="G6DOF_JOINT_ANGULAR_ERP" value="13" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_ERP" value="16" enum="G6DOFJointAxisParam"> When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. </constant> - <constant name="G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY" value="14" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY" value="17" enum="G6DOFJointAxisParam"> Target speed for the motor at the axes. </constant> - <constant name="G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT" value="15" enum="G6DOFJointAxisParam"> + <constant name="G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT" value="18" enum="G6DOFJointAxisParam"> Maximum acceleration for the motor at the axes. </constant> <constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT" value="0" enum="G6DOFJointAxisFlag"> @@ -1434,10 +1434,10 @@ <constant name="G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT" value="1" enum="G6DOFJointAxisFlag"> If [code]set[/code] there is rotational motion possible. </constant> - <constant name="G6DOF_JOINT_FLAG_ENABLE_MOTOR" value="2" enum="G6DOFJointAxisFlag"> + <constant name="G6DOF_JOINT_FLAG_ENABLE_MOTOR" value="4" enum="G6DOFJointAxisFlag"> If [code]set[/code] there is a rotational motor across these axes. </constant> - <constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR" value="3" enum="G6DOFJointAxisFlag"> + <constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR" value="5" enum="G6DOFJointAxisFlag"> If [code]set[/code] there is a linear motor on this axis that targets a specific velocity. </constant> <constant name="SHAPE_PLANE" value="0" enum="ShapeType"> diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index 392a550ee4..3503505999 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -52,6 +52,10 @@ <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature"> If [code]true[/code] Depth mapping is enabled. See also [member normal_enabled]. </member> + <member name="depth_flip_binormal" type="bool" setter="set_depth_deep_parallax_flip_binormal" getter="get_depth_deep_parallax_flip_binormal"> + </member> + <member name="depth_flip_tangent" type="bool" setter="set_depth_deep_parallax_flip_tangent" getter="get_depth_deep_parallax_flip_tangent"> + </member> <member name="depth_max_layers" type="int" setter="set_depth_deep_parallax_max_layers" getter="get_depth_deep_parallax_max_layers"> </member> <member name="depth_min_layers" type="int" setter="set_depth_deep_parallax_min_layers" getter="get_depth_deep_parallax_min_layers"> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 641d6214a4..bf544d2b78 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -5,22 +5,21 @@ </brief_description> <description> This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: - - Color - - Border width (individual width for each border) - - Rounded corners (individual radius for each corner) - - Shadow - About corner radius: - Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example: - [codeblock] - height = 30 - corner_radius_top_left = 50 - corner_radius_bottom_left = 100 - [/codeblock] - The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result: - [codeblock] - corner_radius_top_left: 10 - corner_radius_bottom_left: 20 - [/codeblock] + - Color + - Border width (individual width for each border) + - Rounded corners (individual radius for each corner) + - Shadow + Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example: + [codeblock] + height = 30 + corner_radius_top_left = 50 + corner_radius_bottom_left = 100 + [/codeblock] + The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result: + [codeblock] + corner_radius_top_left: 10 + corner_radius_bottom_left: 20 + [/codeblock] </description> <tutorials> </tutorials> @@ -117,7 +116,7 @@ <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail"> This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account. For corner radius smaller than 10: 4-5 should be enough - For corner radius smaller than 30: 8-12 should be enough ... + For corner radius smaller than 30: 8-12 should be enough </member> <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius"> The corner radius of the bottom left corner. When set to 0 the corner is not rounded. diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index c4e9dbfb70..b57f8f3556 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -7,6 +7,8 @@ Translations are resources that can be loaded/unloaded on demand. They map a string to another string. </description> <tutorials> + <link>https://docs.godotengine.org/en/stable/tutorials/i18n/internationalizing_games.html</link> + <link>https://docs.godotengine.org/en/stable/tutorials/i18n/locales.html</link> </tutorials> <demos> </demos> @@ -19,7 +21,7 @@ <argument index="1" name="xlated_message" type="String"> </argument> <description> - Add a message for translation. + Adds a message if nonexistent, followed by its translation. </description> </method> <method name="erase_message"> @@ -28,7 +30,7 @@ <argument index="0" name="src_message" type="String"> </argument> <description> - Erase a message. + Erases a message. </description> </method> <method name="get_message" qualifiers="const"> @@ -37,25 +39,27 @@ <argument index="0" name="src_message" type="String"> </argument> <description> - Return a message for translation. + Returns a message's translation. </description> </method> <method name="get_message_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of existing messages. </description> </method> <method name="get_message_list" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Return all the messages (keys). + Returns all the messages (keys). </description> </method> </methods> <members> <member name="locale" type="String" setter="set_locale" getter="get_locale"> + The locale of the translation. </member> </members> <constants> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 52d2b2cc47..c2c400ccd5 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -1,11 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TranslationServer" inherits="Object" category="Core" version="3.1"> <brief_description> - Server that manages all translations. Translations can be set to it and removed from it. + Server that manages all translations. </brief_description> <description> + Server that manages all translations. Translations can be set to it and removed from it. </description> <tutorials> + <link>https://docs.godotengine.org/en/stable/tutorials/i18n/internationalizing_games.html</link> + <link>https://docs.godotengine.org/en/stable/tutorials/i18n/locales.html</link> </tutorials> <demos> </demos> @@ -16,18 +19,21 @@ <argument index="0" name="translation" type="Translation"> </argument> <description> + Adds a [Translation] resource. </description> </method> <method name="clear"> <return type="void"> </return> <description> + Clears the server from all translations. </description> </method> <method name="get_locale" qualifiers="const"> <return type="String"> </return> <description> + Returns the current locale of the game. </description> </method> <method name="get_locale_name" qualifiers="const"> @@ -36,6 +42,7 @@ <argument index="0" name="locale" type="String"> </argument> <description> + Returns a locale's language and its variant (e.g. "en_US" would return "English (United States)"). </description> </method> <method name="remove_translation"> @@ -44,6 +51,7 @@ <argument index="0" name="translation" type="Translation"> </argument> <description> + Removes the given translation from the server. </description> </method> <method name="set_locale"> @@ -52,6 +60,7 @@ <argument index="0" name="locale" type="String"> </argument> <description> + Sets the locale of the game. </description> </method> <method name="translate" qualifiers="const"> @@ -60,6 +69,7 @@ <argument index="0" name="message" type="String"> </argument> <description> + Returns the current locale's translation for the given message (key). </description> </method> </methods> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 8051062fc4..14be256d85 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -384,6 +384,8 @@ </theme_item> <theme_item name="custom_button_pressed" type="StyleBox"> </theme_item> + <theme_item name="draw_guides" type="int"> + </theme_item> <theme_item name="draw_relationship_lines" type="int"> </theme_item> <theme_item name="drop_position_color" type="Color"> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 0ea5c6e005..93806ac326 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -102,8 +102,11 @@ <method name="clear_history"> <return type="void"> </return> + <argument index="0" name="increase_version" type="bool" default="true"> + </argument> <description> Clear the undo/redo history and associated references. + Passing [code]false[/code] to [code]increase_version[/code] will prevent the version number to be increased from this. </description> </method> <method name="commit_action"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 2cdd8c407f..4706651c6e 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -125,6 +125,12 @@ <description> </description> </method> + <method name="is_input_handled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="is_size_override_enabled" qualifiers="const"> <return type="bool"> </return> @@ -147,6 +153,12 @@ <description> </description> </method> + <method name="set_input_as_handled"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="set_size_override"> <return type="void"> </return> @@ -222,6 +234,8 @@ <member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled"> If [code]true[/code] the GUI controls on the viewport will lay pixel perfectly. Default value: [code]true[/code]. </member> + <member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally"> + </member> <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr"> If [code]true[/code] the viewport rendering will receive benefits from High Dynamic Range algorithm. Default value: [code]true[/code]. </member> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 46a06d63d4..b24eeaa112 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -1113,11 +1113,13 @@ </argument> <argument index="2" name="depth_begin" type="float"> </argument> - <argument index="3" name="depth_curve" type="float"> + <argument index="3" name="depth_end" type="float"> </argument> - <argument index="4" name="transmit" type="bool"> + <argument index="4" name="depth_curve" type="float"> </argument> - <argument index="5" name="transmit_curve" type="float"> + <argument index="5" name="transmit" type="bool"> + </argument> + <argument index="6" name="transmit_curve" type="float"> </argument> <description> </description> diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h index bd3a36feef..7c095e3798 100644 --- a/drivers/dummy/rasterizer_dummy.h +++ b/drivers/dummy/rasterizer_dummy.h @@ -681,6 +681,8 @@ public: int particles_get_draw_passes(RID p_particles) const { return 0; } RID particles_get_draw_pass_mesh(RID p_particles, int p_pass) const { return RID(); } + virtual bool particles_is_inactive(RID p_particles) const { return false; } + /* RENDER TARGET */ RID render_target_create() { return RID(); } diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index d646500a23..3beb8eac33 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -3842,6 +3842,10 @@ RID RasterizerStorageGLES2::particles_get_draw_pass_mesh(RID p_particles, int p_ void RasterizerStorageGLES2::update_particles() { } +bool RasterizerStorageGLES2::particles_is_inactive(RID p_particles) const { + return true; +} + //////// void RasterizerStorageGLES2::instance_add_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance) { diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h index 59f911e880..5bdc65a0b5 100644 --- a/drivers/gles2/rasterizer_storage_gles2.h +++ b/drivers/gles2/rasterizer_storage_gles2.h @@ -1090,6 +1090,8 @@ public: virtual int particles_get_draw_passes(RID p_particles) const; virtual RID particles_get_draw_pass_mesh(RID p_particles, int p_pass) const; + virtual bool particles_is_inactive(RID p_particles) const; + /* INSTANCE */ virtual void instance_add_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance); diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 28c0274afa..d52be09cac 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -86,10 +86,11 @@ static String _mkid(const String &p_id) { static String f2sp0(float p_float) { - if (int(p_float) == p_float) - return itos(p_float) + ".0"; - else - return rtoss(p_float); + String num = rtoss(p_float); + if (num.find(".") == -1 && num.find("e") == -1) { + num += ".0"; + } + return num; } static String get_constant_text(SL::DataType p_type, const Vector<SL::ConstantNode::Value> &p_values) { diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 0951b8f798..b707189d74 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -3599,7 +3599,7 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); } - if (!env || storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT]) { + if (!env || storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_TRANSPARENT] || storage->frame.current_rt->width < 4 || storage->frame.current_rt->height < 4) { //no post process on small render targets //no environment or transparent render, simply return and convert to SRGB glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo); glActiveTexture(GL_TEXTURE0); @@ -4297,8 +4297,10 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const glClearBufferfv(GL_COLOR, 0, clear_color.components); // specular } + VS::EnvironmentBG bg_mode = (!env || (probe && env->bg_mode == VS::ENV_BG_CANVAS)) ? VS::ENV_BG_CLEAR_COLOR : env->bg_mode; //if no environment, or canvas while rendering a probe (invalid use case), use color. + if (env) { - switch (env->bg_mode) { + switch (bg_mode) { case VS::ENV_BG_COLOR_SKY: case VS::ENV_BG_SKY: diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 65543956fa..235c799a55 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -874,8 +874,6 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p int size, ofs; img->get_mipmap_offset_and_size(i, ofs, size); - //print_line("mipmap: "+itos(i)+" size: "+itos(size)+" w: "+itos(mm_w)+", h: "+itos(mm_h)); - if (texture->type == VS::TEXTURE_TYPE_2D || texture->type == VS::TEXTURE_TYPE_CUBEMAP) { if (texture->compressed) { @@ -1062,8 +1060,6 @@ Ref<Image> RasterizerStorageGLES3::texture_get_data(RID p_texture, int p_layer) glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); - //print_line("GET FORMAT: " + Image::get_format_name(texture->format) + " mipmaps: " + itos(texture->mipmaps)); - for (int i = 0; i < texture->mipmaps; i++) { int ofs = 0; @@ -1142,8 +1138,6 @@ Ref<Image> RasterizerStorageGLES3::texture_get_data(RID p_texture, int p_layer) glBindTexture(GL_TEXTURE_2D, temp_color_texture); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture->alloc_width, texture->alloc_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); - print_line(itos(texture->alloc_width) + " xx " + itos(texture->alloc_height) + " -> " + itos(real_format)); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, temp_color_texture, 0); @@ -2892,9 +2886,6 @@ void RasterizerStorageGLES3::_update_material(Material *material) { if (E->get().order < 0) continue; // texture, does not go here - //if (material->shader->mode == VS::SHADER_PARTICLES) { - // print_line("uniform " + String(E->key()) + " order " + itos(E->get().order) + " offset " + itos(material->shader->ubo_offsets[E->get().order])); - //} //regular uniform uint8_t *data = &local_ubo[material->shader->ubo_offsets[E->get().order]]; @@ -3866,8 +3857,6 @@ AABB RasterizerStorageGLES3::mesh_get_aabb(RID p_mesh, RID p_skeleton) const { mtx.basis[2].z = texture[base_ofs + 2]; mtx.origin.z = texture[base_ofs + 3]; - print_line("surface " + itos(i) + " bone " + itos(j) + " aabb: " + skbones[j]); - AABB baabb = mtx.xform(skbones[j]); if (first) { laabb = baabb; @@ -6455,6 +6444,13 @@ void RasterizerStorageGLES3::update_particles() { glDisable(GL_RASTERIZER_DISCARD); } +bool RasterizerStorageGLES3::particles_is_inactive(RID p_particles) const { + + const Particles *particles = particles_owner.getornull(p_particles); + ERR_FAIL_COND_V(!particles, false); + return !particles->emitting && particles->inactive; +} + //////// void RasterizerStorageGLES3::instance_add_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance) { diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h index 8c843e4d96..398ffdeb82 100644 --- a/drivers/gles3/rasterizer_storage_gles3.h +++ b/drivers/gles3/rasterizer_storage_gles3.h @@ -1261,6 +1261,8 @@ public: virtual int particles_get_draw_passes(RID p_particles) const; virtual RID particles_get_draw_pass_mesh(RID p_particles, int p_pass) const; + virtual bool particles_is_inactive(RID p_particles) const; + /* INSTANCE */ virtual void instance_add_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance); diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index fb6e168327..6cc27bd77a 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -173,10 +173,11 @@ static String _mkid(const String &p_id) { static String f2sp0(float p_float) { - if (int(p_float) == p_float) - return itos(p_float) + ".0"; - else - return rtoss(p_float); + String num = rtoss(p_float); + if (num.find(".") == -1 && num.find("e") == -1) { + num += ".0"; + } + return num; } static String get_constant_text(SL::DataType p_type, const Vector<SL::ConstantNode::Value> &p_values) { @@ -229,7 +230,7 @@ static String get_constant_text(SL::DataType p_type, const Vector<SL::ConstantNo text += ")"; return text; } break; - case SL::TYPE_FLOAT: return f2sp0(p_values[0].real) + "f"; + case SL::TYPE_FLOAT: return f2sp0(p_values[0].real); case SL::TYPE_VEC2: case SL::TYPE_VEC3: case SL::TYPE_VEC4: { diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index dbbf5d08b8..d3ae5d6601 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2003,7 +2003,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { if (err != OK) ERR_PRINT("Failed to load scene"); editor_data.move_edited_scene_to_index(cur_idx); - get_undo_redo()->clear_history(); + get_undo_redo()->clear_history(false); scene_tabs->set_current_tab(cur_idx); } break; @@ -2613,7 +2613,7 @@ void EditorNode::_remove_edited_scene() { } _scene_tab_changed(new_index); editor_data.remove_scene(old_index); - editor_data.get_undo_redo().clear_history(); + editor_data.get_undo_redo().clear_history(false); _update_title(); _update_scene_tabs(); } diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 5566a5aea5..a5563c0497 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -4204,10 +4204,10 @@ void SpatialEditor::set_state(const Dictionary &p_state) { gizmo_plugins.write[j]->set_state(state); switch (state) { - case EditorSpatialGizmoPlugin::ON_TOP: + case EditorSpatialGizmoPlugin::VISIBLE: gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_visible")); break; - case EditorSpatialGizmoPlugin::VISIBLE: + case EditorSpatialGizmoPlugin::ON_TOP: gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_xray")); break; case EditorSpatialGizmoPlugin::HIDDEN: @@ -4317,10 +4317,10 @@ void SpatialEditor::_menu_gizmo_toggled(int p_option) { // Change icon const int state = gizmos_menu->get_item_state(idx); switch (state) { - case EditorSpatialGizmoPlugin::ON_TOP: + case EditorSpatialGizmoPlugin::VISIBLE: gizmos_menu->set_item_icon(idx, view_menu->get_popup()->get_icon("visibility_visible")); break; - case EditorSpatialGizmoPlugin::VISIBLE: + case EditorSpatialGizmoPlugin::ON_TOP: gizmos_menu->set_item_icon(idx, view_menu->get_popup()->get_icon("visibility_xray")); break; case EditorSpatialGizmoPlugin::HIDDEN: @@ -4839,7 +4839,7 @@ void SpatialEditor::_init_gizmos_menu() { for (int i = 0; i < gizmo_plugins.size(); ++i) { if (!gizmo_plugins[i]->can_be_hidden()) continue; String plugin_name = gizmo_plugins[i]->get_name(); - gizmos_menu->add_multistate_item(TTR(plugin_name), 3, EditorSpatialGizmoPlugin::ON_TOP, i); + gizmos_menu->add_multistate_item(TTR(plugin_name), 3, EditorSpatialGizmoPlugin::VISIBLE, i); gizmos_menu->set_item_icon(gizmos_menu->get_item_index(i), gizmos_menu->get_icon("visibility_visible")); } } @@ -5919,7 +5919,7 @@ void EditorSpatialGizmoPlugin::unregister_gizmo(EditorSpatialGizmo *p_gizmo) { } EditorSpatialGizmoPlugin::EditorSpatialGizmoPlugin() { - current_state = ON_TOP; + current_state = VISIBLE; } EditorSpatialGizmoPlugin::~EditorSpatialGizmoPlugin() { diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 3cce76cc17..c515a4aaf9 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -754,9 +754,9 @@ class EditorSpatialGizmoPlugin : public Resource { GDCLASS(EditorSpatialGizmoPlugin, Resource); public: - static const int ON_TOP = 0; - static const int VISIBLE = 1; - static const int HIDDEN = 2; + static const int VISIBLE = 0; + static const int HIDDEN = 1; + static const int ON_TOP = 2; private: int current_state; diff --git a/gles_builders.py b/gles_builders.py index f9fd6d3fa2..e56ccc4431 100644 --- a/gles_builders.py +++ b/gles_builders.py @@ -231,9 +231,9 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs, gles2 fd.write("\t_FORCE_INLINE_ void set_conditional(Conditionals p_conditional,bool p_enable) { _set_conditional(p_conditional,p_enable); }\n\n") fd.write("\t#ifdef DEBUG_ENABLED\n ") fd.write("\t#define _FU if (get_uniform(p_uniform)<0) return; if (!is_version_valid()) return; ERR_FAIL_COND( get_active()!=this ); \n\n ") - fd.write("\t#else\n ") + fd.write("\t#else\n ") fd.write("\t#define _FU if (get_uniform(p_uniform)<0) return; \n\n ") - fd.write("\t#endif\n") + fd.write("\t#endif\n") fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, float p_value) { _FU glUniform1f(get_uniform(p_uniform),p_value); }\n\n") fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, double p_value) { _FU glUniform1f(get_uniform(p_uniform),p_value); }\n\n") fd.write("\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, uint8_t p_value) { _FU glUniform1i(get_uniform(p_uniform),p_value); }\n\n") diff --git a/methods.py b/methods.py index 111a2347be..a6310fe850 100644 --- a/methods.py +++ b/methods.py @@ -591,7 +591,7 @@ def generate_vs_project(env, num_jobs): release_debug_targets = ['bin\\godot.windows.opt.tools.32.exe'] + ['bin\\godot.windows.opt.tools.64.exe'] targets = debug_targets + release_targets + release_debug_targets if not env.get('MSVS'): - env['MSVS']['PROJECTSUFFIX'] = '.vcxproj' + env['MSVS']['PROJECTSUFFIX'] = '.vcxproj' env['MSVS']['SOLUTIONSUFFIX'] = '.sln' env.MSVSProject( target=['#godot' + env['MSVSPROJECTSUFFIX']], diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 23d879e1cd..e1607c4326 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -1666,6 +1666,24 @@ CSGBrush *CSGPolygon::_build_brush() { Path *path = NULL; Ref<Curve3D> curve; + // get bounds for our polygon + Vector2 final_polygon_min; + Vector2 final_polygon_max; + for (int i = 0; i < final_polygon.size(); i++) { + Vector2 p = final_polygon[i]; + if (i == 0) { + final_polygon_min = p; + final_polygon_max = final_polygon_min; + } else { + if (p.x < final_polygon_min.x) final_polygon_min.x = p.x; + if (p.y < final_polygon_min.y) final_polygon_min.y = p.y; + + if (p.x > final_polygon_max.x) final_polygon_max.x = p.x; + if (p.y > final_polygon_max.y) final_polygon_max.y = p.y; + } + } + Vector2 final_polygon_size = final_polygon_max - final_polygon_min; + if (mode == MODE_PATH) { if (!has_node(path_node)) return NULL; @@ -1757,6 +1775,10 @@ CSGBrush *CSGPolygon::_build_brush() { v.z -= depth; } facesw[face * 3 + k] = v; + uvsw[face * 3 + k] = (p - final_polygon_min) / final_polygon_size; + if (i == 0) { + uvsw[face * 3 + k].x = 1.0 - uvsw[face * 3 + k].x; /* flip x */ + } } smoothw[face] = false; @@ -1888,6 +1910,7 @@ CSGBrush *CSGPolygon::_build_brush() { Vector2 p = final_polygon[triangles[j + src[k]]]; Vector3 v = Vector3(p.x, p.y, 0); facesw[face * 3 + k] = v; + uvsw[face * 3 + k] = (p - final_polygon_min) / final_polygon_size; } smoothw[face] = false; @@ -1905,6 +1928,8 @@ CSGBrush *CSGPolygon::_build_brush() { Vector2 p = final_polygon[triangles[j + src[k]]]; Vector3 v = Vector3(normali_n.x * p.x, p.y, normali_n.z * p.x); facesw[face * 3 + k] = v; + uvsw[face * 3 + k] = (p - final_polygon_min) / final_polygon_size; + uvsw[face * 3 + k].x = 1.0 - uvsw[face * 3 + k].x; /* flip x */ } smoothw[face] = false; @@ -1990,10 +2015,10 @@ CSGBrush *CSGPolygon::_build_brush() { }; Vector2 u[4] = { - Vector2(u1, 0), Vector2(u1, 1), - Vector2(u2, 1), - Vector2(u2, 0) + Vector2(u1, 0), + Vector2(u2, 0), + Vector2(u2, 1) }; // face 1 @@ -2036,6 +2061,7 @@ CSGBrush *CSGPolygon::_build_brush() { Vector2 p = final_polygon[triangles[j + src[k]]]; Vector3 v = Vector3(p.x, p.y, 0); facesw[face * 3 + k] = xf.xform(v); + uvsw[face * 3 + k] = (p - final_polygon_min) / final_polygon_size; } smoothw[face] = false; @@ -2053,6 +2079,8 @@ CSGBrush *CSGPolygon::_build_brush() { Vector2 p = final_polygon[triangles[j + src[k]]]; Vector3 v = Vector3(p.x, p.y, 0); facesw[face * 3 + k] = xf.xform(v); + uvsw[face * 3 + k] = (p - final_polygon_min) / final_polygon_size; + uvsw[face * 3 + k].x = 1.0 - uvsw[face * 3 + k].x; /* flip x */ } smoothw[face] = false; @@ -2077,6 +2105,9 @@ CSGBrush *CSGPolygon::_build_brush() { } else { aabb.expand_to(facesw[i]); } + + // invert UVs on the Y-axis OpenGL = upside down + uvsw[i].y = 1.0 - uvsw[i].y; } } diff --git a/modules/gdnative/gdnative_builders.py b/modules/gdnative/gdnative_builders.py index f9d1ed9dc5..ff18a3ae69 100644 --- a/modules/gdnative/gdnative_builders.py +++ b/modules/gdnative/gdnative_builders.py @@ -87,20 +87,20 @@ def _build_gdnative_api_struct_header(api): ret_val = [] if core['next']: ret_val += generate_core_extension_struct(core['next']) - + ret_val += [ 'typedef struct godot_gdnative_core_' + ('{0}_{1}'.format(core['version']['major'], core['version']['minor'])) + '_api_struct {', '\tunsigned int type;', '\tgodot_gdnative_api_version version;', '\tconst godot_gdnative_api_struct *next;', ] - + for funcdef in core['api']: args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']]) ret_val.append('\t%s(*%s)(%s);' % (_spaced(funcdef['return_type']), funcdef['name'], args)) - + ret_val += ['} godot_gdnative_core_' + '{0}_{1}'.format(core['version']['major'], core['version']['minor']) + '_api_struct;', ''] - + return ret_val @@ -171,26 +171,26 @@ def _build_gdnative_api_struct_source(api): ret_val += ['};\n'] return ret_val - - + + def get_core_struct_definition(core): ret_val = [] - + if core['next']: ret_val += get_core_struct_definition(core['next']) - + ret_val += [ 'extern const godot_gdnative_core_' + ('{0}_{1}_api_struct api_{0}_{1}'.format(core['version']['major'], core['version']['minor'])) + ' = {', '\tGDNATIVE_' + core['type'] + ',', '\t{' + str(core['version']['major']) + ', ' + str(core['version']['minor']) + '},', '\t' + ('NULL' if not core['next'] else ('(const godot_gdnative_api_struct *)& api_{0}_{1}'.format(core['version']['major'], core['version']['minor']))) + ',' ] - + for funcdef in core['api']: ret_val.append('\t%s,' % funcdef['name']) - + ret_val += ['};\n'] - + return ret_val for ext in api['extensions']: @@ -204,7 +204,7 @@ def _build_gdnative_api_struct_source(api): out += ['\t(godot_gdnative_api_struct *)&api_extension_' + name + '_struct,'] out += ['};\n'] - + if api['core']['next']: out += get_core_struct_definition(api['core']['next']) diff --git a/modules/mono/glue/Managed/Files/AABB.cs b/modules/mono/glue/Managed/Files/AABB.cs index 66490b5e25..33b2b46712 100644 --- a/modules/mono/glue/Managed/Files/AABB.cs +++ b/modules/mono/glue/Managed/Files/AABB.cs @@ -407,8 +407,8 @@ namespace Godot return new AABB(min, max - min); } - - // Constructors + + // Constructors public AABB(Vector3 position, Vector3 size) { _position = position; diff --git a/modules/mono/glue/Managed/Files/Basis.cs b/modules/mono/glue/Managed/Files/Basis.cs index a5618cb28d..54d2813abf 100644 --- a/modules/mono/glue/Managed/Files/Basis.cs +++ b/modules/mono/glue/Managed/Files/Basis.cs @@ -410,10 +410,12 @@ namespace Godot ); } - public Quat Quat() { + public Quat Quat() + { real_t trace = _x[0] + _y[1] + _z[2]; - if (trace > 0.0f) { + if (trace > 0.0f) + { real_t s = Mathf.Sqrt(trace + 1.0f) * 2f; real_t inv_s = 1f / s; return new Quat( @@ -424,7 +426,8 @@ namespace Godot ); } - if (_x[0] > _y[1] && _x[0] > _z[2]) { + if (_x[0] > _y[1] && _x[0] > _z[2]) + { real_t s = Mathf.Sqrt(_x[0] - _y[1] - _z[2] + 1.0f) * 2f; real_t inv_s = 1f / s; return new Quat( @@ -435,7 +438,8 @@ namespace Godot ); } - if (_y[1] > _z[2]) { + if (_y[1] > _z[2]) + { real_t s = Mathf.Sqrt(-_x[0] + _y[1] - _z[2] + 1.0f) * 2f; real_t inv_s = 1f / s; return new Quat( @@ -444,7 +448,9 @@ namespace Godot (_y[2] + _z[1]) * inv_s, (_x[2] - _z[0]) * inv_s ); - } else { + } + else + { real_t s = Mathf.Sqrt(-_x[0] - _y[1] + _z[2] + 1.0f) * 2f; real_t inv_s = 1f / s; return new Quat( @@ -502,8 +508,8 @@ namespace Godot { var axis_sq = new Vector3(axis.x * axis.x, axis.y * axis.y, axis.z * axis.z); - real_t cosine = Mathf.Cos( phi); - real_t sine = Mathf.Sin( phi); + real_t cosine = Mathf.Cos(phi); + real_t sine = Mathf.Sin(phi); _x = new Vector3 ( @@ -529,9 +535,9 @@ namespace Godot public Basis(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis) { - _x = xAxis; - _y = yAxis; - _z = zAxis; + x = xAxis; + y = yAxis; + z = zAxis; } public Basis(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz) diff --git a/modules/mono/glue/Managed/Files/Color.cs b/modules/mono/glue/Managed/Files/Color.cs index 88cb8524b8..fc5bb010a9 100644 --- a/modules/mono/glue/Managed/Files/Color.cs +++ b/modules/mono/glue/Managed/Files/Color.cs @@ -379,8 +379,8 @@ namespace Godot return txt; } - - // Constructors + + // Constructors public Color(float r, float g, float b, float a = 1.0f) { this.r = r; diff --git a/modules/mono/glue/Managed/Files/Mathf.cs b/modules/mono/glue/Managed/Files/Mathf.cs index a89dfe5f27..dcab3c1ffc 100644 --- a/modules/mono/glue/Managed/Files/Mathf.cs +++ b/modules/mono/glue/Managed/Files/Mathf.cs @@ -206,7 +206,7 @@ namespace Godot public static real_t PosMod(real_t a, real_t b) { real_t c = a % b; - if ((c < 0 && b > 0) || (c > 0 && b < 0)) + if ((c < 0 && b > 0) || (c > 0 && b < 0)) { c += b; } @@ -219,7 +219,7 @@ namespace Godot public static int PosMod(int a, int b) { int c = a % b; - if ((c < 0 && b > 0) || (c > 0 && b < 0)) + if ((c < 0 && b > 0) || (c > 0 && b < 0)) { c += b; } diff --git a/modules/mono/glue/Managed/Files/MathfEx.cs b/modules/mono/glue/Managed/Files/MathfEx.cs index 739b7fb568..2ef02cc288 100644 --- a/modules/mono/glue/Managed/Files/MathfEx.cs +++ b/modules/mono/glue/Managed/Files/MathfEx.cs @@ -29,7 +29,7 @@ namespace Godot public static int FloorToInt(real_t s) { return (int)Math.Floor(s); - } + } public static int RoundToInt(real_t s) { diff --git a/modules/mono/glue/Managed/Files/Plane.cs b/modules/mono/glue/Managed/Files/Plane.cs index 9611dce11e..f11cd490a9 100644 --- a/modules/mono/glue/Managed/Files/Plane.cs +++ b/modules/mono/glue/Managed/Files/Plane.cs @@ -144,7 +144,7 @@ namespace Godot { return point - _normal * DistanceTo(point); } - + // Constants private static readonly Plane _planeYZ = new Plane(1, 0, 0, 0); private static readonly Plane _planeXZ = new Plane(0, 1, 0, 0); @@ -153,8 +153,8 @@ namespace Godot public static Plane PlaneYZ { get { return _planeYZ; } } public static Plane PlaneXZ { get { return _planeXZ; } } public static Plane PlaneXY { get { return _planeXY; } } - - // Constructors + + // Constructors public Plane(real_t a, real_t b, real_t c, real_t d) { _normal = new Vector3(a, b, c); diff --git a/modules/mono/glue/Managed/Files/Quat.cs b/modules/mono/glue/Managed/Files/Quat.cs index eaa027eb69..fd1ac01083 100644 --- a/modules/mono/glue/Managed/Files/Quat.cs +++ b/modules/mono/glue/Managed/Files/Quat.cs @@ -202,7 +202,7 @@ namespace Godot // Static Readonly Properties public static Quat Identity { get; } = new Quat(0f, 0f, 0f, 1f); - // Constructors + // Constructors public Quat(real_t x, real_t y, real_t z, real_t w) { this.x = x; diff --git a/modules/mono/glue/Managed/Files/Rect2.cs b/modules/mono/glue/Managed/Files/Rect2.cs index cb25c267bc..888f300347 100644 --- a/modules/mono/glue/Managed/Files/Rect2.cs +++ b/modules/mono/glue/Managed/Files/Rect2.cs @@ -182,8 +182,8 @@ namespace Godot return newRect; } - - // Constructors + + // Constructors public Rect2(Vector2 position, Vector2 size) { _position = position; diff --git a/modules/mono/glue/Managed/Files/StringExtensions.cs b/modules/mono/glue/Managed/Files/StringExtensions.cs index 21c9be98c1..c194facd0b 100644 --- a/modules/mono/glue/Managed/Files/StringExtensions.cs +++ b/modules/mono/glue/Managed/Files/StringExtensions.cs @@ -185,7 +185,7 @@ namespace Godot int instanceIndex = 0; int toIndex = 0; - + if (caseSensitive) // Outside while loop to avoid checking multiple times, despite some code duplication. { while (true) @@ -480,9 +480,9 @@ namespace Godot return false; // Don't start with number plz } - bool validChar = instance[i] >= '0' && - instance[i] <= '9' || instance[i] >= 'a' && - instance[i] <= 'z' || instance[i] >= 'A' && + bool validChar = instance[i] >= '0' && + instance[i] <= '9' || instance[i] >= 'a' && + instance[i] <= 'z' || instance[i] >= 'A' && instance[i] <= 'Z' || instance[i] == '_'; if (!validChar) diff --git a/modules/mono/glue/Managed/Files/Transform.cs b/modules/mono/glue/Managed/Files/Transform.cs index 068007d7f0..687ed8f011 100644 --- a/modules/mono/glue/Managed/Files/Transform.cs +++ b/modules/mono/glue/Managed/Files/Transform.cs @@ -133,7 +133,7 @@ namespace Godot public static Transform FlipY { get { return _flipY; } } public static Transform FlipZ { get { return _flipZ; } } - // Constructors + // Constructors public Transform(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis, Vector3 origin) { basis = Basis.CreateFromAxes(xAxis, yAxis, zAxis); diff --git a/modules/mono/glue/Managed/Files/Transform2D.cs b/modules/mono/glue/Managed/Files/Transform2D.cs index 8d30833066..c9e5b560b2 100644 --- a/modules/mono/glue/Managed/Files/Transform2D.cs +++ b/modules/mono/glue/Managed/Files/Transform2D.cs @@ -261,15 +261,15 @@ namespace Godot public static Transform2D Identity { get { return _identity; } } public static Transform2D FlipX { get { return _flipX; } } public static Transform2D FlipY { get { return _flipY; } } - - // Constructors + + // Constructors public Transform2D(Vector2 xAxis, Vector2 yAxis, Vector2 origin) { x = xAxis; y = yAxis; o = origin; } - + public Transform2D(real_t xx, real_t xy, real_t yx, real_t yy, real_t ox, real_t oy) { x = new Vector2(xx, xy); diff --git a/modules/mono/glue/Managed/Files/Vector2.cs b/modules/mono/glue/Managed/Files/Vector2.cs index 080b8802ba..ce41886bfc 100644 --- a/modules/mono/glue/Managed/Files/Vector2.cs +++ b/modules/mono/glue/Managed/Files/Vector2.cs @@ -215,7 +215,7 @@ namespace Godot x = v.x; y = v.y; } - + public Vector2 Slerp(Vector2 b, real_t t) { real_t theta = AngleTo(b); @@ -242,7 +242,7 @@ namespace Godot private static readonly Vector2 _one = new Vector2(1, 1); private static readonly Vector2 _negOne = new Vector2(-1, -1); private static readonly Vector2 _inf = new Vector2(Mathf.Inf, Mathf.Inf); - + private static readonly Vector2 _up = new Vector2(0, -1); private static readonly Vector2 _down = new Vector2(0, 1); private static readonly Vector2 _right = new Vector2(1, 0); diff --git a/modules/mono/glue/Managed/Files/Vector3.cs b/modules/mono/glue/Managed/Files/Vector3.cs index 6fffe5e4d6..8e62ec778d 100644 --- a/modules/mono/glue/Managed/Files/Vector3.cs +++ b/modules/mono/glue/Managed/Files/Vector3.cs @@ -276,13 +276,13 @@ namespace Godot 0f, 0f, z ); } - + // Constants private static readonly Vector3 _zero = new Vector3(0, 0, 0); private static readonly Vector3 _one = new Vector3(1, 1, 1); private static readonly Vector3 _negOne = new Vector3(-1, -1, -1); private static readonly Vector3 _inf = new Vector3(Mathf.Inf, Mathf.Inf, Mathf.Inf); - + private static readonly Vector3 _up = new Vector3(0, 1, 0); private static readonly Vector3 _down = new Vector3(0, -1, 0); private static readonly Vector3 _right = new Vector3(1, 0, 0); @@ -294,7 +294,7 @@ namespace Godot public static Vector3 One { get { return _one; } } public static Vector3 NegOne { get { return _negOne; } } public static Vector3 Inf { get { return _inf; } } - + public static Vector3 Up { get { return _up; } } public static Vector3 Down { get { return _down; } } public static Vector3 Right { get { return _right; } } diff --git a/modules/mono/glue/Managed/Properties/AssemblyInfo.cs b/modules/mono/glue/Managed/Properties/AssemblyInfo.cs index 7ed68acad7..77b3774e81 100644 --- a/modules/mono/glue/Managed/Properties/AssemblyInfo.cs +++ b/modules/mono/glue/Managed/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.CompilerServices; -// Information about this assembly is defined by the following attributes. +// Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("Managed")] @@ -19,7 +19,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyVersion("1.0.*")] -// The following attributes are used to specify the signing key for the assembly, +// The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml index b8e77a1b0f..ff3ed66e81 100644 --- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml +++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml @@ -125,12 +125,10 @@ </argument> <description> Execute the custom node's logic, returning the index of the output sequence port to use or a [String] when there is an error. - The [code]inputs[/code] array contains the values of the input ports. [code]outputs[/code] is an array whose indices should be set to the respective outputs. The [code]start_mode[/code] is usually [code]START_MODE_BEGIN_SEQUENCE[/code], unless you have used the STEP_* constants. [code]working_mem[/code] is an array which can be used to persist information between runs of the custom node. - When returning, you can mask the returned value with one of the STEP_* constants. </description> </method> diff --git a/platform/android/detect.py b/platform/android/detect.py index e4cab2fb23..7a728e4ef1 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -223,7 +223,7 @@ def configure(env): else: print("Using NDK deprecated headers") env.Append(CPPFLAGS=["-isystem", lib_sysroot + "/usr/include"]) - + env.Append(CPPFLAGS='-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing'.split()) env.Append(CPPFLAGS='-DNO_STATVFS -DGLES_ENABLED'.split()) @@ -267,12 +267,12 @@ def configure(env): env.Append(LINKFLAGS=['-shared', '--sysroot=' + lib_sysroot, '-Wl,--warn-shared-textrel']) if mt_link: env.Append(LINKFLAGS=['-Wl,--threads']) - + if env["android_arch"] == "armv7": env.Append(LINKFLAGS='-Wl,--fix-cortex-a8'.split()) env.Append(LINKFLAGS='-Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'.split()) env.Append(LINKFLAGS='-Wl,-soname,libgodot_android.so -Wl,--gc-sections'.split()) - + env.Append(LINKFLAGS=target_opts) env.Append(LINKFLAGS=common_opts) diff --git a/platform/android/java/res/layout/status_bar_ongoing_event_progress_bar.xml b/platform/android/java/res/layout/status_bar_ongoing_event_progress_bar.xml index 23bac02294..104993da7e 100644 --- a/platform/android/java/res/layout/status_bar_ongoing_event_progress_bar.xml +++ b/platform/android/java/res/layout/status_bar_ongoing_event_progress_bar.xml @@ -32,9 +32,9 @@ android:id="@+id/appIcon" android:layout_width="fill_parent" android:layout_height="25dp" - android:scaleType="centerInside" + android:scaleType="centerInside" android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" + android:layout_alignParentTop="true" android:src="@android:drawable/stat_sys_download" /> <TextView diff --git a/platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java b/platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java index 7216d8b5a4..03a7a71bb1 100644 --- a/platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java +++ b/platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java @@ -44,7 +44,7 @@ import javax.net.ssl.TrustManagerFactory; import org.apache.http.conn.ssl.SSLSocketFactory; /** - * + * * @author Luis Linietsky <luis.linietsky@gmail.com> */ public class CustomSSLSocketFactory extends SSLSocketFactory { diff --git a/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java b/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java index b84f5cce2e..cfe9c4fef0 100644 --- a/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java +++ b/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java @@ -69,7 +69,7 @@ import android.content.SharedPreferences; import android.util.Log; /** - * + * * @author Luis Linietsky <luis.linietsky@gmail.com> */ public class HttpRequester { diff --git a/platform/android/java/src/org/godotengine/godot/utils/RequestParams.java b/platform/android/java/src/org/godotengine/godot/utils/RequestParams.java index 2368766afa..a1d5b26b3c 100644 --- a/platform/android/java/src/org/godotengine/godot/utils/RequestParams.java +++ b/platform/android/java/src/org/godotengine/godot/utils/RequestParams.java @@ -39,7 +39,7 @@ import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; /** - * + * * @author Luis Linietsky <luis.linietsky@gmail.com> */ public class RequestParams { diff --git a/platform/android/power_android.cpp b/platform/android/power_android.cpp index 51283183df..0a6bf9dfcb 100644 --- a/platform/android/power_android.cpp +++ b/platform/android/power_android.cpp @@ -98,7 +98,7 @@ ANativeWindow *Android_JNI_GetNativeWindow(void) { return anw; } -/* +/* * CODE CHUNK IMPORTED FROM SDL 2.0 * returns 0 on success or -1 on error (others undefined then) * returns truthy or falsy value in plugged, charged and battery diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 5d5af17086..dd0042668f 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -262,7 +262,7 @@ def configure_mingw(env): env.Append(CCFLAGS=['-O2']) else: #optimize for size env.Prepend(CCFLAGS=['-Os']) - + env.Append(LINKFLAGS=['-Wl,--subsystem,windows']) @@ -281,7 +281,7 @@ def configure_mingw(env): env.Append(CCFLAGS=['-O2']) else: #optimize for size env.Prepend(CCFLAGS=['-Os']) - + elif (env["target"] == "debug"): env.Append(CCFLAGS=['-g3', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED']) diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 2ab7b835b6..04854e93b6 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -369,7 +369,7 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a } // disable resizable window - if (!current_videomode.resizable) { + if (!current_videomode.resizable && !current_videomode.fullscreen) { XSizeHints *xsh; xsh = XAllocSizeHints(); xsh->flags = PMinSize | PMaxSize; diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index 7d7c47619a..d656ba0f64 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -190,7 +190,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) { if (enabler[ENABLER_FREEZE_BODIES]) { RigidBody2D *rb2d = Object::cast_to<RigidBody2D>(p_node); - if (rb2d && ((rb2d->get_mode() == RigidBody2D::MODE_CHARACTER || (rb2d->get_mode() == RigidBody2D::MODE_RIGID && !rb2d->is_able_to_sleep())))) { + if (rb2d && ((rb2d->get_mode() == RigidBody2D::MODE_CHARACTER || rb2d->get_mode() == RigidBody2D::MODE_RIGID))) { add = true; meta = rb2d->get_mode(); diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp index 1adf1c5d79..02c6b1d969 100644 --- a/scene/3d/physics_joint.cpp +++ b/scene/3d/physics_joint.cpp @@ -776,7 +776,6 @@ void Generic6DOFJoint::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_TARGET_VELOCITY); ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_LINEAR_MOTOR_FORCE_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_SPRING); ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS); ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::REAL, "linear_spring_z/equilibrium_point"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT); diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp index c69387d082..9a0832b27a 100644 --- a/scene/3d/visibility_notifier.cpp +++ b/scene/3d/visibility_notifier.cpp @@ -153,7 +153,7 @@ void VisibilityEnabler::_find_nodes(Node *p_node) { if (enabler[ENABLER_FREEZE_BODIES]) { RigidBody *rb = Object::cast_to<RigidBody>(p_node); - if (rb && ((rb->get_mode() == RigidBody::MODE_CHARACTER || (rb->get_mode() == RigidBody::MODE_RIGID && !rb->is_able_to_sleep())))) { + if (rb && ((rb->get_mode() == RigidBody::MODE_CHARACTER || rb->get_mode() == RigidBody::MODE_RIGID))) { add = true; meta = rb->get_mode(); diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index a08639089e..5b413737a9 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -700,7 +700,7 @@ String AnimationNodeTransition::get_input_caption(int p_input) const { if (tree.is_valid() && current >= 0) { prev = current; - prev_xfading = xfade; + prev_xfading = xfade; time = 0; current = p_current; switched = true; diff --git a/scene/animation/skeleton_ik.cpp b/scene/animation/skeleton_ik.cpp index 83f45afac8..3119e29586 100644 --- a/scene/animation/skeleton_ik.cpp +++ b/scene/animation/skeleton_ik.cpp @@ -280,7 +280,7 @@ void FabrikInverseKinematic::make_goal(Task *p_task, const Transform &p_inverse_ } } -void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool p_use_magnet, const Vector3 &p_magnet_position) { +void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool override_tip_basis, bool p_use_magnet, const Vector3 &p_magnet_position) { if (blending_delta <= 0.01f) { return; // Skip solving @@ -314,7 +314,10 @@ void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool p_u } } else { // Set target orientation to tip - new_bone_pose.basis = p_task->chain.tips[0].end_effector->goal_transform.basis; + if (override_tip_basis) + new_bone_pose.basis = p_task->chain.tips[0].end_effector->goal_transform.basis; + else + new_bone_pose.basis = new_bone_pose.basis * p_task->chain.tips[0].end_effector->goal_transform.basis; } p_task->skeleton->set_bone_global_pose(ci->bone, new_bone_pose); @@ -366,6 +369,9 @@ void SkeletonIK::_bind_methods() { ClassDB::bind_method(D_METHOD("set_target_node", "node"), &SkeletonIK::set_target_node); ClassDB::bind_method(D_METHOD("get_target_node"), &SkeletonIK::get_target_node); + ClassDB::bind_method(D_METHOD("set_override_tip_basis", "override"), &SkeletonIK::set_override_tip_basis); + ClassDB::bind_method(D_METHOD("is_override_tip_basis"), &SkeletonIK::is_override_tip_basis); + ClassDB::bind_method(D_METHOD("set_use_magnet", "use"), &SkeletonIK::set_use_magnet); ClassDB::bind_method(D_METHOD("is_using_magnet"), &SkeletonIK::is_using_magnet); @@ -388,6 +394,7 @@ void SkeletonIK::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::STRING, "tip_bone"), "set_tip_bone", "get_tip_bone"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "interpolation", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_interpolation", "get_interpolation"); ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "target"), "set_target_transform", "get_target_transform"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "override_tip_basis"), "set_override_tip_basis", "is_override_tip_basis"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_magnet"), "set_use_magnet", "is_using_magnet"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "magnet"), "set_magnet_position", "get_magnet_position"); ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target_node"), "set_target_node", "get_target_node"); @@ -418,6 +425,7 @@ void SkeletonIK::_notification(int p_what) { SkeletonIK::SkeletonIK() : Node(), interpolation(1), + override_tip_basis(true), use_magnet(false), min_distance(0.01), max_iterations(10), @@ -478,6 +486,14 @@ NodePath SkeletonIK::get_target_node() { return target_node_path_override; } +void SkeletonIK::set_override_tip_basis(bool p_override) { + override_tip_basis = p_override; +} + +bool SkeletonIK::is_override_tip_basis() const { + return override_tip_basis; +} + void SkeletonIK::set_use_magnet(bool p_use) { use_magnet = p_use; } @@ -555,7 +571,7 @@ void SkeletonIK::reload_goal() { void SkeletonIK::_solve_chain() { if (!task) return; - FabrikInverseKinematic::solve(task, interpolation, use_magnet, magnet_position); + FabrikInverseKinematic::solve(task, interpolation, override_tip_basis, use_magnet, magnet_position); } #endif // _3D_DISABLED diff --git a/scene/animation/skeleton_ik.h b/scene/animation/skeleton_ik.h index 202d6959bb..b9628c479c 100644 --- a/scene/animation/skeleton_ik.h +++ b/scene/animation/skeleton_ik.h @@ -138,7 +138,7 @@ public: // The goal of chain should be always in local space static void set_goal(Task *p_task, const Transform &p_goal); static void make_goal(Task *p_task, const Transform &p_inverse_transf, real_t blending_delta); - static void solve(Task *p_task, real_t blending_delta, bool p_use_magnet, const Vector3 &p_magnet_position); + static void solve(Task *p_task, real_t blending_delta, bool override_tip_basis, bool p_use_magnet, const Vector3 &p_magnet_position); }; class SkeletonIK : public Node { @@ -149,6 +149,7 @@ class SkeletonIK : public Node { real_t interpolation; Transform target; NodePath target_node_path_override; + bool override_tip_basis; bool use_magnet; Vector3 magnet_position; @@ -185,6 +186,9 @@ public: void set_target_node(const NodePath &p_node); NodePath get_target_node(); + void set_override_tip_basis(bool p_override); + bool is_override_tip_basis() const; + void set_use_magnet(bool p_use); bool is_using_magnet() const; diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 86992c38f0..8545efb966 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1900,7 +1900,13 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { if (gui.drag_data.get_type() != Variant::NIL) { gui.mouse_focus = NULL; + break; } else { + if (gui.drag_preview != NULL) { + ERR_PRINT("Don't set a drag preview and return null data. Preview was deleted and drag request ignored."); + memdelete(gui.drag_preview); + gui.drag_preview = NULL; + } gui.dragging = false; } diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index f9beeb226c..4329203ccb 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -518,6 +518,8 @@ public: virtual void particles_set_fractional_delta(RID p_particles, bool p_enable) = 0; virtual void particles_restart(RID p_particles) = 0; + virtual bool particles_is_inactive(RID p_particles) const = 0; + virtual void particles_set_draw_order(RID p_particles, VS::ParticlesDrawOrder p_order) = 0; virtual void particles_set_draw_passes(RID p_particles, int p_count) = 0; diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 13de92f226..1deca7bc66 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -1912,9 +1912,14 @@ void VisualServerScene::_prepare_scene(const Transform p_cam_transform, const Ca if (ins->base_type == VS::INSTANCE_PARTICLES) { //particles visible? process them - VSG::storage->particles_request_process(ins->base); - //particles visible? request redraw - VisualServerRaster::redraw_request(); + if (VSG::storage->particles_is_inactive(ins->base)) { + //but if nothing is going on, don't do it. + keep = false; + } else { + VSG::storage->particles_request_process(ins->base); + //particles visible? request redraw + VisualServerRaster::redraw_request(); + } } if (geom->lighting_dirty) { |