diff options
Diffstat (limited to 'doc')
286 files changed, 3687 insertions, 1580 deletions
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/Makefile b/doc/Makefile index 2f9fefe794..7f3f7ea939 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -24,5 +24,5 @@ rst: rm -rf $(OUTPUTDIR)/rst mkdir -p $(OUTPUTDIR)/rst pushd $(OUTPUTDIR)/rst - python $(TOOLSDIR)/makerst.py $(CLASSES) + python3 $(TOOLSDIR)/makerst.py $(CLASSES) popd diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 493f55e89b..7b4b3e43ba 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -127,7 +127,7 @@ <description> Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant. [codeblock] - a = atan(0,-1) # a is 3.141593 + a = atan(0, -1) # a is 3.141593 [/codeblock] </description> </method> @@ -175,7 +175,7 @@ # a is 'A' a = char(65) # a is 'a' - a = char(65+32) + a = char(65 + 32) [/codeblock] </description> </method> @@ -230,7 +230,7 @@ Returns the cosine of angle [code]s[/code] in radians. [codeblock] # prints 1 and -1 - print(cos(PI*2)) + print(cos(PI * 2)) print(cos(PI)) [/codeblock] </description> @@ -415,6 +415,21 @@ <return type="Array"> </return> <description> + Returns an array of dictionaries representing the current call stack. + [codeblock] + func _ready(): + foo() + + func foo(): + bar() + + func bar(): + print(get_stack()) + [/codeblock] + would print + [codeblock] + [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}] + [/codeblock] </description> </method> <method name="hash"> @@ -488,7 +503,7 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns True/False whether [code]s[/code] is an infinity value (either positive infinity or negative infinity). + Returns whether [code]s[/code] is an infinity value (either positive infinity or negative infinity). </description> </method> <method name="is_instance_valid"> @@ -497,6 +512,7 @@ <argument index="0" name="instance" type="Object"> </argument> <description> + Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory). </description> </method> <method name="is_nan"> @@ -505,7 +521,7 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns True/False whether [code]s[/code] is a NaN (Not-A-Number) value. + Returns whether [code]s[/code] is a NaN (Not-A-Number) value. </description> </method> <method name="len"> @@ -523,7 +539,7 @@ </description> </method> <method name="lerp"> - <return type="float"> + <return type="Variant"> </return> <argument index="0" name="from" type="Variant"> </argument> @@ -533,8 +549,11 @@ </argument> <description> Linearly interpolates between two values by a normalized value. + If the [code]from[/code] and [code]to[/code] arguments are of type [int] or [float], the return value is a [float]. + If both are of the same vector type ([Vector2], [Vector3] or [Color]), the return value will be of the same type ([code]lerp[/code] then calls the vector type's [code]linear_interpolate[/code] method). [codeblock] - lerp(1, 3, 0.5) # returns 2 + lerp(0, 4, 0.75) # returns 3.0 + lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # returns Vector2(2, 3.5) [/codeblock] </description> </method> @@ -584,7 +603,7 @@ <description> Returns the maximum of two values. [codeblock] - max(1,2) # returns 2 + max(1, 2) # returns 2 max(-3.99, -4) # returns -3.99 [/codeblock] </description> @@ -599,7 +618,7 @@ <description> Returns the minimum of two values. [codeblock] - min(1,2) # returns 1 + min(1, 2) # returns 1 min(-3.99, -4) # returns -4 [/codeblock] </description> @@ -657,7 +676,7 @@ <description> Returns the result of [code]x[/code] raised to the power of [code]y[/code]. [codeblock] - pow(2,5) # returns 32 + pow(2, 5) # returns 32 [/codeblock] </description> </method> @@ -681,8 +700,8 @@ <description> Converts one or more arguments to strings in the best way possible and prints them to the console. [codeblock] - a = [1,2,3] - print("a","b",a) # prints ab[1, 2, 3] + a = [1, 2, 3] + print("a", "b", a) # prints ab[1, 2, 3] [/codeblock] </description> </method> @@ -690,6 +709,7 @@ <return type="void"> </return> <description> + Like [method print], but prints only when used in debug mode. </description> </method> <method name="print_stack"> @@ -745,6 +765,30 @@ [/codeblock] </description> </method> + <method name="push_error"> + <return type="void"> + </return> + <argument index="0" name="message" type="String"> + </argument> + <description> + Pushes an error message to Godot's built-in debugger and to the OS terminal. + [codeblock] + push_error("test error") # prints "test error" to debugger and terminal as error call + [/codeblock] + </description> + </method> + <method name="push_warning"> + <return type="void"> + </return> + <argument index="0" name="message" type="String"> + </argument> + <description> + Pushes a warning message to Godot's built-in debugger and to the OS terminal. + [codeblock] + push_warning("test warning") # prints "test warning" to debugger and terminal as warning call + [/codeblock] + </description> + </method> <method name="rad2deg"> <return type="float"> </return> @@ -767,7 +811,7 @@ <description> Random range, any floating point value between [code]from[/code] and [code]to[/code]. [codeblock] - prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263 + prints(rand_range(0, 1), rand_range(0, 1)) # prints e.g. 0.135591 0.405263 [/codeblock] </description> </method> @@ -784,9 +828,9 @@ <return type="float"> </return> <description> - Returns a random floating point value between 0 and 1. + Returns a random floating point value on the interval [code][0, 1][/code]. [codeblock] - randf() # returns 0.375671 + randf() # returns e.g. 0.375671 [/codeblock] </description> </method> @@ -794,11 +838,12 @@ <return type="int"> </return> <description> - Returns a random 32 bit integer. Use remainder to obtain a random value between 0 and N (where N is smaller than 2^32 -1). + Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval [code][0, N][/code] (where N is smaller than 2^32 -1). [codeblock] - randi() % 20 # returns random number between 0 and 19 - randi() % 100 # returns random number between 0 and 99 - randi() % 100 + 1 # returns random number between 1 and 100 + randi() # returns random integer between 0 and 2^32 - 1 + randi() % 20 # returns random integer between 0 and 19 + randi() % 100 # returns random integer between 0 and 99 + randi() % 100 + 1 # returns random integer between 1 and 100 [/codeblock] </description> </method> @@ -985,7 +1030,7 @@ <description> Returns the tangent of angle [code]s[/code] in radians. [codeblock] - tan( deg2rad(45) ) # returns 1 + tan(deg2rad(45)) # returns 1 [/codeblock] </description> </method> diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 65d339c0d5..ba2eb35f8c 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -29,8 +29,6 @@ <member name="Geometry" type="Geometry" setter="" getter=""> [Geometry] singleton </member> - <member name="GodotSharp" type="GodotSharp" setter="" getter=""> - </member> <member name="IP" type="IP" setter="" getter=""> [IP] singleton </member> @@ -1298,10 +1296,6 @@ </constant> <constant name="PROPERTY_USAGE_CATEGORY" value="256" enum="PropertyUsageFlags"> </constant> - <constant name="PROPERTY_USAGE_STORE_IF_NONZERO" value="512" enum="PropertyUsageFlags"> - </constant> - <constant name="PROPERTY_USAGE_STORE_IF_NONONE" value="1024" enum="PropertyUsageFlags"> - </constant> <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048" enum="PropertyUsageFlags"> </constant> <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096" enum="PropertyUsageFlags"> diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index b9061e0b87..2e0d0c15b2 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -7,7 +7,7 @@ AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/math/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml index fa93d9668c..5b9188b171 100644 --- a/doc/classes/ARVRAnchor.xml +++ b/doc/classes/ARVRAnchor.xml @@ -5,8 +5,8 @@ </brief_description> <description> The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. - This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognised. - Keep in mind that as long as plane detection is enable the size, placing and orientation of an anchor will be updates as the detection logic learns more about the real world out there especially if only part of the surface is in view. + This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognised. + Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view. </description> <tutorials> </tutorials> @@ -31,7 +31,7 @@ <return type="Plane"> </return> <description> - Returns a plane aligned with our anchor, handy for intersection testing + Returns a plane aligned with our anchor; handy for intersection testing. </description> </method> <method name="get_size" qualifiers="const"> diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/ARVRCamera.xml index e74b435e11..aca8282a7c 100644 --- a/doc/classes/ARVRCamera.xml +++ b/doc/classes/ARVRCamera.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ARVRCamera" inherits="Camera" category="Core" version="3.1"> <brief_description> - A camera node with a few overrules for AR/VR applied such as location tracking. + A camera node with a few overrules for AR/VR applied, such as location tracking. </brief_description> <description> - This is a helper spatial node for our camera, note that if stereoscopic rendering is applicable (VR-HMD) most of the camera properties are ignored as the HMD information overrides them. The only properties that can be trusted are the near and far planes. - The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that in contrast to the ARVR Controller the render thread has access to the most up to date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result. + This is a helper spatial node for our camera; note that, if stereoscopic rendering is applicable (VR-HMD), most of the camera properties are ignored, as the HMD information overrides them. The only properties that can be trusted are the near and far planes. + The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the ARVR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result. </description> <tutorials> </tutorials> diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml index d3d6fce537..ccb55375d2 100644 --- a/doc/classes/ARVRController.xml +++ b/doc/classes/ARVRController.xml @@ -4,8 +4,8 @@ A spatial node representing a spatially tracked controller. </brief_description> <description> - This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy pass throughs to the state of buttons and such on the controllers. - Controllers are linked by their id. You can create controller nodes before the controllers are available. Say your game always uses two controllers (one for each hand) you can predefine the controllers with id 1 and 2 and they will become active as soon as the controllers are identified. If you expect additional controllers to be used you should react to the signals and add ARVRController nodes to your scene. + This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers. + Controllers are linked by their id. You can create controller nodes before the controllers are available. Say your game always uses two controllers (one for each hand) you can predefine the controllers with id 1 and 2 and they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene. The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller. </description> <tutorials> @@ -64,7 +64,7 @@ <member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id"> The controller's id. A controller id of 0 is unbound and will always result in an inactive node. Controller id 1 is reserved for the first controller that identifies itself as the left hand controller and id 2 is reserved for the first controller that identifies itself as the right hand controller. - For any other controller that the [ARVRServer] detects we continue with controller id 3. + For any other controller that the [ARVRServer] detects, we continue with controller id 3. When a controller is turned off, its slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off. </member> <member name="rumble" type="float" setter="set_rumble" getter="get_rumble"> 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/ARVROrigin.xml b/doc/classes/ARVROrigin.xml index 80626338f2..55062ba3ae 100644 --- a/doc/classes/ARVROrigin.xml +++ b/doc/classes/ARVROrigin.xml @@ -6,7 +6,7 @@ <description> This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world. There should be only one of these nodes in your scene and you must have one. All the ARVRCamera, ARVRController and ARVRAnchor nodes should be direct children of this node for spatial tracking to work correctly. - It is the position of this node that you update when you're character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point. + It is the position of this node that you update when your character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point. So say that your character is driving a car, the ARVROrigin node should be a child node of this car. If you implement a teleport system to move your character, you change the position of this node. Etc. </description> <tutorials> diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index a7d3e46684..e089360c46 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -56,7 +56,7 @@ <return type="int"> </return> <description> - Get the number of interfaces currently registered with the AR/VR server. If you're game supports multiple AR/VR platforms you can look through the available interface and either present the user with a selection or simply try an initialize each interface and use the first one that returns true. + Get the number of interfaces currently registered with the AR/VR server. If your game supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try an initialize each interface and use the first one that returns true. </description> </method> <method name="get_interfaces" qualifiers="const"> diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index 482566ee9f..e1b79a2a3e 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -47,8 +47,7 @@ Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. [codeblock] var as = AStar.new() - - as.add_point(1, Vector3(1,0,0), 4) # Adds the point (1,0,0) with weight_scale=4 and id=1 + as.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1 [/codeblock] If there already exists a point for the given id, its position and weight scale are updated to the given values. </description> @@ -81,15 +80,12 @@ <argument index="2" name="bidirectional" type="bool" default="true"> </argument> <description> - Creates a segment between the given points. + Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction. [codeblock] var as = AStar.new() - - as.add_point(1, Vector3(1,1,0)) - as.add_point(2, Vector3(0,5,0)) - - as.connect_points(1, 2, false) # If bidirectional=false it's only possible to go from point 1 to point 2 - # and not from point 2 to point 1. + as.add_point(1, Vector3(1, 1, 0)) + as.add_point(2, Vector3(0, 5, 0)) + as.connect_points(1, 2, false) [/codeblock] </description> </method> @@ -129,15 +125,12 @@ Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points. [codeblock] var as = AStar.new() - - as.add_point(1, Vector3(0,0,0)) - as.add_point(2, Vector3(0,5,0)) - + as.add_point(1, Vector3(0, 0, 0)) + as.add_point(2, Vector3(0, 5, 0)) as.connect_points(1, 2) - - var res = as.get_closest_position_in_segment(Vector3(3,3,0)) # returns (0, 3, 0) + var res = as.get_closest_position_in_segment(Vector3(3, 3, 0)) # returns (0, 3, 0) [/codeblock] - The result is in the segment that goes from [code]y=0[/code] to [code]y=5[/code]. It's the closest position in the segment to the given point. + The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point. </description> </method> <method name="get_id_path"> @@ -151,11 +144,10 @@ Returns an array with the ids of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. [codeblock] var as = AStar.new() - - as.add_point(1, Vector3(0,0,0)) - as.add_point(2, Vector3(0,1,0), 1) # default weight is 1 - as.add_point(3, Vector3(1,1,0)) - as.add_point(4, Vector3(2,0,0)) + as.add_point(1, Vector3(0, 0, 0)) + as.add_point(2, Vector3(0, 1, 0), 1) # default weight is 1 + as.add_point(3, Vector3(1, 1, 0)) + as.add_point(4, Vector3(2, 0, 0)) as.connect_points(1, 2, false) as.connect_points(2, 3, false) @@ -177,11 +169,10 @@ Returns an array with the ids of the points that form the connect with the given point. [codeblock] var as = AStar.new() - - as.add_point(1, Vector3(0,0,0)) - as.add_point(2, Vector3(0,1,0)) - as.add_point(3, Vector3(1,1,0)) - as.add_point(4, Vector3(2,0,0)) + as.add_point(1, Vector3(0, 0, 0)) + as.add_point(2, Vector3(0, 1, 0)) + as.add_point(3, Vector3(1, 1, 0)) + as.add_point(4, Vector3(2, 0, 0)) as.connect_points(1, 2, true) as.connect_points(1, 3, true) diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 7e871d68cb..fc27bdbb81 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -60,7 +60,7 @@ </methods> <members> <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok"> - If [code]true[/code] the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. Default value: [code]true[/code]. + If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. Default value: [code]true[/code]. Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [FileDialog] defaults to [code]false[/code], and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such this property can't be used in [FileDialog] to disable hiding the dialog when pressing OK. </member> <member name="dialog_text" type="String" setter="set_text" getter="get_text"> diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index a41ed0e689..7f9167c49a 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -40,13 +40,13 @@ The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code] texture will be centered. Default value: [code]true[/code]. + If [code]true[/code], texture will be centered. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame"> The displayed animation frame's index. @@ -58,7 +58,7 @@ The texture's drawing offset. </member> <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> - If [code]true[/code] the [member animation] is currently playing. + If [code]true[/code], the [member animation] is currently playing. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> </member> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 733d565676..dcc44e2df4 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -46,7 +46,7 @@ The [SpriteFrames] resource containing the animation(s). </member> <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> - If [code]true[/code] the [member animation] is currently playing. + If [code]true[/code], the [member animation] is currently playing. </member> </members> <signals> diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index 9dc58ed195..08cd79e78f 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimatedTexture" inherits="Texture" category="Core" version="3.1"> <brief_description> + Proxy texture for simple frame-based animations. </brief_description> <description> + [code]AnimatedTexture[/code] is a resource format for simple frame-based animations, where multiple frames textures can be chained automatically with a predefined delay for each frame. It's not a [Node], contrarily to [AnimationPlayer] or [AnimatedSprite], but has the advantage of being usable at any place where a [Texture] resource can be used, e.g. in a [TileSet]. + The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. + [code]AnimatedTexture[/code] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. </description> <tutorials> </tutorials> @@ -15,6 +19,7 @@ <argument index="0" name="frame" type="int"> </argument> <description> + Retrieves the delayed assigned to the given [code]frame[/code] ID. </description> </method> <method name="get_frame_texture" qualifiers="const"> @@ -23,6 +28,7 @@ <argument index="0" name="frame" type="int"> </argument> <description> + Retrieves the [Texture] assigned to the given [code]frame[/code] ID. </description> </method> <method name="set_frame_delay"> @@ -33,6 +39,14 @@ <argument index="1" name="delay" type="float"> </argument> <description> + Defines an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code]. + For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be: + [codeblock] + Frame 0: 0.5 s (1 / fps) + Frame 1: 1.7 s (1 / fps + 1.2) + Frame 2: 0.5 s (1 / fps) + Total duration: 2.7 s + [/codeblock] </description> </method> <method name="set_frame_texture"> @@ -43,15 +57,23 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Assigns a [Texture] to the given [code]frame[/code] ID. IDs start at 0 (so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1). + You can define any frame texture up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation. </description> </method> </methods> <members> <member name="fps" type="float" setter="set_fps" getter="get_fps"> + Number of frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). Default value: 4. + For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run over 4 seconds, with one frame each 0.5 seconds. </member> <member name="frames" type="int" setter="set_frames" getter="get_frames"> + Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]. Default value: 1. </member> </members> <constants> + <constant name="MAX_FRAMES" value="256"> + The maximum number of frames supported by [code]AnimatedTexture[/code]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite]. + </constant> </constants> </class> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index bb161cd87c..eaaa64d53d 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") @@ -17,7 +17,7 @@ Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/animation/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> </tutorials> <demos> </demos> @@ -513,7 +513,7 @@ <argument index="1" name="interpolation" type="bool"> </argument> <description> - If [code]true[/code] the track at [code]idx[/code] wraps the interpolation loop. + If [code]true[/code], the track at [code]idx[/code] wraps the interpolation loop. </description> </method> <method name="track_set_interpolation_type"> @@ -648,6 +648,12 @@ The animation step value. </member> </members> + <signals> + <signal name="tracks_changed"> + <description> + </description> + </signal> + </signals> <constants> <constant name="TYPE_VALUE" value="0" enum="TrackType"> Value tracks set values in node properties, but only those which can be Interpolated. diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index d9bad150df..a98facf541 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNode" inherits="Resource" category="Core" version="3.1"> <brief_description> + Base resource for [AnimationTree] nodes. </brief_description> <description> + Base resource for [AnimationTree] nodes. In general it's not used directly but you can create custom ones with custom blending formulas. + Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. </description> <tutorials> </tutorials> @@ -15,6 +18,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Add an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree] </description> </method> <method name="blend_animation"> @@ -31,6 +35,7 @@ <argument index="4" name="blend" type="float"> </argument> <description> + Blend an animation by "blend" amount (name must be valid in the linked [AnimationPlayer]). A time and delta mas be passed, as well as whether seek happened. </description> </method> <method name="blend_input"> @@ -49,6 +54,7 @@ <argument index="5" name="optimize" type="bool" default="true"> </argument> <description> + Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. Time is a delta, unless "seek" is true, in which case it is absolute. A filter mode may be optionally passed. </description> </method> <method name="blend_node"> @@ -69,18 +75,37 @@ <argument index="6" name="optimize" type="bool" default="true"> </argument> <description> + Blend another animaiton node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition. </description> </method> <method name="get_caption" qualifiers="virtual"> <return type="String"> </return> <description> + Get the text caption for this node (used by some editors) + </description> + </method> + <method name="get_child_by_name" qualifiers="virtual"> + <return type="Object"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + Get the a child node by index (used by editors inheriting from [AnimationRootNode]). + </description> + </method> + <method name="get_child_nodes" qualifiers="virtual"> + <return type="Dictionary"> + </return> + <description> + Get all children nodes, in order as a name:node dictionary. Only useful when inheriting [AnimationRootNode]. </description> </method> <method name="get_input_count" qualifiers="const"> <return type="int"> </return> <description> + Amount of inputs in this node, only useful for nodes that go into [AnimationNodeBlendTree]. </description> </method> <method name="get_input_name"> @@ -89,6 +114,7 @@ <argument index="0" name="input" type="int"> </argument> <description> + Get the name of an input by index. </description> </method> <method name="get_parameter" qualifiers="const"> @@ -97,12 +123,30 @@ <argument index="0" name="name" type="String"> </argument> <description> + Get the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. + </description> + </method> + <method name="get_parameter_default_value" qualifiers="virtual"> + <return type="Variant"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + Get the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. + </description> + </method> + <method name="get_parameter_list" qualifiers="virtual"> + <return type="Array"> + </return> + <description> + Get the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list]. </description> </method> <method name="has_filter" qualifiers="virtual"> <return type="String"> </return> <description> + Return true whether you want the blend tree editor to display filter editing on this node. </description> </method> <method name="is_path_filtered" qualifiers="const"> @@ -111,6 +155,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> + Return true wether a given path is filtered. </description> </method> <method name="process" qualifiers="virtual"> @@ -121,6 +166,10 @@ <argument index="1" name="seek" type="bool"> </argument> <description> + Called when a custom node is processed. The argument "time" is relative, unless "seek" is true (in which case it is absolute). + Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. + You can also use [method get_parameter] and [method set_parameter] to modify local memory. + This function returns the time left for the current animation to finish (if unsure, just pass the value from the main blend being called). </description> </method> <method name="remove_input"> @@ -129,6 +178,7 @@ <argument index="0" name="index" type="int"> </argument> <description> + Remove an input, call this only when inactive. </description> </method> <method name="set_filter_path"> @@ -139,6 +189,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Add/Remove a path for the filter. </description> </method> <method name="set_parameter"> @@ -149,16 +200,19 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Set a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes. </description> </method> </methods> <members> <member name="filter_enabled" type="bool" setter="set_filter_enabled" getter="is_filter_enabled"> + Return whether filtering is enabled. </member> </members> <signals> <signal name="removed_from_graph"> <description> + Called when the node was removed from the graph. </description> </signal> <signal name="tree_changed"> @@ -168,12 +222,16 @@ </signals> <constants> <constant name="FILTER_IGNORE" value="0" enum="FilterAction"> + Do not use filtering. </constant> <constant name="FILTER_PASS" value="1" enum="FilterAction"> + Paths matching the filter will be allowed to pass. </constant> <constant name="FILTER_STOP" value="2" enum="FilterAction"> + Paths matching the filter will be discarded. </constant> <constant name="FILTER_BLEND" value="3" enum="FilterAction"> + Paths matching the filter will be blended (by the blend value). </constant> </constants> </class> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index 22f5e0838e..de8e918f68 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -9,12 +9,6 @@ <demos> </demos> <methods> - <method name="get_playback_time" qualifiers="const"> - <return type="float"> - </return> - <description> - </description> - </method> </methods> <members> <member name="animation" type="String" setter="set_animation" getter="get_animation"> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index 39d780b6ef..b205c01468 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -113,6 +113,8 @@ <members> <member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles"> </member> + <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode"> + </member> <member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space"> </member> <member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space"> @@ -124,6 +126,18 @@ <member name="y_label" type="String" setter="set_y_label" getter="get_y_label"> </member> </members> + <signals> + <signal name="triangles_updated"> + <description> + </description> + </signal> + </signals> <constants> + <constant name="BLEND_MODE_INTERPOLATED" value="0" enum="BlendMode"> + </constant> + <constant name="BLEND_MODE_DISCRETE" value="1" enum="BlendMode"> + </constant> + <constant name="BLEND_MODE_DISCRETE_CARRY" value="2" enum="BlendMode"> + </constant> </constants> </class> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 6dc91a234a..21aba282ee 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -7,8 +7,8 @@ An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/getting_started/step_by_step/animations.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/animation/index.html</link> + <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/animations.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> </tutorials> <demos> </demos> @@ -30,7 +30,7 @@ <argument index="0" name="delta" type="float"> </argument> <description> - Shifts position in the animation timeline. Delta is the time in seconds to shift. + Shifts position in the animation timeline. Delta is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled. </description> </method> <method name="animation_get_next" qualifiers="const"> @@ -110,6 +110,12 @@ Get the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method. </description> </method> + <method name="get_queue"> + <return type="PoolStringArray"> + </return> + <description> + </description> + </method> <method name="has_animation" qualifiers="const"> <return type="bool"> </return> @@ -139,6 +145,7 @@ </argument> <description> Play the animation with key [code]name[/code]. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards. + If the animation has been paused by [code]stop(true)[/code] it will be resumed. Calling [code]play()[/code] without arguments will also resume the animation. </description> </method> <method name="play_backwards"> @@ -150,6 +157,7 @@ </argument> <description> Play the animation with key [code]name[/code] in reverse. + If the animation has been paused by [code]stop(true)[/code] it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards. </description> </method> <method name="queue"> @@ -189,7 +197,7 @@ <argument index="1" name="update" type="bool" default="false"> </argument> <description> - Seek the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. + Seek the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped. </description> </method> <method name="set_blend_time"> @@ -211,7 +219,8 @@ <argument index="0" name="reset" type="bool" default="true"> </argument> <description> - Stop the currently playing animation. If [code]reset[/code] is [code]true[/code], the anim position is reset to [code]0[/code]. + Stop the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. + If [code]reset[/code] is [code]false[/code], then calling [code]play()[/code] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [code]play_backwards()[/code] method. </description> </method> </methods> @@ -238,7 +247,7 @@ The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. Default value: [code]0[/code]. </member> <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode"> - The process notification in which to update animations. Default value: [enum ANIMATION_PROCESS_IDLE]. + The process notification in which to update animations. Default value: [code]ANIMATION_PROCESS_IDLE[/code]. </member> <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale"> The speed scaling ratio. For instance, if this value is 1 then the animation plays at normal speed. If it's 0.5 then it plays at half speed. If it's 2 then it plays at double speed. Default value: [code]1[/code]. diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index 8c32d5f6a3..cfec75bc3a 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -29,7 +29,7 @@ <argument index="0" name="delta" type="float"> </argument> <description> - Shifts position in the animation timeline. Delta is the time in seconds to shift. + Shifts position in the animation timeline. Delta is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled. </description> </method> <method name="animation_node_get_animation" qualifiers="const"> @@ -607,7 +607,7 @@ </methods> <members> <member name="active" type="bool" setter="set_active" getter="is_active"> - If [code]true[/code] the [code]AnimationTreePlayer[/code] is able to play animations. Default value: [code]false[/code]. + If [code]true[/code], the [code]AnimationTreePlayer[/code] is able to play animations. Default value: [code]false[/code]. </member> <member name="base_path" type="NodePath" setter="set_base_path" getter="get_base_path"> The node from which to relatively access other nodes. Default value: [code]".."[/code]. @@ -618,7 +618,7 @@ Once set, Animation nodes can be added to the AnimationTreePlayer. </member> <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationTreePlayer.AnimationProcessMode"> - The thread in which to update animations. Default value: [enum ANIMATION_PROCESS_IDLE]. + The thread in which to update animations. Default value: [code]ANIMATION_PROCESS_IDLE[/code]. </member> </members> <constants> diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index 970d09a2ac..a538fe9935 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -49,7 +49,7 @@ <argument index="0" name="area" type="Node"> </argument> <description> - If [code]true[/code] the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -58,7 +58,7 @@ <argument index="0" name="body" type="Node"> </argument> <description> - If [code]true[/code] the given body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_collision_layer_bit"> @@ -69,7 +69,7 @@ <argument index="1" name="value" type="bool"> </argument> <description> - Set/clear individual bits on the layer mask. This simplifies editing this [code]Area[code]'s layers. + Set/clear individual bits on the layer mask. This simplifies editing this [code]Area[/code]'s layers. </description> </method> <method name="set_collision_mask_bit"> @@ -92,10 +92,10 @@ The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus"> - If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. + If [code]true[/code], the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code]. + The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> The physics layers this area scans to determine collision detection. @@ -107,19 +107,19 @@ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. </member> <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point"> - If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. + If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). Also see [member space_override]. Default value: [code]false[/code]. </member> <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector"> - The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction. + The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction. </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp"> The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable"> - If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code]. + If [code]true[/code], other monitoring areas can detect this area. Default value: [code]true[/code]. </member> <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring"> - If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. + If [code]true[/code], the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. </member> <member name="priority" type="float" setter="set_priority" getter="get_priority"> The area's priority. Higher priority areas are processed first. Default value: 0. @@ -128,7 +128,7 @@ The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. </member> <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus"> - If [code]true[/code] the area applies reverb to its associated audio. + If [code]true[/code], the area applies reverb to its associated audio. </member> <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus"> The reverb bus name to use for this area's associated audio. @@ -137,7 +137,7 @@ The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. </member> <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride"> - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values. + Override mode for gravity and damping calculations within this area. See [enum Area.SpaceOverride] for possible values. </member> </members> <signals> @@ -227,16 +227,16 @@ This area does not affect gravity/damping. </constant> <constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="SpaceOverride"> - This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order). + This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order). </constant> <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="SpaceOverride"> - This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order), ignoring any lower priority areas. + This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas. </constant> <constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="SpaceOverride"> This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. </constant> <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="SpaceOverride"> - This area replaces any gravity/damping calculated so far (in [code]priority[/code] order), but keeps calculating the rest of the areas. + This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas. </constant> </constants> </class> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index b77a931201..7980fe79ba 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -49,7 +49,7 @@ <argument index="0" name="area" type="Node"> </argument> <description> - If [code]true[/code] the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -58,7 +58,7 @@ <argument index="0" name="body" type="Node"> </argument> <description> - If [code]true[/code] the given body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_collision_layer_bit"> @@ -92,10 +92,10 @@ The name of the area's audio bus. </member> <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus"> - If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. + If [code]true[/code], the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code]. + The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> The physics layers this area scans to determine collision detection. @@ -107,25 +107,25 @@ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. </member> <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point"> - If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code]. + If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). Also see [member space_override]. Default value: [code]false[/code]. </member> <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector"> - The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction. + The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction. </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp"> The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable"> - If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code]. + If [code]true[/code], other monitoring areas can detect this area. Default value: [code]true[/code]. </member> <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring"> - If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. + If [code]true[/code], the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. </member> <member name="priority" type="float" setter="set_priority" getter="get_priority"> The area's priority. Higher priority areas are processed first. Default value: 0. </member> <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride"> - Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values. + Override mode for gravity and damping calculations within this area. See [enum Area2D.SpaceOverride] for possible values. </member> </members> <signals> @@ -215,16 +215,16 @@ This area does not affect gravity/damping. </constant> <constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="SpaceOverride"> - This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order). + This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order). </constant> <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="SpaceOverride"> - This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order), ignoring any lower priority areas. + This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas. </constant> <constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="SpaceOverride"> This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. </constant> <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="SpaceOverride"> - This area replaces any gravity/damping calculated so far (in [code]priority[/code] order), but keeps calculating the rest of the areas. + This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas. </constant> </constants> </class> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index b013b3c4ae..0b5c0eb0b3 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -4,7 +4,7 @@ Generic array datatype. </brief_description> <description> - Generic array, contains several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example: + Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example: [codeblock] var array = ["One", 2, 3, "Four"] print(array[0]) # One @@ -26,7 +26,7 @@ <argument index="0" name="from" type="PoolColorArray"> </argument> <description> - Construct an array from a [PoolColorArray]. + Constructs an array from a [PoolColorArray]. </description> </method> <method name="Array"> @@ -35,7 +35,7 @@ <argument index="0" name="from" type="PoolVector3Array"> </argument> <description> - Construct an array from a [PoolVector3Array]. + Constructs an array from a [PoolVector3Array]. </description> </method> <method name="Array"> @@ -44,7 +44,7 @@ <argument index="0" name="from" type="PoolVector2Array"> </argument> <description> - Construct an array from a [PoolVector2Array]. + Constructs an array from a [PoolVector2Array]. </description> </method> <method name="Array"> @@ -53,7 +53,7 @@ <argument index="0" name="from" type="PoolStringArray"> </argument> <description> - Construct an array from a [PoolStringArray]. + Constructs an array from a [PoolStringArray]. </description> </method> <method name="Array"> @@ -62,7 +62,7 @@ <argument index="0" name="from" type="PoolRealArray"> </argument> <description> - Construct an array from a [PoolRealArray]. + Constructs an array from a [PoolRealArray]. </description> </method> <method name="Array"> @@ -71,7 +71,7 @@ <argument index="0" name="from" type="PoolIntArray"> </argument> <description> - Construct an array from a [PoolIntArray]. + Constructs an array from a [PoolIntArray]. </description> </method> <method name="Array"> @@ -80,21 +80,21 @@ <argument index="0" name="from" type="PoolByteArray"> </argument> <description> - Construct an array from a [PoolByteArray]. + Constructs an array from a [PoolByteArray]. </description> </method> <method name="append"> <argument index="0" name="value" type="Variant"> </argument> <description> - Append an element at the end of the array (alias of [method push_back]). + Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="back"> <return type="Variant"> </return> <description> - Returns the last element of the array if the array is not empty (size>0). + Returns the last element of the array if the array is not empty. </description> </method> <method name="bsearch"> @@ -125,7 +125,7 @@ </method> <method name="clear"> <description> - Clear the array (resize to 0). + Clears the array (resizes to 0). </description> </method> <method name="count"> @@ -134,7 +134,7 @@ <argument index="0" name="value" type="Variant"> </argument> <description> - Return the amount of times an element is in the array. + Returns the number of times an element is in the array. </description> </method> <method name="duplicate"> @@ -144,21 +144,21 @@ </argument> <description> Returns a copy of the array. - If [code]deep[/code] is [code]true[/code], a deep copy is be performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. + If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. </description> </method> <method name="empty"> <return type="bool"> </return> <description> - Return true if the array is empty (size==0). + Returns [code]true[/code] if the array is empty. </description> </method> <method name="erase"> <argument index="0" name="value" type="Variant"> </argument> <description> - Remove the first occurrence of a value from the array. + Removes the first occurrence of a value from the array. </description> </method> <method name="find"> @@ -185,7 +185,7 @@ <return type="Variant"> </return> <description> - Returns the first element of the array if the array is not empty (size>0). + Returns the first element of the array if the array is not empty. </description> </method> <method name="has"> @@ -194,12 +194,12 @@ <argument index="0" name="value" type="Variant"> </argument> <description> - Return true if the array contains given value. + Returns [code]true[/code] if the array contains the given value. [codeblock] - [ "inside", 7 ].has("inside") == true - [ "inside", 7 ].has("outside") == false - [ "inside", 7 ].has(7) == true - [ "inside", 7 ].has("7") == false + ["inside", 7].has("inside") == true + ["inside", 7].has("outside") == false + ["inside", 7].has(7) == true + ["inside", 7].has("7") == false [/codeblock] </description> </method> @@ -207,7 +207,7 @@ <return type="int"> </return> <description> - Return a hashed integer value representing the array contents. + Returns a hashed integer value representing the array contents. </description> </method> <method name="insert"> @@ -216,68 +216,68 @@ <argument index="1" name="value" type="Variant"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]). + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]). </description> </method> <method name="invert"> <description> - Reverse the order of the elements in the array. + Reverses the order of the elements in the array. </description> </method> <method name="max"> <return type="Variant"> </return> <description> - Return maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. + Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> <method name="min"> <return type="Variant"> </return> <description> - Return minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. + Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> <method name="pop_back"> <return type="Variant"> </return> <description> - Remove the last element of the array. + Removes the last element of the array. </description> </method> <method name="pop_front"> <return type="Variant"> </return> <description> - Remove the first element of the array. + Removes the first element of the array. </description> </method> <method name="push_back"> <argument index="0" name="value" type="Variant"> </argument> <description> - Append an element at the end of the array. + Appends an element at the end of the array. </description> </method> <method name="push_front"> <argument index="0" name="value" type="Variant"> </argument> <description> - Add an element at the beginning of the array. + Adds an element at the beginning of the array. </description> </method> <method name="remove"> <argument index="0" name="position" type="int"> </argument> <description> - Remove an element from the array by index. + Removes an element from the array by index. </description> </method> <method name="resize"> <argument index="0" name="size" type="int"> </argument> <description> - Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. + Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. </description> </method> <method name="rfind"> @@ -293,19 +293,19 @@ </method> <method name="shuffle"> <description> - Shuffle the array such that the items will have a random order. + Shuffles the array such that the items will have a random order. </description> </method> <method name="size"> <return type="int"> </return> <description> - Return the amount of elements in the array. + Returns the number of elements in the array. </description> </method> <method name="sort"> <description> - Sort the array using natural order. + Sorts the array. Note: strings are sorted in alphabetical, not natural order. </description> </method> <method name="sort_custom"> @@ -314,7 +314,7 @@ <argument index="1" name="func" type="String"> </argument> <description> - Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. + Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. [b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. [codeblock] class MyCustomSorter: diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 7806cf4ce4..bcb9b4f6da 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -6,9 +6,9 @@ The [code]ArrayMesh[/code] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle [codeblock] var vertices = PoolVector3Array() - vertices.push_back(Vector3(0,1,0)) - vertices.push_back(Vector3(1,0,0)) - vertices.push_back(Vector3(0,0,1)) + vertices.push_back(Vector3(0, 1, 0)) + vertices.push_back(Vector3(1, 0, 0)) + vertices.push_back(Vector3(0, 0, 1)) # Initialize the ArrayMesh. var arr_mesh = ArrayMesh.new() var arrays = [] diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index 409c40e809..3f5eb892af 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -18,7 +18,7 @@ The texture that contains the atlas. Can be any [Texture] subtype. </member> <member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip"> - If [code]true[/code] clips the area outside of the region to avoid bleeding of the surrounding texture pixels. + If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels. </member> <member name="margin" type="Rect2" setter="set_margin" getter="get_margin"> The margin around the region. The [Rect2]'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin. diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml index c43da3e233..f122906167 100644 --- a/doc/classes/AudioBusLayout.xml +++ b/doc/classes/AudioBusLayout.xml @@ -4,7 +4,7 @@ Stores information about the audiobusses. </brief_description> <description> - Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between busses. See [AudioServer] for usage. + Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See [AudioServer] for usage. </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml index 7c9d11111c..872b94a0cd 100644 --- a/doc/classes/AudioEffectDelay.xml +++ b/doc/classes/AudioEffectDelay.xml @@ -18,7 +18,7 @@ Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active"> - If [code]true[/code] feedback is enabled. Default value: [code]false[/code]. + If [code]true[/code], feedback is enabled. Default value: [code]false[/code]. </member> <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms"> Feedback delay time in milliseconds. Default value: [code]340[/code]. diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml index 9e791f02d7..5c5c55d17b 100644 --- a/doc/classes/AudioEffectLimiter.xml +++ b/doc/classes/AudioEffectLimiter.xml @@ -4,7 +4,7 @@ Adds a soft clip Limiter audio effect to an Audio bus. </brief_description> <description> - A limiter is similar to a compressor, but it’s less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping. + A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping. Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. </description> <tutorials> diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index fb2009105d..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"> - Widens or narrows the stereo image of the reverb tail. 1 means fully widens. 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]. @@ -33,7 +33,7 @@ Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: [code]0.8[/code]. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread"> - Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code]. + Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="wet" type="float" setter="set_wet" getter="get_wet"> Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: [code]0.5[/code]. diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 37756bcfd8..eb3c7cb3b4 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -7,7 +7,7 @@ AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/audio/audio_buses.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> </tutorials> <demos> </demos> @@ -58,14 +58,23 @@ <return type="AudioBusLayout"> </return> <description> - Generates an [AudioBusLayout] using the available busses and effects. + Generates an [AudioBusLayout] using the available buses and effects. + </description> + </method> + <method name="get_bus_channels" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="bus_idx" type="int"> + </argument> + <description> + Returns the amount of channels of the bus at index [code]bus_idx[/code]. </description> </method> <method name="get_bus_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the number of available busses. + Returns the number of available buses. </description> </method> <method name="get_bus_effect"> @@ -178,7 +187,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is bypassing effects. + If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects. </description> </method> <method name="is_bus_effect_enabled" qualifiers="const"> @@ -189,7 +198,7 @@ <argument index="1" name="effect_idx" type="int"> </argument> <description> - If [code]true[/code] the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. + If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. </description> </method> <method name="is_bus_mute" qualifiers="const"> @@ -198,7 +207,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is muted. + If [code]true[/code], the bus at index [code]bus_idx[/code] is muted. </description> </method> <method name="is_bus_solo" qualifiers="const"> @@ -207,7 +216,7 @@ <argument index="0" name="bus_idx" type="int"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is in solo mode. + If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode. </description> </method> <method name="lock"> @@ -256,7 +265,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is bypassing effects. + If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects. </description> </method> <method name="set_bus_count"> @@ -265,7 +274,7 @@ <argument index="0" name="amount" type="int"> </argument> <description> - Adds and removes busses to make the number of busses match [code]amount[/code]. + Adds and removes buses to make the number of buses match [code]amount[/code]. </description> </method> <method name="set_bus_effect_enabled"> @@ -278,7 +287,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. + If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. </description> </method> <method name="set_bus_layout"> @@ -298,7 +307,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is muted. + If [code]true[/code], the bus at index [code]bus_idx[/code] is muted. </description> </method> <method name="set_bus_name"> @@ -331,7 +340,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the bus at index [code]bus_idx[/code] is in solo mode. + If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode. </description> </method> <method name="set_bus_volume_db"> @@ -385,6 +394,8 @@ <constant name="SPEAKER_MODE_STEREO" value="0" enum="SpeakerMode"> Two or fewer speakers are detected. </constant> + <constant name="SPEAKER_SURROUND_31" value="1" enum="SpeakerMode"> + </constant> <constant name="SPEAKER_SURROUND_51" value="2" enum="SpeakerMode"> A 5.1 channel surround setup detected. </constant> diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index 753a506058..c0a16adda9 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -4,10 +4,10 @@ Base class for audio streams. </brief_description> <description> - Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample]. + Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/audio/audio_streams.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 26d0b1a83d..e880fc1323 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -7,8 +7,7 @@ Plays background audio. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/learning/features/audio/index.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/audio/audio_streams.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <demos> </demos> @@ -48,7 +47,7 @@ </methods> <members> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. @@ -60,7 +59,7 @@ Changes the pitch and the tempo of the audio. </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> - If [code]true[/code] audio is playing. + If [code]true[/code], audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> The [AudioStream] object to be played. diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 5cc87e0e7a..28754f8695 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -7,8 +7,7 @@ Plays audio that dampens with distance from screen center. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/learning/features/audio/index.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/audio/audio_streams.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <demos> </demos> @@ -54,7 +53,7 @@ Dampens audio over distance with this as an exponent. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. @@ -66,7 +65,7 @@ Changes the pitch and the tempo of the audio. </member> <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> - If [code]true[/code] audio is playing. + If [code]true[/code], audio is playing. </member> <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> The [AudioStream] object to be played. diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index e61515ffc0..a0260d8261 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -7,8 +7,7 @@ Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/learning/features/audio/index.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/audio/audio_streams.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <demos> </demos> @@ -60,7 +59,7 @@ Decides if audio should get quieter with distance linearly, quadratically or logarithmically. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code]. + If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. </member> <member name="bus" type="String" setter="set_bus" getter="get_bus"> Bus on which this audio is playing. @@ -72,7 +71,7 @@ The angle in which the audio reaches cameras undampened. </member> <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled"> - If [code]true[/code] the audio should be dampened according to the direction of the sound. + If [code]true[/code], the audio should be dampened according to the direction of the sound. </member> <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db"> dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB. diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 9e56cc6016..77d5f14ab7 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -62,5 +62,8 @@ <constant name="LOOP_PING_PONG" value="2" enum="LoopMode"> Audio loops the data between loop_begin and loop_end playing back and forth. </constant> + <constant name="LOOP_BACKWARD" value="3" enum="LoopMode"> + Audio loops the data between loop_begin and loop_end playing backward only. + </constant> </constants> </class> diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml index 966b6dd7c4..d376bf667f 100644 --- a/doc/classes/BakedLightmap.xml +++ b/doc/classes/BakedLightmap.xml @@ -7,7 +7,7 @@ Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the [GIProbe] approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/baked_lightmaps.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/baked_lightmaps.html</link> </tutorials> <demos> </demos> @@ -39,7 +39,7 @@ Size of affected area. </member> <member name="bake_hdr" type="bool" setter="set_hdr" getter="is_hdr"> - If [code]true[/code] lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller lightmap. Default value:[code]false[/code]. + If [code]true[/code], lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller lightmap. Default value:[code]false[/code]. </member> <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode"> Lightmapping mode. See [enum BakeMode]. diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 3364770280..ff3e22ba26 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -51,22 +51,25 @@ To allow both left-click and right-click, set this to 3, because it's BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> - If [code]true[/code] the button is in disabled state and can't be clicked or toggled. + If [code]true[/code], the button is in disabled state and can't be clicked or toggled. </member> <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode"> - Focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [member disabled]). + Focus access mode to use when switching between enabled/disabled (see [member Control.focus_mode] and [member disabled]). </member> <member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group"> [ButtonGroup] associated to the button. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active). + If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active). </member> <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut"> - [Shortcut] associated to the button. + [ShortCut] associated to the button. + </member> + <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled"> + If [code]true[/code], the button will add information about its shortcut in the tooltip. </member> <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode"> - If [code]true[/code] the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. + If [code]true[/code], the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. </member> </members> <signals> @@ -89,7 +92,7 @@ <argument index="0" name="button_pressed" type="bool"> </argument> <description> - This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]pressed[/i] argument. + This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]button_pressed[/i] argument. </description> </signal> </signals> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index fe8debe1a9..b96daed6fc 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -8,8 +8,7 @@ For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> - <link>http://docs.godotengine.org/en/latest/tutorials/math/rotations.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index 7fe6a2acef..4b7f8007ca 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -88,7 +88,7 @@ <method name="set_bit_rect"> <return type="void"> </return> - <argument index="0" name="p_rect" type="Rect2"> + <argument index="0" name="rect" type="Rect2"> </argument> <argument index="1" name="bit" type="bool"> </argument> diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml index c943caf636..8ed563be5b 100644 --- a/doc/classes/BitmapFont.xml +++ b/doc/classes/BitmapFont.xml @@ -110,7 +110,7 @@ Ascent (number of pixels above the baseline). </member> <member name="distance_field" type="bool" setter="set_distance_field_hint" getter="is_distance_field_hint"> - If [code]true[/code] distance field hint is enabled. + If [code]true[/code], distance field hint is enabled. </member> <member name="fallback" type="BitmapFont" setter="set_fallback" getter="get_fallback"> The fallback font. diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index e839c3e750..6273c8f83f 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -12,18 +12,21 @@ <demos> </demos> <methods> + <method name="get_buttons"> + <return type="Array"> + </return> + <description> + Returns an [Array] of [Button]s who have this as their [code]ButtonGroup[/code] (see [member BaseButton.group]). + </description> + </method> <method name="get_pressed_button"> <return type="BaseButton"> </return> <description> - Return the pressed button. + Returns the current pressed button. </description> </method> </methods> <constants> </constants> - <theme_items> - <theme_item name="panel" type="StyleBox"> - </theme_item> - </theme_items> </class> diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml index 9d3dc5d70a..6db2acac43 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -39,8 +39,6 @@ </member> <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> </member> - <member name="anim_loop" type="bool" setter="set_particle_flag" getter="get_particle_flag"> - </member> <member name="anim_offset" type="float" setter="set_param" getter="get_param"> </member> <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> @@ -56,6 +54,7 @@ <member name="color" type="Color" setter="set_color" getter="get_color"> </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> + Each particle's vertex color will vary along this [GradientTexture]. </member> <member name="damping" type="float" setter="set_param" getter="get_param"> </member> @@ -129,11 +128,11 @@ </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> </member> - <member name="scale" type="float" setter="set_param" getter="get_param"> + <member name="scale_amount" type="float" setter="set_param" getter="get_param"> </member> - <member name="scale_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> </member> - <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> </member> @@ -181,7 +180,7 @@ </constant> <constant name="FLAG_ROTATE_Y" value="1" enum="Flags"> </constant> - <constant name="FLAG_MAX" value="4" enum="Flags"> + <constant name="FLAG_MAX" value="3" enum="Flags"> </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> </constant> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 6d115e2650..12a176589c 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -39,8 +39,6 @@ </member> <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> </member> - <member name="anim_loop" type="bool" setter="set_particle_flag" getter="get_particle_flag"> - </member> <member name="anim_offset" type="float" setter="set_param" getter="get_param"> </member> <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> @@ -125,11 +123,11 @@ </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> </member> - <member name="scale" type="float" setter="set_param" getter="get_param"> + <member name="scale_amount" type="float" setter="set_param" getter="get_param"> </member> - <member name="scale_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> </member> - <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> + <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> </member> @@ -177,7 +175,7 @@ </constant> <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags"> </constant> - <constant name="FLAG_MAX" value="2" enum="Flags"> + <constant name="FLAG_MAX" value="1" enum="Flags"> </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> </constant> diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index c7eb365891..e56fb63dc5 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -35,6 +35,12 @@ <description> </description> </method> + <method name="get_frustum" qualifiers="const"> + <return type="Array"> + </return> + <description> + </description> + </method> <method name="is_position_behind" qualifiers="const"> <return type="bool"> </return> @@ -138,7 +144,7 @@ The culling mask that describes which 3D render layers are rendered by this camera. </member> <member name="current" type="bool" setter="set_current" getter="is_current"> - If [code]true[/code] the ancestor [Viewport] is currently using this Camera. Default value: [code]false[/code]. + If [code]true[/code], the ancestor [Viewport] is currently using this Camera. Default value: [code]false[/code]. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking"> If not [code]DOPPLER_TRACKING_DISABLED[/code] this Camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. Default value: [code]DOPPLER_TRACKING_DISABLED[/code]. diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 39cc1b84b3..fa907dd648 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -68,7 +68,7 @@ The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants. </member> <member name="current" type="bool" setter="_set_current" getter="is_current"> - If [code]true[/code] the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. + If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. </member> <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport"> The custom [Viewport] node attached to the [code]Camera2D[/code]. If null or not a [Viewport], uses the default viewport instead. @@ -77,7 +77,7 @@ Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> <member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled"> - If [code]true[/code] the camera only moves when reaching the horizontal drag margins. If [code]false[/code] the camera moves horizontally regardless of margins. Default value: [code]true[/code]. + If [code]true[/code], the camera only moves when reaching the horizontal drag margins. If [code]false[/code], the camera moves horizontally regardless of margins. Default value: [code]true[/code]. </member> <member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin"> Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. @@ -89,16 +89,16 @@ Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> <member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled"> - If [code]true[/code] the camera only moves when reaching the vertical drag margins. If [code]false[/code] the camera moves vertically regardless of margins. Default value: [code]true[/code]. + If [code]true[/code], the camera only moves when reaching the vertical drag margins. If [code]false[/code], the camera moves vertically regardless of margins. Default value: [code]true[/code]. </member> <member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled"> - If [code]true[/code] draws the camera's drag margin rectangle in the editor. Default value: [code]false[/code] + If [code]true[/code], draws the camera's drag margin rectangle in the editor. Default value: [code]false[/code] </member> <member name="editor_draw_limits" type="bool" setter="set_limit_drawing_enabled" getter="is_limit_drawing_enabled"> - If [code]true[/code] draws the camera's limits rectangle in the editor. Default value: [code]true[/code] + If [code]true[/code], draws the camera's limits rectangle in the editor. Default value: [code]true[/code] </member> <member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled"> - If [code]true[/code] draws the camera's screen rectangle in the editor. Default value: [code]false[/code] + If [code]true[/code], draws the camera's screen rectangle in the editor. Default value: [code]false[/code] </member> <member name="limit_bottom" type="int" setter="set_limit" getter="get_limit"> Bottom scroll limit in pixels. The camera stops moving when reaching this value. @@ -110,7 +110,7 @@ Right scroll limit in pixels. The camera stops moving when reaching this value. </member> <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled"> - If [code]true[/code] the camera smoothly stops when reaches its limits. Default value: [code]false[/code] + If [code]true[/code], the camera smoothly stops when reaches its limits. Default value: [code]false[/code] </member> <member name="limit_top" type="int" setter="set_limit" getter="get_limit"> Top scroll limit in pixels. The camera stops moving when reaching this value. @@ -124,11 +124,13 @@ <member name="offset_v" type="float" setter="set_v_offset" getter="get_v_offset"> The vertical offset of the camera, relative to the drag margins. Default value: [code]0[/code] </member> + <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Camera2D.Camera2DProcessMode"> + </member> <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating"> - If [code]true[/code] the camera rotates with the target. Default value: [code]false[/code] + If [code]true[/code], the camera rotates with the target. Default value: [code]false[/code] </member> <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled"> - If [code]true[/code] the camera smoothly moves towards the target at [member smoothing_speed]. Default value: [code]false[/code] + If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed]. Default value: [code]false[/code] </member> <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing"> Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code] @@ -144,5 +146,9 @@ <constant name="ANCHOR_MODE_DRAG_CENTER" value="1" enum="AnchorMode"> The camera's position takes into account vertical/horizontal offsets and the screen size. </constant> + <constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessMode"> + </constant> + <constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessMode"> + </constant> </constants> </class> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 60f097f3f9..0ec28f93a7 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -11,8 +11,8 @@ Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/2d_transforms.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/custom_drawing_in_2d.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> </tutorials> <demos> </demos> @@ -135,7 +135,7 @@ <method name="draw_multimesh"> <return type="void"> </return> - <argument index="0" name="mesh" type="Mesh"> + <argument index="0" name="multimesh" type="MultiMesh"> </argument> <argument index="1" name="texture" type="Texture"> </argument> @@ -497,7 +497,7 @@ <return type="void"> </return> <description> - Show the CanvasItem currently hidden. + Show the CanvasItem currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple popup*() functions instead. </description> </method> <method name="update"> @@ -522,16 +522,16 @@ The color applied to textures on this [code]CanvasItem[/code]. This is not inherited by children [code]CanvasItem[/code]s. Default value: [code]Color(1, 1, 1, 1)[/code] (opaque "white").. </member> <member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled"> - If [code]true[/code] the object draws behind its parent. Default value: [code]false[/code]. + If [code]true[/code], the object draws behind its parent. Default value: [code]false[/code]. </member> <member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top"> - If [code]true[/code] the object draws on top of its parent. Default value: [code]true[/code]. + If [code]true[/code], the object draws on top of its parent. Default value: [code]true[/code]. </member> <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material"> - If [code]true[/code] the parent [code]CanvasItem[/code]'s [member material] property is used as this one's material. Default value: [code]false[/code]. + If [code]true[/code], the parent [code]CanvasItem[/code]'s [member material] property is used as this one's material. Default value: [code]false[/code]. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible"> - If [code]true[/code] this [code]CanvasItem[/code] is drawn. Default value: [code]true[/code]. + If [code]true[/code], this [code]CanvasItem[/code] is drawn. Default value: [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple popup*() functions instead. </member> </members> <signals> diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml index fe7194dcfe..69d873f446 100644 --- a/doc/classes/CanvasItemMaterial.xml +++ b/doc/classes/CanvasItemMaterial.xml @@ -19,6 +19,14 @@ <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" enum="CanvasItemMaterial.LightMode"> The manner in which material reacts to lighting. </member> + <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> + </member> + <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop"> + </member> + <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> + </member> + <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation"> + </member> </members> <constants> <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode"> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index d4412e15c9..c39b47ab07 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -7,8 +7,8 @@ Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [code]CanvasLayer[/code] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [code]CanvasLayer[/code] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/2d_transforms.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/canvas_layers.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/canvas_layers.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml index 41c8cf7100..93c4208765 100644 --- a/doc/classes/CenterContainer.xml +++ b/doc/classes/CenterContainer.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left"> - If [code]true[/code] centers children relative to the [code]CenterContainer[/code]'s top left corner. Default value: [code]false[/code]. + If [code]true[/code], centers children relative to the [code]CenterContainer[/code]'s top left corner. Default value: [code]false[/code]. </member> </members> <constants> diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml index 5e4e740498..f702fbadbb 100644 --- a/doc/classes/CollisionObject.xml +++ b/doc/classes/CollisionObject.xml @@ -57,7 +57,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - If [code]true[/code] the shape owner and its shapes are disabled. + If [code]true[/code], the shape owner and its shapes are disabled. </description> </method> <method name="remove_shape_owner"> @@ -166,7 +166,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]true[/code] disables the given shape owner. + If [code]true[/code], disables the given shape owner. </description> </method> <method name="shape_owner_set_transform"> @@ -183,10 +183,10 @@ </methods> <members> <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag"> - If [code]true[/code] the [code]CollisionObject[/code] will continue to receive input events as the mouse is dragged across its shapes. Default value: [code]false[/code]. + If [code]true[/code], the [code]CollisionObject[/code] will continue to receive input events as the mouse is dragged across its shapes. Default value: [code]false[/code]. </member> <member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable"> - If [code]true[/code] the [CollisionObject]'s shapes will respond to [RayCast]s. Default value: [code]true[/code]. + If [code]true[/code], the [CollisionObject]'s shapes will respond to [RayCast]s. Default value: [code]true[/code]. </member> </members> <signals> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index b507204f0d..91f283a2b7 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -40,6 +40,14 @@ Returns the object's [RID]. </description> </method> + <method name="get_shape_owner_one_way_collision_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="owner_id" type="int"> + </argument> + <description> + </description> + </method> <method name="get_shape_owners"> <return type="Array"> </return> @@ -53,7 +61,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> - If [code]true[/code] the shape owner and its shapes are disabled. + If [code]true[/code], the shape owner and its shapes are disabled. </description> </method> <method name="is_shape_owner_one_way_collision_enabled" qualifiers="const"> @@ -171,7 +179,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]true[/code] disables the given shape owner. + If [code]true[/code], disables the given shape owner. </description> </method> <method name="shape_owner_set_one_way_collision"> @@ -185,6 +193,16 @@ If [code]enable[/code] is [code]true[/code], collisions for the shape owner originating from this [code]CollisionObject2D[/code] will not be reported to collided with [code]CollisionObject2D[/code]s. </description> </method> + <method name="shape_owner_set_one_way_collision_margin"> + <return type="void"> + </return> + <argument index="0" name="owner_id" type="int"> + </argument> + <argument index="1" name="margin" type="float"> + </argument> + <description> + </description> + </method> <method name="shape_owner_set_transform"> <return type="void"> </return> @@ -199,7 +217,7 @@ </methods> <members> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable"> - If [code]true[/code] this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. + If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. </member> </members> <signals> diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml index 28e9ba4217..0b4f07578e 100644 --- a/doc/classes/CollisionPolygon.xml +++ b/doc/classes/CollisionPolygon.xml @@ -20,7 +20,7 @@ If true, no collision will be produced. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - Array of vertices which define the polygon. + Array of vertices which define the polygon. Note that the returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. </member> </members> <constants> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index 5b940e7ff1..e754a2f2d1 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -17,13 +17,15 @@ Collision build mode. Use one of the [code]BUILD_*[/code] constants. Default value: [code]BUILD_SOLIDS[/code]. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> - If [code]true[/code] no collisions will be detected. + If [code]true[/code], no collisions will be detected. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> - If [code]true[/code] only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. + If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. + </member> + <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin"> </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - The polygon's list of vertices. The final point will be connected to the first. + The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference. </member> </members> <constants> diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml index 5639c14192..740a6b7ab1 100644 --- a/doc/classes/CollisionShape.xml +++ b/doc/classes/CollisionShape.xml @@ -7,7 +7,7 @@ Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject.shape_owner_get_shape] to get the actual shape. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index 713cb8d098..07dbde1c21 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -7,7 +7,7 @@ Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <demos> </demos> @@ -20,6 +20,8 @@ <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> Sets whether this collision shape should only detect collision on one side (top or bottom). </member> + <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin"> + </member> <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> The actual shape owned by this collision shape. </member> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 82a10fbaa4..68f5734491 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -19,11 +19,6 @@ </argument> <description> Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. See also [method @GDScript.ColorN]. - The following string formats are supported: - [code]"#ff00ff00"[/code] - ARGB format with '#' - [code]"ff00ff00"[/code] - ARGB format - [code]"#ff00ff"[/code] - RGB format with '#' - [code]"ff00ff"[/code] - RGB format [codeblock] # Each of the following creates the same color RGBA(178, 217, 10, 255) var c1 = Color("#ffb2d90a") # ARGB format with '#' @@ -57,7 +52,7 @@ <description> Constructs a color from an RGB profile using values between 0 and 1. Alpha will always be 1. [codeblock] - var c = Color(0.2, 1.0, .7) # Equivalent to RGBA(51, 255, 178, 255) + var c = Color(0.2, 1.0, 0.7) # Equivalent to RGBA(51, 255, 178, 255) [/codeblock] </description> </method> @@ -75,7 +70,7 @@ <description> Constructs a color from an RGBA profile using values between 0 and 1. [codeblock] - var c = Color(0.2, 1.0, .7, .8) # Equivalent to RGBA(51, 255, 178, 204) + var c = Color(0.2, 1.0, 0.7, 0.8) # Equivalent to RGBA(51, 255, 178, 204) [/codeblock] </description> </method> @@ -88,8 +83,8 @@ Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values. [codeblock] var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50% - var fg = Color(1.0, 0.0, 0.0, .5) # Red with alpha of 50% - var blendedColor = bg.blend(fg) # Brown with alpha of 75% + var fg = Color(1.0, 0.0, 0.0, 0.5) # Red with alpha of 50% + var blended_color = bg.blend(fg) # Brown with alpha of 75% [/codeblock] </description> </method> @@ -99,8 +94,8 @@ <description> Returns the most contrasting color. [codeblock] - var c = Color(.3, .4, .9) - var contrastedColor = c.contrasted() # Equivalent to RGBA(204, 229, 102, 255) + var c = Color(0.3, 0.4, 0.9) + var contrasted_color = c.contrasted() # Equivalent to RGBA(204, 229, 102, 255) [/codeblock] </description> </method> @@ -110,7 +105,7 @@ <argument index="0" name="amount" type="float"> </argument> <description> - Returns a new color resulting from making this color darker by the specified percentage (0-1). + Returns a new color resulting from making this color darker by the specified percentage (ratio from 0 to 1). [codeblock] var green = Color(0.0, 1.0, 0.0) var darkgreen = green.darkened(0.2) # 20% darker than regular green @@ -140,7 +135,7 @@ </return> <description> Returns the color's grayscale representation. - The gray is calculated by [code](r + g + b) / 3[/code]. + The gray value is calculated as [code](r + g + b) / 3[/code]. [codeblock] var c = Color(0.2, 0.45, 0.82) var gray = c.gray() # a value of 0.466667 @@ -153,8 +148,8 @@ <description> Returns the inverted color [code](1 - r, 1 - g, 1 - b, 1 - a)[/code]. [codeblock] - var c = Color(.3, .4, .9) - var invertedColor = c.inverted() # a color of an RGBA(178, 153, 26, 255) + var c = Color(0.3, 0.4, 0.9) + var inverted_color = c.inverted() # a color of an RGBA(178, 153, 26, 255) [/codeblock] </description> </method> @@ -164,7 +159,7 @@ <argument index="0" name="amount" type="float"> </argument> <description> - Returns a new color resulting from making this color lighter by the specified percentage (0-1). + Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1). [codeblock] var green = Color(0.0, 1.0, 0.0) var lightgreen = green.lightened(0.2) # 20% lighter than regular green @@ -179,7 +174,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the linear interpolation with another color. The value t is between 0 and 1. + Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1. [codeblock] var c1 = Color(1.0, 0.0, 0.0) var c2 = Color(0.0, 1.0, 0.0) @@ -193,7 +188,7 @@ <description> Returns the color's 32-bit integer in ABGR format (each byte represents a component of the ABGR profile). ABGR is the reversed version of the default format. [codeblock] - var c = Color(1, .5, .2) + var c = Color(1, 0.5, 0.2) print(c.to_abgr32()) # Prints 4281565439 [/codeblock] </description> @@ -204,7 +199,7 @@ <description> Returns the color's 64-bit integer in ABGR format (each word represents a component of the ABGR profile). ABGR is the reversed version of the default format. [codeblock] - var c = Color(1, .5, .2) + var c = Color(1, 0.5, 0.2) print(c.to_abgr64()) # Prints -225178692812801 [/codeblock] </description> @@ -215,7 +210,7 @@ <description> Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). ARGB is more compatible with DirectX. [codeblock] - var c = Color(1, .5, .2) + var c = Color(1, 0.5, 0.2) print(c.to_argb32()) # Prints 4294934323 [/codeblock] </description> @@ -226,7 +221,7 @@ <description> Returns the color's 64-bit integer in ARGB format (each word represents a component of the ARGB profile). ARGB is more compatible with DirectX. [codeblock] - var c = Color(1, .5, .2) + var c = Color(1, 0.5, 0.2) print(c.to_argb64()) # Prints -2147470541 [/codeblock] </description> @@ -240,7 +235,7 @@ Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]). Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string. [codeblock] - var c = Color(1, 1, 1, .5) + var c = Color(1, 1, 1, 0.5) var s1 = c.to_html() # Results "7fffffff" var s2 = c.to_html(false) # Results 'ffffff' [/codeblock] @@ -252,7 +247,7 @@ <description> Returns the color's 32-bit integer in RGBA format (each byte represents a component of the RGBA profile). RGBA is Godot's default format. [codeblock] - var c = Color(1, .5, .2) + var c = Color(1, 0.5, 0.2) print(c.to_rgba32()) # Prints 4286526463 [/codeblock] </description> @@ -263,7 +258,7 @@ <description> Returns the color's 64-bit integer in RGBA format (each word represents a component of the RGBA profile). RGBA is Godot's default format. [codeblock] - var c = Color(1, .5, .2) + var c = Color(1, 0.5, 0.2) print(c.to_rgba64()) # Prints -140736629309441 [/codeblock] </description> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 554e6b5632..dfe0492d0b 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -20,19 +20,35 @@ Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. Note: the presets list is only for [i]this[/i] color picker. </description> </method> + <method name="erase_preset"> + <return type="void"> + </return> + <argument index="0" name="color" type="Color"> + </argument> + <description> + Remove the given color from the list of color presets of this color picker. + </description> + </method> + <method name="get_presets" qualifiers="const"> + <return type="PoolColorArray"> + </return> + <description> + Return the list of colors in the presets of the color picker. + </description> + </method> </methods> <members> <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color"> The currently selected color. </member> <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode"> - If [code]true[/code] the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). + If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). </member> <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha"> - If [code]true[/code] shows an alpha channel slider (transparency). + If [code]true[/code], shows an alpha channel slider (transparency). </member> <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode"> - If [code]true[/code] allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). + If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). </member> </members> <signals> @@ -43,6 +59,20 @@ Emitted when the color is changed. </description> </signal> + <signal name="preset_added"> + <argument index="0" name="color" type="Color"> + </argument> + <description> + Emitted when a preset is added. + </description> + </signal> + <signal name="preset_removed"> + <argument index="0" name="color" type="Color"> + </argument> + <description> + Emitted when a preset is removed. + </description> + </signal> </signals> <constants> </constants> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 8bc6d05bd4..e1a6290161 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -31,7 +31,7 @@ The currently selected color. </member> <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha"> - If [code]true[/code] the alpha channel in the displayed [ColorPicker] will be visible. Default value: [code]true[/code]. + If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible. Default value: [code]true[/code]. </member> </members> <signals> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index a4709c1c86..703043294b 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -25,6 +25,7 @@ # Save the changes by overwriting the previous file config.save("user://settings.cfg") [/codeblock] + Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. </description> <tutorials> </tutorials> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index ee82afd592..0152cca957 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -9,12 +9,12 @@ [b]User Interface nodes and input[/b] Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it. Only one [code]Control[/code] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [code]Control[/code] nodes lose focus when another node grabs it, or if you hide the node in focus. - Set [member mouse_filter] to MOUSE_FILTER_IGNORE to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. + Set [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. [Theme] resources change the Control's appearance. If you change the [Theme] on a [code]Control[/code] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/gui/index.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/custom_drawing_in_2d.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> </tutorials> <demos> </demos> @@ -120,7 +120,7 @@ <argument index="1" name="stylebox" type="StyleBox"> </argument> <description> - Overrides the [code]name[/code] [Stylebox] in the [member theme] resource the node uses. If [code]stylebox[/code] is empty, Godot clears the override. + Overrides the [code]name[/code] [StyleBox] in the [member theme] resource the node uses. If [code]stylebox[/code] is empty, Godot clears the override. </description> </method> <method name="can_drop_data" qualifiers="virtual"> @@ -340,7 +340,7 @@ <return type="void"> </return> <description> - Steal the focus from another control and become the focused control (see [method set_focus_mode]). + Steal the focus from another control and become the focused control (see [member focus_mode]). </description> </method> <method name="has_color" qualifiers="const"> @@ -617,65 +617,74 @@ </methods> <members> <member name="anchor_bottom" type="float" setter="_set_anchor" getter="get_anchor"> - Anchors the bottom edge of the node to the origin, the center, or the end of its parent container. It changes how the bottom margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. + Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. Default value: [code]ANCHOR_BEGIN[/code]. </member> <member name="anchor_left" type="float" setter="_set_anchor" getter="get_anchor"> - Anchors the left edge of the node to the origin, the center or the end of its parent container. It changes how the left margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. + Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience.Default value: [code]ANCHOR_BEGIN[/code]. </member> <member name="anchor_right" type="float" setter="_set_anchor" getter="get_anchor"> - Anchors the right edge of the node to the origin, the center or the end of its parent container. It changes how the right margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. + Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. Default value: [code]ANCHOR_BEGIN[/code]. </member> <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor"> - Anchors the top edge of the node to the origin, the center or the end of its parent container. It changes how the top margin updates when the node moves or changes size. Use one of the [code]ANCHOR_*[/code] constants. Default value: [code]ANCHOR_BEGIN[/code]. + Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. Default value: [code]ANCHOR_BEGIN[/code]. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode"> The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals. </member> <member name="focus_neighbour_bottom" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> - Tells Godot which node it should give keyboard focus to if the user presses Tab, the down arrow on the keyboard, or down on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. - If the user presses Tab, Godot will give focus to the closest node to the right first, then to the bottom. If the user presses Shift+Tab, Godot will look to the left of the node, then above it. + Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [code]ui_down[/code] input action. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. </member> <member name="focus_neighbour_left" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> - Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the left arrow on the keyboard or left on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the left of this one. + Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the left of this one. </member> <member name="focus_neighbour_right" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> - Tells Godot which node it should give keyboard focus to if the user presses Tab, the right arrow on the keyboard or right on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. + Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. </member> <member name="focus_neighbour_top" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> - Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab, the top arrow on the keyboard or top on a gamepad. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. + Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [code]Control[/code]. If this property is not set, Godot will give focus to the closest [code]Control[/code] to the bottom of this one. </member> <member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next"> + Tells Godot which node it should give keyboard focus to if the user presses Tab on a keyboard by default. You can change the key by editing the [code]ui_focus_next[/code] input action. + If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. </member> <member name="focus_previous" type="NodePath" setter="set_focus_previous" getter="get_focus_previous"> + Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab on a keyboard by default. You can change the key by editing the [code]ui_focus_prev[/code] input action. + If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. </member> <member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection"> + Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. </member> <member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" enum="Control.GrowDirection"> + Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. </member> <member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip"> - Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments. + Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. </member> <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin"> - Distance between the node's bottom edge and its parent container, based on [member anchor_bottom]. - Margins are often controlled by one or multiple parent [Container] nodes. Margins update automatically when you move or resize the node. + Distance between the node's bottom edge and its parent control, based on [member anchor_bottom]. + Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node. </member> <member name="margin_left" type="float" setter="set_margin" getter="get_margin"> - Distance between the node's left edge and its parent container, based on [member anchor_left]. + Distance between the node's left edge and its parent control, based on [member anchor_left]. + Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node. </member> <member name="margin_right" type="float" setter="set_margin" getter="get_margin"> - Distance between the node's right edge and its parent container, based on [member anchor_right]. + Distance between the node's right edge and its parent control, based on [member anchor_right]. + Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node. </member> <member name="margin_top" type="float" setter="set_margin" getter="get_margin"> - Distance between the node's top edge and its parent container, based on [member anchor_top]. + Distance between the node's top edge and its parent control, based on [member anchor_top]. + Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node. </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape"> The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. [b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system. </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter"> - Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Use one of the [code]MOUSE_FILTER_*[/code] constants. See the constants to learn what each does. + Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does. </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents"> + Enables whether rendering of children should be clipped to this control's rectangle. If true, parts of a child which would be visibly outside of this control's rectangle will not be rendered. </member> <member name="rect_global_position" type="Vector2" setter="set_global_position" getter="get_global_position"> The node's global position, relative to the world (usually to the top-left corner of the window). @@ -786,17 +795,19 @@ Sent when the node loses focus. </constant> <constant name="NOTIFICATION_THEME_CHANGED" value="45"> - Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_*_override[/code] + Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_*_override[/code] methods. </constant> <constant name="NOTIFICATION_MODAL_CLOSE" value="46"> - Sent when an open modal dialog closes. See [member show_modal]. + Sent when an open modal dialog closes. See [method show_modal]. </constant> <constant name="NOTIFICATION_SCROLL_BEGIN" value="47"> + Sent when this node is inside a [ScrollContainer] which has begun being scrolled. </constant> <constant name="NOTIFICATION_SCROLL_END" value="48"> + Sent when this node is inside a [ScrollContainer] which has stopped being scrolled. </constant> <constant name="CURSOR_ARROW" value="0" enum="CursorShape"> - Show the system's arrow mouse cursor when the user hovers the node. Use with [method set_default_cursor_shape]. + Show the system's arrow mouse cursor when the user hovers the node. Use with [member mouse_default_cursor_shape]. </constant> <constant name="CURSOR_IBEAM" value="1" enum="CursorShape"> Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text. @@ -847,52 +858,52 @@ Show the system's help mouse cursor when the user hovers the node, a question mark. </constant> <constant name="PRESET_TOP_LEFT" value="0" enum="LayoutPreset"> - Snap all 4 anchors to the top-left of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the top-left of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_TOP_RIGHT" value="1" enum="LayoutPreset"> - Snap all 4 anchors to the top-right of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the top-right of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_BOTTOM_LEFT" value="2" enum="LayoutPreset"> - Snap all 4 anchors to the bottom-left of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_BOTTOM_RIGHT" value="3" enum="LayoutPreset"> - Snap all 4 anchors to the bottom-right of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER_LEFT" value="4" enum="LayoutPreset"> - Snap all 4 anchors to the center of the left edge of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER_TOP" value="5" enum="LayoutPreset"> - Snap all 4 anchors to the center of the top edge of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER_RIGHT" value="6" enum="LayoutPreset"> - Snap all 4 anchors to the center of the right edge of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER_BOTTOM" value="7" enum="LayoutPreset"> - Snap all 4 anchors to the center of the bottom edge of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_CENTER" value="8" enum="LayoutPreset"> - Snap all 4 anchors to the center of the parent container's bounds. Use with [method set_anchors_preset]. + Snap all 4 anchors to the center of the parent control's bounds. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_LEFT_WIDE" value="9" enum="LayoutPreset"> - Snap all 4 anchors to the left edge of the parent container. The left margin becomes relative to the left edge and the top margin relative to the top left corner of the node's parent. Use with [method set_anchors_preset]. + Snap all 4 anchors to the left edge of the parent control. The left margin becomes relative to the left edge and the top margin relative to the top left corner of the node's parent. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_TOP_WIDE" value="10" enum="LayoutPreset"> - Snap all 4 anchors to the top edge of the parent container. The left margin becomes relative to the top left corner, the top margin relative to the top edge, and the right margin relative to the top right corner of the node's parent. Use with [method set_anchors_preset]. + Snap all 4 anchors to the top edge of the parent control. The left margin becomes relative to the top left corner, the top margin relative to the top edge, and the right margin relative to the top right corner of the node's parent. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_RIGHT_WIDE" value="11" enum="LayoutPreset"> - Snap all 4 anchors to the right edge of the parent container. The right margin becomes relative to the right edge and the top margin relative to the top right corner of the node's parent. Use with [method set_anchors_preset]. + Snap all 4 anchors to the right edge of the parent control. The right margin becomes relative to the right edge and the top margin relative to the top right corner of the node's parent. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_BOTTOM_WIDE" value="12" enum="LayoutPreset"> - Snap all 4 anchors to the bottom edge of the parent container. The left margin becomes relative to the bottom left corner, the bottom margin relative to the bottom edge, and the right margin relative to the bottom right corner of the node's parent. Use with [method set_anchors_preset]. + Snap all 4 anchors to the bottom edge of the parent control. The left margin becomes relative to the bottom left corner, the bottom margin relative to the bottom edge, and the right margin relative to the bottom right corner of the node's parent. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_VCENTER_WIDE" value="13" enum="LayoutPreset"> - Snap all 4 anchors to a vertical line that cuts the parent container in half. Use with [method set_anchors_preset]. + Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_HCENTER_WIDE" value="14" enum="LayoutPreset"> - Snap all 4 anchors to a horizontal line that cuts the parent container in half. Use with [method set_anchors_preset]. + Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_WIDE" value="15" enum="LayoutPreset"> - Snap all 4 anchors to the respective corners of the parent container. Set all 4 margins to 0 after you applied this preset and the [code]Control[/code] will fit its parent container. Use with [method set_anchors_preset]. + Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the [code]Control[/code] will fit its parent control. This is equivalent to to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_MODE_MINSIZE" value="0" enum="LayoutPresetMode"> </constant> @@ -918,19 +929,22 @@ Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter"> - The control will receive mouse button input events through [method _gui_input] if clicked on. These events are automatically marked as handled and they will not propagate further to other controls. + The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled and they will not propagate further to other controls. This also results in blocking signals in other controls. </constant> <constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter"> - The control will receive mouse button input events through [method _gui_input] if clicked on. If this control does not handle the event, the parent control (if any) will be considered for a mouse click, and so on until there is no more parent control to potentially handle it. Even if no control handled it at all, the event will still be handled automatically. + The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. </constant> <constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter"> - The control will not receive mouse button input events through [method _gui_input] and will not block other controls from receiving these events. These events will also not be handled automatically. + The control will not receive mouse button input events through [method _gui_input]. Also the control will not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. </constant> <constant name="GROW_DIRECTION_BEGIN" value="0" enum="GrowDirection"> + The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. </constant> <constant name="GROW_DIRECTION_END" value="1" enum="GrowDirection"> + The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis. </constant> <constant name="GROW_DIRECTION_BOTH" value="2" enum="GrowDirection"> + The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size. </constant> <constant name="ANCHOR_BEGIN" value="0" enum="Anchor"> Snaps one of the 4 anchor's sides to the origin of the node's [code]Rect[/code], in the top left. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset]. diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index 6b31149c2f..8210e7dc9c 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -18,7 +18,7 @@ <argument index="0" name="point_cloud" type="PoolVector2Array"> </argument> <description> - Currently, this method does nothing. + Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry.convex_hull_2d] for details. </description> </method> </methods> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index ab9b27542c..dd80ec8e8f 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -24,8 +24,8 @@ <argument index="3" name="at_position" type="int" default="-1"> </argument> <description> - Adds a point to a curve, at "position", with control points "in" and "out". - If "at_position" is given, the point is inserted before the point number "at_position", moving that point (and every point after) after the inserted point. If "at_position" is not given, or is an illegal value (at_position <0 or at_position >= [method get_point_count]), the point will be appended at the end of the point list. + Adds a point to a curve, at [code]position[/code], with control points [code]in[/code] and [code]out[/code]. + If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. </description> </method> <method name="clear_points"> @@ -39,7 +39,7 @@ <return type="float"> </return> <description> - Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough. + Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough. </description> </method> <method name="get_baked_points" qualifiers="const"> @@ -82,7 +82,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + Returns the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="get_point_out" qualifiers="const"> @@ -91,7 +91,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + Returns the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="get_point_position" qualifiers="const"> @@ -100,7 +100,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="interpolate" qualifiers="const"> @@ -111,8 +111,8 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. - If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0). + Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results. + If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="interpolate_baked" qualifiers="const"> @@ -123,8 +123,8 @@ <argument index="1" name="cubic" type="bool" default="false"> </argument> <description> - Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve. - To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. + Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a pixel distance along the curve. + To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to true, or linear if set to false. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). </description> </method> @@ -134,7 +134,7 @@ <argument index="0" name="fofs" type="float"> </argument> <description> - Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t". + Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code]. </description> </method> <method name="remove_point"> @@ -143,7 +143,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. + Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds. </description> </method> <method name="set_point_in"> @@ -154,7 +154,7 @@ <argument index="1" name="position" type="Vector2"> </argument> <description> - Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. + Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="set_point_out"> @@ -165,7 +165,7 @@ <argument index="1" name="position" type="Vector2"> </argument> <description> - Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. + Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="set_point_position"> @@ -176,7 +176,7 @@ <argument index="1" name="position" type="Vector2"> </argument> <description> - Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. + Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="tessellate" qualifiers="const"> @@ -189,8 +189,8 @@ <description> Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. - "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! - "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + [code]max_stages[/code] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + [code]tolerance_degrees[/code] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. </description> </method> </methods> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index c3ee309f0b..e9ee1c6974 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -24,8 +24,8 @@ <argument index="3" name="at_position" type="int" default="-1"> </argument> <description> - Adds a point to a curve, at "position", with control points "in" and "out". - If "at_position" is given, the point is inserted before the point number "at_position", moving that point (and every point after) after the inserted point. If "at_position" is not given, or is an illegal value (at_position <0 or at_position >= [method get_point_count]), the point will be appended at the end of the point list. + Adds a point to a curve, at [code]position[/code], with control points [code]in[/code] and [code]out[/code]. + If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. </description> </method> <method name="clear_points"> @@ -39,7 +39,7 @@ <return type="float"> </return> <description> - Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough. + Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough. </description> </method> <method name="get_baked_points" qualifiers="const"> @@ -53,7 +53,7 @@ <return type="PoolRealArray"> </return> <description> - Returns the cache of tilts as a [RealArray]. + Returns the cache of tilts as a [PoolRealArray]. </description> </method> <method name="get_baked_up_vectors" qualifiers="const"> @@ -70,7 +70,7 @@ <argument index="0" name="to_point" type="Vector3"> </argument> <description> - Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in one of the interpolate_baked* methods. + Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked] or [method interpolate_baked_up_vector]. [code]to_point[/code] must be in this curve's local space. </description> </method> @@ -97,7 +97,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + Returns the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_out" qualifiers="const"> @@ -106,7 +106,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + Returns the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_position" qualifiers="const"> @@ -115,7 +115,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_tilt" qualifiers="const"> @@ -124,7 +124,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0. + Returns the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code]0[/code]. </description> </method> <method name="interpolate" qualifiers="const"> @@ -135,8 +135,8 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. - If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0). + Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results. + If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="interpolate_baked" qualifiers="const"> @@ -147,8 +147,8 @@ <argument index="1" name="cubic" type="bool" default="false"> </argument> <description> - Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve. - To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. + Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a pixel distance along the curve. + To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to true, or linear if set to false. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). </description> </method> @@ -162,7 +162,7 @@ <description> Returns an up vector within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve. To do that, it finds the two cached up vectors where the [code]offset[/code] lies between, then interpolates the values. If [code]apply_tilt[/code] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector. - If the curve has no up vectors, the function sends an error to the console, and returns (0, 1, 0). + If the curve has no up vectors, the function sends an error to the console, and returns [code](0, 1, 0)[/code]. </description> </method> <method name="interpolatef" qualifiers="const"> @@ -171,7 +171,7 @@ <argument index="0" name="fofs" type="float"> </argument> <description> - Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t". + Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code]. </description> </method> <method name="remove_point"> @@ -180,7 +180,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. + Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds. </description> </method> <method name="set_point_in"> @@ -191,7 +191,7 @@ <argument index="1" name="position" type="Vector3"> </argument> <description> - Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. + Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="set_point_out"> @@ -202,7 +202,7 @@ <argument index="1" name="position" type="Vector3"> </argument> <description> - Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. + Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="set_point_position"> @@ -213,7 +213,7 @@ <argument index="1" name="position" type="Vector3"> </argument> <description> - Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. + Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="set_point_tilt"> @@ -224,8 +224,8 @@ <argument index="1" name="tilt" type="float"> </argument> <description> - Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console. - The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow] or [OrientedPathFollow], this tilt is an offset over the natural tilt the [PathFollow] or [OrientedPathFollow] calculates. + Sets the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. + The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the [PathFollow] calculates. </description> </method> <method name="tessellate" qualifiers="const"> @@ -238,8 +238,8 @@ <description> Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. - "max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! - "tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + [code]max_stages[/code] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + [code]tolerance_degrees[/code] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. </description> </method> </methods> @@ -248,7 +248,7 @@ The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. </member> <member name="up_vector_enabled" type="bool" setter="set_up_vector_enabled" getter="is_up_vector_enabled"> - If [code]true[/code], the curve will bake up vectors used for orientation. See [OrientedPathFollow]. Changing it forces the cache to be recomputed. + If [code]true[/code], the curve will bake up vectors used for orientation. This is used when a [member PathFollow.rotation_mode] is set to [code]ROTATION_ORIENTED[/code], see [PathFollow] for details. Changing it forces the cache to be recomputed. </member> </members> <constants> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 06c996e13e..9c78853cfe 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -5,6 +5,7 @@ </brief_description> <description> Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. + Erasing elements while iterating over them [b]is not supported[/b]. </description> <tutorials> </tutorials> @@ -38,7 +39,18 @@ <argument index="0" name="key" type="Variant"> </argument> <description> - Erase a dictionary key/value pair by key. + Erase a dictionary key/value pair by key. Do not erase elements while iterating over the dictionary. + </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"> diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml index 2dc522083d..4a2802ffa4 100644 --- a/doc/classes/DirectionalLight.xml +++ b/doc/classes/DirectionalLight.xml @@ -7,7 +7,7 @@ A directional light is a type of [Light] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored. Only the basis is used do determine light direction. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/lights_and_shadows.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> <demos> </demos> @@ -18,7 +18,7 @@ Amount of extra bias for shadow splits that are far away. If self shadowing occurs only on the splits far away, this value can fix them. </member> <member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled"> - If [code]true[/code] shadow detail is sacrificed in exchange for smoother transitions between splits. Default value:[code]false[/code]. + If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. Default value:[code]false[/code]. </member> <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange"> Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange]. @@ -33,13 +33,13 @@ Can be used to fix special cases of self shadowing when objects are perpendicular to the light. </member> <member name="directional_shadow_split_1" type="float" setter="set_param" getter="get_param"> - The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used in [enum directional_shadow_mode] SHADOW_PARALLEL_*_SPLITS. + The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is one of the [code]SHADOW_PARALLEL_*_SPLITS[/code] constants. </member> <member name="directional_shadow_split_2" type="float" setter="set_param" getter="get_param"> - The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used in [enum directional_shadow_mode] SHADOW_PARALLEL_*_SPLITS. + The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_3_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code]. </member> <member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param"> - The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used in [enum directional_shadow_mode] SHADOW_PARALLEL_4_SPLITS. + The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_4_SPLITS[/code]. </member> </members> <constants> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index d8ad208fa7..57301f954f 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -23,7 +23,7 @@ [/codeblock] </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/getting_started/step_by_step/filesystem.html</link> + <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 2e2904c16c..249d0955f2 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -81,10 +81,10 @@ The font size. </member> <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter"> - If [code]true[/code] filtering is used. + If [code]true[/code], filtering is used. </member> <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps"> - If [code]true[/code] mipmapping is used. + If [code]true[/code], mipmapping is used. </member> </members> <constants> diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml index 7b34d02316..5fcccf7db9 100644 --- a/doc/classes/DynamicFontData.xml +++ b/doc/classes/DynamicFontData.xml @@ -13,6 +13,9 @@ <methods> </methods> <members> + <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased"> + Controls whether the font should be rendered with anti-aliasing. + </member> <member name="font_path" type="String" setter="set_font_path" getter="get_font_path"> The path to the vector font file. </member> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index fed9e264db..fc5a26fc33 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -55,7 +55,7 @@ The file system path in the address bar. </member> <member name="disable_overwrite_warning" type="bool" setter="set_disable_overwrite_warning" getter="is_overwrite_warning_disabled"> - If [code]true[/code] the [code]EditorFileDialog[/code] will not warn the user before overwriting files. + If [code]true[/code], the [code]EditorFileDialog[/code] will not warn the user before overwriting files. </member> <member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode"> The view format in which the [code]EditorFileDialog[/code] displays resources to the user. @@ -64,7 +64,7 @@ The purpose of the [code]EditorFileDialog[/code]. Changes allowed behaviors. </member> <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files"> - If [code]true[/code] hidden files and directories will be visible in the [code]EditorFileDialog[/code]. + If [code]true[/code], hidden files and directories will be visible in the [code]EditorFileDialog[/code]. </member> </members> <signals> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 5a8b506f9e..91e5bd81c3 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -93,6 +93,12 @@ Remitted if a resource is reimported. </description> </signal> + <signal name="resources_reload"> + <argument index="0" name="resources" type="PoolStringArray"> + </argument> + <description> + </description> + </signal> <signal name="sources_changed"> <argument index="0" name="exist" type="bool"> </argument> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index aaba30ccc9..9005d4a765 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -5,7 +5,7 @@ </brief_description> <description> EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin]. - EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extension] and [method get_resource_type]). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory. + EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory. Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec": [codeblock] tool @@ -35,7 +35,7 @@ func get_import_options(i): return [{"name": "my_option", "default_value": false}] - func import(source_file, save_path, options, r_platform_variants, r_gen_files): + func import(source_file, save_path, options, platform_variants, gen_files): var file = File.new() if file.open(source_file, File.READ) != OK: return FAILED @@ -49,7 +49,7 @@ [/codeblock] </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/plugins/editor/import_plugins.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link> </tutorials> <demos> </demos> @@ -60,7 +60,7 @@ <argument index="0" name="preset" type="int"> </argument> <description> - Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: "name", "default_value", "property_hint" (optional), "hint_string" (optional), "usage" (optional). + Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional). </description> </method> <method name="get_import_order" qualifiers="virtual"> @@ -114,14 +114,14 @@ <return type="Array"> </return> <description> - Get the list of file extensions to associate with this loader (case insensitive). e.g. ["obj"]. + Get the list of file extensions to associate with this loader (case insensitive). e.g. [code]["obj"][/code]. </description> </method> <method name="get_resource_type" qualifiers="virtual"> <return type="String"> </return> <description> - Get the Godot resource type associated with this loader. e.g. "Mesh" or "Animation". + Get the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code]. </description> </method> <method name="get_save_extension" qualifiers="virtual"> @@ -147,9 +147,9 @@ </argument> <argument index="2" name="options" type="Dictionary"> </argument> - <argument index="3" name="r_platform_variants" type="Array"> + <argument index="3" name="platform_variants" type="Array"> </argument> - <argument index="4" name="r_gen_files" type="Array"> + <argument index="4" name="gen_files" type="Array"> </argument> <description> </description> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index a2a39fc8b6..5601f9b5ae 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -41,6 +41,14 @@ <description> </description> </signal> + <signal name="property_toggled"> + <argument index="0" name="property" type="String"> + </argument> + <argument index="1" name="checked" type="bool"> + </argument> + <description> + </description> + </signal> <signal name="resource_selected"> <argument index="0" name="res" type="Object"> </argument> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index f073c5e40b..c7b81d7c75 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -159,7 +159,7 @@ <method name="select_file"> <return type="void"> </return> - <argument index="0" name="p_file" type="String"> + <argument index="0" name="file" type="String"> </argument> <description> </description> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index ac139f18c9..bcf6d3009c 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -7,7 +7,7 @@ Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. Also see [EditorScript] to add functions to the editor. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/development/plugins/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/index.html</link> </tutorials> <demos> </demos> @@ -110,6 +110,14 @@ <description> </description> </method> + <method name="add_spatial_gizmo_plugin"> + <return type="void"> + </return> + <argument index="0" name="plugin" type="EditorSpatialGizmoPlugin"> + </argument> + <description> + </description> + </method> <method name="add_tool_menu_item"> <return type="void"> </return> @@ -157,6 +165,12 @@ Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene. </description> </method> + <method name="disable_plugin" qualifiers="virtual"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="edit" qualifiers="virtual"> <return type="void"> </return> @@ -166,6 +180,12 @@ This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. </description> </method> + <method name="enable_plugin" qualifiers="virtual"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="forward_canvas_draw_over_viewport" qualifiers="virtual"> <return type="void"> </return> @@ -394,6 +414,14 @@ <description> </description> </method> + <method name="remove_spatial_gizmo_plugin"> + <return type="void"> + </return> + <argument index="0" name="plugin" type="EditorSpatialGizmoPlugin"> + </argument> + <description> + </description> + </method> <method name="remove_tool_menu_item"> <return type="void"> </return> @@ -453,7 +481,7 @@ <argument index="0" name="screen_name" type="String"> </argument> <description> - Emitted when user change the workspace (2D, 3D, Script, AssetLib). Also works with custom screens defined by plugins. + Emitted when user changes the workspace (2D, 3D, Script, AssetLib). Also works with custom screens defined by plugins. </description> </signal> <signal name="resource_saved"> @@ -466,14 +494,14 @@ <argument index="0" name="scene_root" type="Node"> </argument> <description> - Emitted when user change scene. The argument is a root node of freshly opened scene. + Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be null. </description> </signal> <signal name="scene_closed"> <argument index="0" name="filepath" type="String"> </argument> <description> - Emitted when user close scene. The argument is file path to a closed scene. + Emitted when user closes a scene. The argument is file path to a closed scene. </description> </signal> </signals> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 7d09554330..b3fc036edb 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -9,6 +9,20 @@ <demos> </demos> <methods> + <method name="emit_changed"> + <return type="void"> + </return> + <argument index="0" name="property" type="String"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <argument index="2" name="field" type="String" default=""""> + </argument> + <argument index="3" name="changing" type="bool" default="false"> + </argument> + <description> + </description> + </method> <method name="get_edited_object"> <return type="Object"> </return> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 76c105dd25..e69f3b0119 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -20,13 +20,13 @@ func iterate(node): if node != null: - node.name = "modified_"+node.name + node.name = "modified_" + node.name for child in node.get_children(): iterate(child) [/codeblock] </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script</link> + <link>https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script</link> </tutorials> <demos> </demos> diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index 2081ae7a4d..0bec11e183 100644 --- a/doc/classes/EditorSpatialGizmo.xml +++ b/doc/classes/EditorSpatialGizmo.xml @@ -4,7 +4,7 @@ Custom gizmo for editing Spatial objects. </brief_description> <description> - Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. These are created by [method EditorPlugin.create_spatial_gizmo]. + Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See [EditorSpatialGizmoPlugin] for more information. </description> <tutorials> </tutorials> @@ -66,6 +66,8 @@ </argument> <argument index="2" name="skeleton" type="RID"> </argument> + <argument index="3" name="material" type="Material" default="null"> + </argument> <description> </description> </method> @@ -116,7 +118,30 @@ <argument index="0" name="index" type="int"> </argument> <description> - Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle] + Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]. + </description> + </method> + <method name="get_plugin" qualifiers="const"> + <return type="EditorSpatialGizmoPlugin"> + </return> + <description> + Return the [EditorSpatialGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorSpatialGizmoPlugin.get_material]. + </description> + </method> + <method name="get_spatial_node" qualifiers="const"> + <return type="Spatial"> + </return> + <description> + Returns the Spatial node associated with this gizmo. + </description> + </method> + <method name="is_handle_highlighted" qualifiers="virtual"> + <return type="bool"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Get whether a handle is highlighted or not. </description> </method> <method name="redraw" qualifiers="virtual"> diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml new file mode 100644 index 0000000000..a6c0413c19 --- /dev/null +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -0,0 +1,194 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorSpatialGizmoPlugin" inherits="Resource" category="Core" version="3.1"> + <brief_description> + Used by the editor to define Spatial gizmo types. + </brief_description> + <description> + EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorSpatialGizmoPlugin] for the simpler gizmos, or creating a new [EditorSpatialGizmo] type. See the tutorial in the documentation for more info. + </description> + <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link> + </tutorials> + <demos> + </demos> + <methods> + <method name="add_material"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="material" type="SpatialMaterial"> + </argument> + <description> + Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. + </description> + </method> + <method name="can_be_hidden" qualifiers="virtual"> + <return type="bool"> + </return> + <description> + Override this method to define whether the gizmo can be hidden or not. Defaults to true. + </description> + </method> + <method name="commit_handle" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="gizmo" type="EditorSpatialGizmo"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <argument index="2" name="restore" type="Variant"> + </argument> + <argument index="3" name="cancel" type="bool" default="false"> + </argument> + <description> + Override this method to commit gizmo handles. Called for this plugin's active gizmos. + </description> + </method> + <method name="create_gizmo" qualifiers="virtual"> + <return type="EditorSpatialGizmo"> + </return> + <argument index="0" name="spatial" type="Spatial"> + </argument> + <description> + Override this method to return a custom [EditorSpatialGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. (See also [method has_gizmo]) + </description> + </method> + <method name="create_handle_material"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="billboard" type="bool" default="false"> + </argument> + <description> + Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_handles]. Should not be overridden. + </description> + </method> + <method name="create_icon_material"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="texture" type="Texture"> + </argument> + <argument index="2" name="on_top" type="bool" default="false"> + </argument> + <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> + <description> + Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_unscaled_billboard]. Should not be overridden. + </description> + </method> + <method name="create_material"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <argument index="2" name="billboard" type="bool" default="false"> + </argument> + <argument index="3" name="on_top" type="bool" default="false"> + </argument> + <argument index="4" name="use_vertex_color" type="bool" default="false"> + </argument> + <description> + Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_mesh] and [method EditorSpatialGizmo.add_lines]. Should not be overridden. + </description> + </method> + <method name="get_handle_name" qualifiers="virtual"> + <return type="String"> + </return> + <argument index="0" name="gizmo" type="EditorSpatialGizmo"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + Override this method to provide gizmo's handle names. Called for this plugin's active gizmos. + </description> + </method> + <method name="get_handle_value" qualifiers="virtual"> + <return type="Variant"> + </return> + <argument index="0" name="gizmo" type="EditorSpatialGizmo"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + Get actual value of a handle from gizmo. Called for this plugin's active gizmos. + </description> + </method> + <method name="get_material"> + <return type="SpatialMaterial"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="gizmo" type="EditorSpatialGizmo"> + </argument> + <description> + Get material from the internal list of materials. If an [EditorSpatialGizmo] is provided it will try to get the corresponding variant (selected and/or editable). + </description> + </method> + <method name="get_name" qualifiers="virtual"> + <return type="String"> + </return> + <description> + Override this method to provide the name that will appear in the gizmo visibility menu. + </description> + </method> + <method name="has_gizmo" qualifiers="virtual"> + <return type="bool"> + </return> + <argument index="0" name="spatial" type="Spatial"> + </argument> + <description> + Override this method to define which Spatial nodes have a gizmo from this plugin. Whenever a [Spatial] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorSpatialGizmo] assigned and is added to this plugin's list of active gizmos. + </description> + </method> + <method name="is_handle_highlighted" qualifiers="virtual"> + <return type="bool"> + </return> + <argument index="0" name="gizmo" type="EditorSpatialGizmo"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + Get whether a handle is highlighted or not. Called for this plugin's active gizmos. + </description> + </method> + <method name="is_selectable_when_hidden" qualifiers="virtual"> + <return type="bool"> + </return> + <description> + Override this method to define whether Spatial with this gizmo should be selecteble even when the gizmo is hidden. + </description> + </method> + <method name="redraw" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="gizmo" type="EditorSpatialGizmo"> + </argument> + <description> + Callback to redraw the provided gizmo. Called for this plugin's active gizmos. + </description> + </method> + <method name="set_handle" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="gizmo" type="EditorSpatialGizmo"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <argument index="2" name="camera" type="Camera"> + </argument> + <argument index="3" name="point" type="Vector2"> + </argument> + <description> + Update the value of a handle after it has been updated. Called for this plugin's active gizmos. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index f921b76b21..d947784676 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -90,9 +90,17 @@ "major" - Holds the major version number as an int "minor" - Holds the minor version number as an int "patch" - Holds the patch version number as an int + "hex" - Holds the full version number encoded as an hexadecimal int with one byte (2 places) per number (see example below) "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String "build" - Holds the build name (e.g. "custom-build") as a String "string" - major + minor + patch + status + build in a single String + The "hex" value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. Note that it's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code: + [codeblock] + if Engine.get_version_info().hex >= 0x030200: + # do things specific to version 3.2 or later + else: + # do things specific to versions before 3.2 + [/codeblock] </description> </method> <method name="has_singleton" qualifiers="const"> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 566322e6c5..ced9ab7269 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 @@ -13,8 +12,8 @@ - Adjustments </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/environment_and_post_processing.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/high_dynamic_range.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/high_dynamic_range.html</link> </tutorials> <demos> </demos> @@ -78,6 +77,15 @@ <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov"> [Sky] resource's custom field of view. </member> + <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation"> + [Sky] resource's rotation expressed as a [Basis] + </member> + <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation"> + [Sky] resource's rotation expressed as euler angles in radians + </member> + <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees"> + [Sky] resource's rotation expressed as euler angles in degrees + </member> <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount"> Amount of far blur. </member> @@ -120,6 +128,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> @@ -158,6 +168,8 @@ <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled"> Enables glow rendering. </member> + <member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap"> + </member> <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale"> Bleed scale of the HDR glow. </member> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index d5b831a61a..78623b359e 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -1,8 +1,27 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Expression" inherits="Reference" category="Core" version="3.1"> <brief_description> + A class that stores an expression you can execute. </brief_description> <description> + An expression can be made of any arithmetic operation, built-in math function call, method call of a passed instance, or built-in type construction call. + An example expression text using the built-in math functions could be [code]sqrt(pow(3,2) + pow(4,2))[/code]. + In the following example we use a [LineEdit] node to write our expression and show the result. + [codeblock] + onready var expression = Expression.new() + + func _ready(): + $LineEdit.connect("text_entered", self, "_on_text_entered") + + func _on_text_entered(command): + var error = expression.parse(command, []) + if error != OK: + print(expression.get_error_text()) + return + var result = expression.execute([], null, true) + if not expression.has_execute_failed(): + $LineEdit.text = str(result) + [/codeblock] </description> <tutorials> </tutorials> @@ -19,18 +38,22 @@ <argument index="2" name="show_error" type="bool" default="true"> </argument> <description> + Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed]. + If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order. </description> </method> <method name="get_error_text" qualifiers="const"> <return type="String"> </return> <description> + Returns the error text if [method parse] has failed. </description> </method> <method name="has_execute_failed" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if [method execute] has failed. </description> </method> <method name="parse"> @@ -41,6 +64,8 @@ <argument index="1" name="input_names" type="PoolStringArray" default="PoolStringArray( )"> </argument> <description> + Parses the expression and returns a [enum @GlobalScope.Error]. + You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed. </description> </method> </methods> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 20054ac9dc..c9a8f18116 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -22,7 +22,7 @@ [/codeblock] </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/getting_started/step_by_step/filesystem.html</link> + <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> </tutorials> <demos> </demos> @@ -38,7 +38,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the file cursor has reached the end of the file. + Returns [code]true[/code] if the file cursor has read past the end of the file. Note that this function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic. </description> </method> <method name="file_exists" qualifiers="const"> @@ -48,6 +48,7 @@ </argument> <description> Returns [code]true[/code] if the file exists in the given path. + Note that many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the [code]res://.import[/code] folder). To check for the existence of such resources while taking into account the remapping to their imported location, use [method ResourceLoader.exists]. Typically, using [code]File.file_exists[/code] on an imported resource would work while you are developing in the editor (the source asset is present in [code]res://[/code], but fail when exported). </description> </method> <method name="get_16" qualifiers="const"> @@ -100,7 +101,7 @@ <argument index="0" name="delim" type="String" default="",""> </argument> <description> - Returns the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma). + Returns the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma), it should be one character long. </description> </method> <method name="get_double" qualifiers="const"> @@ -327,6 +328,17 @@ Stores the given array of bytes in the file. </description> </method> + <method name="store_csv_line"> + <return type="void"> + </return> + <argument index="0" name="values" type="PoolStringArray"> + </argument> + <argument index="1" name="delim" type="String" default="",""> + </argument> + <description> + Store the given [PoolStringArray] in the file as a line formatted in the CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma), it should be one character long. + </description> + </method> <method name="store_double"> <return type="void"> </return> @@ -393,7 +405,7 @@ </methods> <members> <member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap"> - If [code]true[/code] the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. + If [code]true[/code], the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. Note that this is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file. </member> </members> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 29aa26b67f..0af645975a 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -76,7 +76,7 @@ Set dialog to open or save mode, changes selection behavior. See enum [code]Mode[/code] constants. </member> <member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title"> - If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e. g. setting mode to [code]MODE_OPEN_FILE[/code] will change the window title to "Open a File"). + If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [code]MODE_OPEN_FILE[/code] will change the window title to "Open a File"). </member> <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files"> If [code]true[/code], the dialog will show hidden files. diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 3e47b167ef..6cb5e0b17a 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -4,7 +4,7 @@ Internationalized font and text drawing support. </brief_description> <description> - Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc. + Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. </description> <tutorials> </tutorials> diff --git a/doc/classes/GDNativeLibraryResourceLoader.xml b/doc/classes/GDNativeLibraryResourceLoader.xml new file mode 100644 index 0000000000..865381667d --- /dev/null +++ b/doc/classes/GDNativeLibraryResourceLoader.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="GDNativeLibraryResourceLoader" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/GDNativeLibraryResourceSaver.xml b/doc/classes/GDNativeLibraryResourceSaver.xml new file mode 100644 index 0000000000..39f423d762 --- /dev/null +++ b/doc/classes/GDNativeLibraryResourceSaver.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="GDNativeLibraryResourceSaver" inherits="ResourceFormatSaver" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 77dea73564..5fb0ccc33d 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -5,7 +5,7 @@ <description> </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/gi_probes.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml index 0863ead4ec..95f9a76662 100644 --- a/doc/classes/Generic6DOFJoint.xml +++ b/doc/classes/Generic6DOFJoint.xml @@ -18,7 +18,7 @@ The lower, the longer an impulse from one side takes to travel to the other side. </member> <member name="angular_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code] rotation across the x-axis is limited. + If [code]true[/code], rotation across the x-axis is limited. </member> <member name="angular_limit_x/erp" type="float" setter="set_param_x" getter="get_param_x"> When rotating across x-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -42,7 +42,7 @@ The amount of rotational damping across the y-axis. The lower, the more dampening occurs. </member> <member name="angular_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code] rotation across the y-axis is limited. + If [code]true[/code], rotation across the y-axis is limited. </member> <member name="angular_limit_y/erp" type="float" setter="set_param_y" getter="get_param_y"> When rotating across y-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -66,7 +66,7 @@ The amount of rotational damping across the z-axis. The lower, the more dampening occurs. </member> <member name="angular_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code] rotation across the z-axis is limited. + If [code]true[/code], rotation across the z-axis is limited. </member> <member name="angular_limit_z/erp" type="float" setter="set_param_z" getter="get_param_z"> When rotating across z-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -87,7 +87,7 @@ The minimum rotation in positive direction to break loose and rotate around the z-axis. </member> <member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code] a rotating motor at the x-axis is enabled. + If [code]true[/code], a rotating motor at the x-axis is enabled. </member> <member name="angular_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x"> Maximum acceleration for the motor at the x-axis. @@ -96,7 +96,7 @@ Target speed for the motor at the x-axis. </member> <member name="angular_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code] a rotating motor at the y-axis is enabled. + If [code]true[/code], a rotating motor at the y-axis is enabled. </member> <member name="angular_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y"> Maximum acceleration for the motor at the y-axis. @@ -105,7 +105,7 @@ Target speed for the motor at the y-axis. </member> <member name="angular_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code] a rotating motor at the z-axis is enabled. + If [code]true[/code], a rotating motor at the z-axis is enabled. </member> <member name="angular_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z"> Maximum acceleration for the motor at the z-axis. @@ -113,11 +113,35 @@ <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> <member name="linear_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code] the linear motion across the x-axis is limited. + If [code]true[/code], the linear motion across the x-axis is limited. </member> <member name="linear_limit_x/lower_distance" type="float" setter="set_param_x" getter="get_param_x"> The minimum difference between the pivot points' x-axis. @@ -135,7 +159,7 @@ The amount of damping that happens at the y-motion. </member> <member name="linear_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code] the linear motion across the y-axis is limited. + If [code]true[/code], the linear motion across the y-axis is limited. </member> <member name="linear_limit_y/lower_distance" type="float" setter="set_param_y" getter="get_param_y"> The minimum difference between the pivot points' y-axis. @@ -153,7 +177,7 @@ The amount of damping that happens at the z-motion. </member> <member name="linear_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code] the linear motion across the z-axis is limited. + If [code]true[/code], the linear motion across the z-axis is limited. </member> <member name="linear_limit_z/lower_distance" type="float" setter="set_param_z" getter="get_param_z"> The minimum difference between the pivot points' z-axis. @@ -168,7 +192,7 @@ The maximum difference between the pivot points' z-axis. </member> <member name="linear_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code] then there is a linear motor on the x-axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the x-axis. It will attempt to reach the target velocity while staying within the force limits. </member> <member name="linear_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x"> The maximum force the linear motor can apply on the x-axis while trying to reach the target velocity. @@ -177,7 +201,7 @@ The speed that the linear motor will attempt to reach on the x-axis. </member> <member name="linear_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code] then there is a linear motor on the y-axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the y-axis. It will attempt to reach the target velocity while staying within the force limits. </member> <member name="linear_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y"> The maximum force the linear motor can apply on the y-axis while trying to reach the target velocity. @@ -186,7 +210,7 @@ The speed that the linear motor will attempt to reach on the y-axis. </member> <member name="linear_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code] then there is a linear motor on the z-axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the z-axis. It will attempt to reach the target velocity while staying within the force limits. </member> <member name="linear_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z"> The maximum force the linear motor can apply on the z-axis while trying to reach the target velocity. @@ -194,6 +218,32 @@ <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> + <member name="precision" type="int" setter="set_precision" getter="get_precision"> + </member> </members> <constants> <constant name="PARAM_LINEAR_LOWER_LIMIT" value="0" enum="Param"> @@ -217,34 +267,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 +303,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/GeometryInstance.xml b/doc/classes/GeometryInstance.xml index 8831805dde..d6267044f7 100644 --- a/doc/classes/GeometryInstance.xml +++ b/doc/classes/GeometryInstance.xml @@ -36,7 +36,7 @@ If there is a material in material_override, it will be used instead of any material set in any material slot of the mesh. </member> <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] this GeometryInstance will be used when baking lights using a [GIProbe] and/or any other form of baked lighting. + If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe] and/or any other form of baked lighting. </member> </members> <constants> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index df4a507b65..bf3f125e48 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -4,7 +4,7 @@ Color interpolator node. </brief_description> <description> - Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset offset 0 and the other (white) at the ramp higher offset 1. + Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color 3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. </description> <tutorials> </tutorials> diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml index 9d2465e23d..d064e15e17 100644 --- a/doc/classes/GradientTexture.xml +++ b/doc/classes/GradientTexture.xml @@ -4,7 +4,7 @@ Gradient filled texture. </brief_description> <description> - Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [method set_width]). + Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]). </description> <tutorials> </tutorials> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index ce0b619d67..715c23d869 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -5,7 +5,7 @@ </brief_description> <description> GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default. - It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits. + It is greatly advised to enable low processor usage mode (see [member OS.low_processor_usage_mode]) when using GraphEdits. </description> <tutorials> </tutorials> @@ -82,7 +82,7 @@ <return type="Array"> </return> <description> - Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" } + Return an Array containing the list of connections. A connection consists in a structure of the form {from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" } </description> </method> <method name="get_zoom_hbox"> @@ -254,7 +254,7 @@ </description> </signal> <signal name="popup_request"> - <argument index="0" name="p_position" type="Vector2"> + <argument index="0" name="position" type="Vector2"> </argument> <description> Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent. diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 4c39720d69..6e09926c11 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -236,6 +236,8 @@ </theme_item> <theme_item name="close" type="Texture"> </theme_item> + <theme_item name="close_color" type="Color"> + </theme_item> <theme_item name="close_offset" type="int"> </theme_item> <theme_item name="comment" type="StyleBox"> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index 8a8a9a2d24..a304f34ed2 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -4,23 +4,13 @@ Grid container used to arrange elements in a grid like layout. </brief_description> <description> - Grid container will arrange its children in a grid like structure, the grid columns are specified using the [method set_columns] method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. + Grid container will arrange its children in a grid like structure, the grid columns are specified using the [member columns] property and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. </description> <tutorials> </tutorials> <demos> </demos> <methods> - <method name="get_child_control_at_cell"> - <return type="Control"> - </return> - <argument index="0" name="row" type="int"> - </argument> - <argument index="1" name="column" type="int"> - </argument> - <description> - </description> - </method> </methods> <members> <member name="columns" type="int" setter="set_columns" getter="get_columns"> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 08e2f649a0..5436e2b1eb 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -10,8 +10,8 @@ For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/networking/http_client_class.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/networking/ssl_certificates.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> </tutorials> <demos> </demos> @@ -82,14 +82,14 @@ <return type="bool"> </return> <description> - If [code]true[/code] this [code]HTTPClient[/code] has a response available. + If [code]true[/code], this [code]HTTPClient[/code] has a response available. </description> </method> <method name="is_response_chunked" qualifiers="const"> <return type="bool"> </return> <description> - If [code]true[/code] this [code]HTTPClient[/code] has a response that is chunked. + If [code]true[/code], this [code]HTTPClient[/code] has a response that is chunked. </description> </method> <method name="poll"> @@ -108,14 +108,14 @@ Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: [codeblock] var fields = {"username": "user", "password": "pass"} - String queryString = httpClient.query_string_from_dict(fields) - returns:= "username=user&password=pass" + String query_string = http_client.query_string_from_dict(fields) + # returns: "username=user&password=pass" [/codeblock] Furthermore, if a key has a null value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. [codeblock] var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]} - String queryString = httpClient.query_string_from_dict(fields) - returns:= "single=123&not_valued&multiple=22&multiple=33&multiple=44" + String query_string = http_client.query_string_from_dict(fields) + # returns: "single=123&not_valued&multiple=22&multiple=33&multiple=44" [/codeblock] </description> </method> @@ -143,9 +143,9 @@ To create a POST request with query strings to push to the server, do: [codeblock] var fields = {"username" : "user", "password" : "pass"} - var queryString = httpClient.query_string_from_dict(fields) - var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())] - var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString) + var query_string = http_client.query_string_from_dict(fields) + var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(query_string.length())] + var result = http_client.request(http_client.METHOD_POST, "index.php", headers, query_string) [/codeblock] </description> </method> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index c5bb10a23a..3271fef8e3 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -8,7 +8,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/networking/ssl_certificates.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> </tutorials> <demos> </demos> @@ -71,7 +71,7 @@ Maximum number of allowed redirects. </member> <member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads"> - If [code]true[/code] multithreading is used to improve performance. + If [code]true[/code], multithreading is used to improve performance. </member> </members> <signals> @@ -102,16 +102,16 @@ Request failed while resolving. </constant> <constant name="RESULT_CONNECTION_ERROR" value="4" enum="Result"> - Request failed due to connection(read/write) error. + Request failed due to connection (read/write) error. </constant> <constant name="RESULT_SSL_HANDSHAKE_ERROR" value="5" enum="Result"> Request failed on SSL handshake. </constant> <constant name="RESULT_NO_RESPONSE" value="6" enum="Result"> - Request does not have a response(yet). + Request does not have a response (yet). </constant> <constant name="RESULT_BODY_SIZE_LIMIT_EXCEEDED" value="7" enum="Result"> - Request exceeded its maximum size limit, see [method set_body_size_limit]. + Request exceeded its maximum size limit, see [member body_size_limit]. </constant> <constant name="RESULT_REQUEST_FAILED" value="8" enum="Result"> Request failed. (Unused) @@ -123,7 +123,7 @@ HTTPRequest couldn't write to the download file. </constant> <constant name="RESULT_REDIRECT_LIMIT_REACHED" value="11" enum="Result"> - Request reached its maximum redirect limit, see [method set_max_redirects]. + Request reached its maximum redirect limit, see [member max_redirects]. </constant> </constants> </class> diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml index 3c5719056b..41d3b2311d 100644 --- a/doc/classes/HingeJoint.xml +++ b/doc/classes/HingeJoint.xml @@ -17,7 +17,7 @@ The speed with which the rotation across the axis perpendicular to the hinge gets corrected. </member> <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. + If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. </member> <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit"> The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code]. @@ -71,7 +71,7 @@ End flag of PARAM_* constants, used internally. </constant> <constant name="FLAG_USE_LIMIT" value="0" enum="Flag"> - If [code]true[/code] the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. + If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. </constant> <constant name="FLAG_ENABLE_MOTOR" value="1" enum="Flag"> When activated, a motor turns the hinge. diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 56accdcd9e..f165027d44 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -4,7 +4,7 @@ Image datatype. </brief_description> <description> - Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [code]Image[/code] is 16384 pixels. + Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [code]Image[/code] are [constant MAX_WIDTH] and [constant MAX_HEIGHT]. </description> <tutorials> </tutorials> @@ -227,7 +227,7 @@ <return type="int" enum="Image.Format"> </return> <description> - Returns the image’s format. See [code]FORMAT_*[/code] constants. + Returns the image's format. See [code]FORMAT_*[/code] constants. </description> </method> <method name="get_height" qualifiers="const"> @@ -476,6 +476,12 @@ </member> </members> <constants> + <constant name="MAX_WIDTH" value="16384"> + The maximal width allowed for [code]Image[/code] resources. + </constant> + <constant name="MAX_HEIGHT" value="16384"> + The maximal height allowed for [code]Image[/code] resources. + </constant> <constant name="FORMAT_L8" value="0" enum="Format"> </constant> <constant name="FORMAT_LA8" value="1" enum="Format"> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 5c57899468..579886c771 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -23,9 +23,8 @@ <argument index="3" name="flags" type="int" default="7"> </argument> <description> - Create a new [code]ImageTexture[/code] with "width" and "height". - "format" one of [Image].FORMAT_*. - "flags" one or more of [Texture].FLAG_*. + Create a new [code]ImageTexture[/code] with [code]width[/code] and [code]height[/code]. + [code]format[/code] is a value from [enum Image.Format], [code]flags[/code] is any combination of [enum Texture.Flags]. </description> </method> <method name="create_from_image"> @@ -36,14 +35,14 @@ <argument index="1" name="flags" type="int" default="7"> </argument> <description> - Create a new [code]ImageTexture[/code] from an [Image] with "flags" from [Texture].FLAG_*. An sRGB to linear color space conversion can take place, according to [Image].FORMAT_*. + Create a new [code]ImageTexture[/code] from an [Image] with [code]flags[/code] from [enum Texture.Flags]. An sRGB to linear color space conversion can take place, according to [enum Image.Format]. </description> </method> <method name="get_format" qualifiers="const"> <return type="int" enum="Image.Format"> </return> <description> - Return the format of the [code]ImageTexture[/code], one of [Image].FORMAT_*. + Return the format of the [code]ImageTexture[/code], one of [enum Image.Format]. </description> </method> <method name="load"> @@ -76,7 +75,7 @@ </methods> <members> <member name="lossy_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality"> - The storage quality for [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY. + The storage quality for [code]STORAGE_COMPRESS_LOSSY[/code]. </member> <member name="storage" type="int" setter="set_storage" getter="get_storage" enum="ImageTexture.Storage"> The storage type (raw, lossy, or compressed). @@ -87,7 +86,7 @@ [Image] data is stored raw and unaltered. </constant> <constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage"> - [Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality]. + [Image] data is compressed with a lossy algorithm. You can set the storage quality with [member lossy_quality]. </constant> <constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage"> [Image] data is compressed with a lossless algorithm. diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 0e6e54c8fd..724e6a078d 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -7,7 +7,7 @@ A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link> </tutorials> <demos> </demos> @@ -17,8 +17,11 @@ </return> <argument index="0" name="action" type="String"> </argument> + <argument index="1" name="strength" type="float" default="1.0"> + </argument> <description> This will simulate pressing the specified action. + The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. </description> </method> <method name="action_release"> diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 993d62d188..c880823aee 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -7,8 +7,8 @@ Base class of all sort of input event. See [method Node._input]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/2d_transforms.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 16000231cb..bd0d774180 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -7,7 +7,7 @@ Contains a generic action which can be targeted from several type of inputs. Actions can be created from the project settings menu [code]Project > Project Settings > Input Map[/code]. See [method Node._input]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html#actions</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#actions</link> </tutorials> <demos> </demos> @@ -18,7 +18,7 @@ The action's name. Actions are accessed via this [String]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the action's state is pressed. If [code]false[/code] the action's state is released. + If [code]true[/code], the action's state is pressed. If [code]false[/code], the action's state is released. </member> </members> <constants> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index adaeae685e..1875ea508a 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -7,7 +7,7 @@ Input event type for gamepad buttons. For joysticks see [InputEventJoypadMotion]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <demos> </demos> @@ -18,7 +18,7 @@ Button identifier. One of the [code]JOY_BUTTON_*[/code] constants from [@GlobalScope]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the button's state is pressed. If [code]false[/code] the button's state is released. + If [code]true[/code], the button's state is pressed. If [code]false[/code], the button's state is released. </member> <member name="pressure" type="float" setter="set_pressure" getter="get_pressure"> Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from [code]0[/code] to [code]1[/code]. diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index f86aec4ce0..0c73f53158 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -7,7 +7,7 @@ Stores information about joystick motions. One [code]InputEventJoypadMotion[/code] represents one axis at a time. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index a013ee6266..4d8a2f6242 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -7,7 +7,7 @@ Stores key presses on the keyboard. Supports key presses, key releases and [member echo] events. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <demos> </demos> @@ -22,10 +22,10 @@ </methods> <members> <member name="echo" type="bool" setter="set_echo" getter="is_echo"> - If [code]true[/code] the key was already pressed before this event. It means the user is holding the key down. + If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the key's state is pressed. If [code]false[/code] the key's state is released. + If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released. </member> <member name="scancode" type="int" setter="set_scancode" getter="get_scancode"> Key scancode, one of the [code]KEY_*[/code] constants in [@GlobalScope]. diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml new file mode 100644 index 0000000000..2cdd70e42c --- /dev/null +++ b/doc/classes/InputEventMIDI.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="InputEventMIDI" inherits="InputEvent" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <members> + <member name="channel" type="int" setter="set_channel" getter="get_channel"> + </member> + <member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number"> + </member> + <member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value"> + </member> + <member name="instrument" type="int" setter="set_instrument" getter="get_instrument"> + </member> + <member name="message" type="int" setter="set_message" getter="get_message"> + </member> + <member name="pitch" type="int" setter="set_pitch" getter="get_pitch"> + </member> + <member name="pressure" type="int" setter="set_pressure" getter="get_pressure"> + </member> + <member name="velocity" type="int" setter="set_velocity" getter="get_velocity"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index 06de96890a..27e8d17407 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -7,7 +7,7 @@ Stores general mouse events information. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index a3a9055087..8603a4f673 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -7,7 +7,7 @@ Contains mouse click information. See [method Node._input]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/mouse_and_input_coordinates.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> </tutorials> <demos> </demos> @@ -18,13 +18,13 @@ Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@GlobalScope]. </member> <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick"> - If [code]true[/code] the mouse button's state is a double-click. + If [code]true[/code], the mouse button's state is a double-click. </member> <member name="factor" type="float" setter="set_factor" getter="get_factor"> Magnitude. Amount (or delta) of the event. Used for scroll events, indicates scroll amount (vertically or horizontally). Only supported on some platforms, sensitivity varies by platform. May be 0 if not supported. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the mouse button's state is pressed. If [code]false[/code] the mouse button's state is released. + If [code]true[/code], the mouse button's state is pressed. If [code]false[/code], the mouse button's state is released. </member> </members> <constants> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 05e3e79d26..f7f6358910 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -7,7 +7,7 @@ Contains mouse motion information. Supports relative, absolute positions and speed. See [method Node._input]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/mouse_and_input_coordinates.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index f777d90ccb..a320c0a028 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -8,7 +8,7 @@ Contains screen drag information. See [method Node._input]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 39cd0a9657..8b1b9cae9f 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -8,7 +8,7 @@ Stores multi-touch press/release information. Supports touch press, touch release and [member index] for multi-touch count and order. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <demos> </demos> @@ -22,7 +22,7 @@ Touch position. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> - If [code]true[/code] the touch's state is pressed. If [code]false[/code] the touch's state is released. + If [code]true[/code], the touch's state is pressed. If [code]false[/code], the touch's state is released. </member> </members> <constants> diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index 9c1814fedd..fcf2fd545e 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -7,7 +7,7 @@ Contains keys events information with modifiers support like [code]SHIFT[/code] or [code]ALT[/code]. See [method Node._input]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 7fd1d7e8ac..3779aa399f 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -7,7 +7,7 @@ Manages all [InputEventAction] which can be created/modified from the project settings menu [code]Project > Project Settings > Input Map[/code] or in code with [method add_action] and [method action_add_event]. See [method Node._input]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/inputs/inputevent.html#inputmap</link> + <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap</link> </tutorials> <demos> </demos> @@ -93,7 +93,7 @@ <argument index="1" name="action" type="String"> </argument> <description> - Returns [true] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. + Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. </description> </method> <method name="get_action_list"> diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml index 1ac7b5107e..fdb4361091 100644 --- a/doc/classes/InterpolatedCamera.xml +++ b/doc/classes/InterpolatedCamera.xml @@ -24,7 +24,7 @@ </methods> <members> <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled"> - If [code]true[/code] and a target is set, the camera will move automatically. + If [code]true[/code], and a target is set, the camera will move automatically. </member> <member name="speed" type="float" setter="set_speed" getter="get_speed"> How quickly the camera moves toward its target. Higher values will result in tighter camera motion. diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 4e4947de6c..4df8a14804 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -166,6 +166,14 @@ Returns whether or not the item at the specified index is disabled </description> </method> + <method name="is_item_icon_transposed" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> <method name="is_item_selectable" qualifiers="const"> <return type="bool"> </return> @@ -289,6 +297,16 @@ <description> </description> </method> + <method name="set_item_icon_transposed"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="rect" type="bool"> + </argument> + <description> + </description> + </method> <method name="set_item_metadata"> <return type="void"> </return> @@ -370,10 +388,10 @@ </methods> <members> <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect"> - If [code]true[/code] the currently selected item may be selected again. + If [code]true[/code], the currently selected item may be selected again. </member> <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select"> - If [code]true[/code] a right mouse button click can select items. + If [code]true[/code], a right mouse button click can select items. </member> <member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height"> </member> diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml index a9162e2d95..4d2987cc04 100644 --- a/doc/classes/JSONParseResult.xml +++ b/doc/classes/JSONParseResult.xml @@ -24,7 +24,7 @@ </member> <member name="result" type="Variant" setter="set_result" getter="get_result"> A [Variant] containing the parsed JSON. Use typeof() to check if it is what you expect. For example, if JSON source starts with curly braces ([code]{}[/code]) a [Dictionary] will be returned, if JSON source starts with braces ([code][][/code]) an [Array] will be returned. - [i]Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types. + [i]Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types.[/i] Note that JSON objects do not preserve key order like Godot dictionaries, thus you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:[/i] [codeblock] var p = JSON.parse('["hello", "world", "!"]') diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index 17588717c2..fa3aaed684 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -7,7 +7,7 @@ The JavaScript singleton is implemented only in HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link> + <link>https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link> </tutorials> <demos> </demos> diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml index 8cafdbdbf3..32fdb31a99 100644 --- a/doc/classes/Joint.xml +++ b/doc/classes/Joint.xml @@ -4,7 +4,7 @@ Base class for all 3D joints </brief_description> <description> - All 3D joints link two nodes, has a priority, and can decide if the two bodies of the nodes should be able to collide with each other + Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. </description> <tutorials> </tutorials> @@ -14,16 +14,16 @@ </methods> <members> <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision"> - If [code]true[/code] the two bodies of the nodes are not able to collide with each other. + If [code]true[/code], the two bodies of the nodes are not able to collide with each other. </member> <member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a"> - The [Node], the first side of the Joint attaches to. + The node attached to the first side (A) of the joint. </member> <member name="nodes/node_b" type="NodePath" setter="set_node_b" getter="get_node_b"> - The [Node], the second side of the Joint attaches to. + The node attached to the second side (B) of the joint. </member> <member name="solver/priority" type="int" setter="set_solver_priority" getter="get_solver_priority"> - The order in which the solver is executed compared to the other [Joints], the lower, the earlier. + The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. </member> </members> <constants> diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml index 8247997927..641765e671 100644 --- a/doc/classes/Joint2D.xml +++ b/doc/classes/Joint2D.xml @@ -17,7 +17,7 @@ When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint. Default value: [code]0[/code] </member> <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision"> - If [code]true[/code] [member node_a] and [member node_b] can collide. Default value: [code]false[/code]. + If [code]true[/code], [member node_a] and [member node_b] can collide. Default value: [code]false[/code]. </member> <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a"> The first body attached to the joint. Must derive from [PhysicsBody2D]. diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 82638fc57a..83abd723d0 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -9,7 +9,7 @@ Kinematic Characters: KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/kinematic_character_2d.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> </tutorials> <demos> </demos> @@ -89,9 +89,9 @@ </argument> <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method. + [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. - [i]TODO: Update for new stop_on_slode argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. + If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. Returns the movement that remained when the body stopped. To get more detailed information about collisions that occurred, use [method get_slide_collision]. @@ -106,13 +106,13 @@ </argument> <argument index="2" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> - <argument index="3" name="infinite_inertia" type="bool" default="true"> + <argument index="3" name="stop_on_slope" type="bool" default="false"> </argument> - <argument index="4" name="stop_on_slope" type="bool" default="false"> + <argument index="4" name="max_slides" type="int" default="4"> </argument> - <argument index="5" name="max_bounces" type="int" default="4"> + <argument index="5" name="floor_max_angle" type="float" default="0.785398"> </argument> - <argument index="6" name="floor_max_angle" type="float" default="0.785398"> + <argument index="6" name="infinite_inertia" type="bool" default="true"> </argument> <description> Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. @@ -126,7 +126,7 @@ </argument> <argument index="1" name="rel_vec" type="Vector3"> </argument> - <argument index="2" name="infinite_inertia" type="bool"> + <argument index="2" name="infinite_inertia" type="bool" default="true"> </argument> <description> Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. @@ -138,10 +138,13 @@ If the body is at least this close to another body, this body will consider them to be colliding. </member> <member name="move_lock_x" type="bool" setter="set_axis_lock" getter="get_axis_lock"> + Lock the body's movement in the x-axis. </member> <member name="move_lock_y" type="bool" setter="set_axis_lock" getter="get_axis_lock"> + Lock the body's movement in the y-axis. </member> <member name="move_lock_z" type="bool" setter="set_axis_lock" getter="get_axis_lock"> + Lock the body's movement in the z-axis. </member> </members> <constants> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 6511b2f182..d5bfc91f66 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -79,22 +79,22 @@ </argument> <argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )"> </argument> - <argument index="2" name="infinite_inertia" type="bool" default="true"> + <argument index="2" name="stop_on_slope" type="bool" default="false"> </argument> - <argument index="3" name="stop_on_slope" type="bool" default="false"> + <argument index="3" name="max_slides" type="int" default="4"> </argument> - <argument index="4" name="max_bounces" type="int" default="4"> + <argument index="4" name="floor_max_angle" type="float" default="0.785398"> </argument> - <argument index="5" name="floor_max_angle" type="float" default="0.785398"> + <argument index="5" name="infinite_inertia" type="bool" default="true"> </argument> <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method. + [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. - [i]TODO: Update for stop_on_slope argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. - If the body collides, it will change direction a maximum of [code]max_bounces[/code] times before it stops. + If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. + If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. - Returns the movement that remained when the body stopped. To get more detailed information about collisions that occurred, use [method get_slide_collision]. + Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get more detailed information about collisions that occurred, use [method get_slide_collision]. </description> </method> <method name="move_and_slide_with_snap"> @@ -106,13 +106,13 @@ </argument> <argument index="2" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )"> </argument> - <argument index="3" name="infinite_inertia" type="bool" default="true"> + <argument index="3" name="stop_on_slope" type="bool" default="false"> </argument> - <argument index="4" name="stop_on_slope" type="bool" default="false"> + <argument index="4" name="max_slides" type="int" default="4"> </argument> - <argument index="5" name="max_bounces" type="int" default="4"> + <argument index="5" name="floor_max_angle" type="float" default="0.785398"> </argument> - <argument index="6" name="floor_max_angle" type="float" default="0.785398"> + <argument index="6" name="infinite_inertia" type="bool" default="true"> </argument> <description> Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. @@ -126,7 +126,7 @@ </argument> <argument index="1" name="rel_vec" type="Vector2"> </argument> - <argument index="2" name="infinite_inertia" type="bool"> + <argument index="2" name="infinite_inertia" type="bool" default="true"> </argument> <description> Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. @@ -138,7 +138,7 @@ If the body is at least this close to another body, this body will consider them to be colliding. </member> <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled"> - If [code]true[/code] the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. + If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method move_and_collide] functions. </member> </members> <constants> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 1e78a196b1..36aa3c8b55 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -5,7 +5,7 @@ </brief_description> <description> Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead. - Note that contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events). + Note that contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter. </description> <tutorials> </tutorials> @@ -30,7 +30,7 @@ <return type="int"> </return> <description> - Returns the total length of the text. + Returns the total number of printable characters in the text (excluding spaces and newlines). </description> </method> <method name="get_visible_line_count" qualifiers="const"> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index 04191136a8..a7b0d86a7a 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -7,7 +7,7 @@ Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/lights_and_shadows.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> <demos> </demos> @@ -15,7 +15,7 @@ </methods> <members> <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only"> - If [code]true[/code] the light only appears in the editor and will not be visible at runtime. Default value:[code]false[/code]. + If [code]true[/code], the light only appears in the editor and will not be visible at runtime. Default value:[code]false[/code]. </member> <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light.BakeMode"> The light's bake mode. See [enum BakeMode]. @@ -33,7 +33,7 @@ Secondary multiplier used with indirect light (light bounces). This works in baked light or GIProbe. </member> <member name="light_negative" type="bool" setter="set_negative" getter="is_negative"> - If [code]true[/code] the light's effect is reversed, darkening areas and casting bright shadows. Default value: [code]false[/code]. + If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. Default value: [code]false[/code]. </member> <member name="light_specular" type="float" setter="set_param" getter="get_param"> The intensity of the specular blob in objects affected by the light. At [code]0[/code] the light becomes a pure diffuse light. @@ -48,7 +48,7 @@ Attempts to reduce [member shadow_bias] gap. </member> <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow"> - If [code]true[/code] the light will cast shadows. Default value: [code]false[/code]. + If [code]true[/code], the light will cast shadows. Default value: [code]false[/code]. </member> <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face"> </member> diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index f3903ffeae..0d754f1d4e 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -17,10 +17,10 @@ The Light2D's [Color]. </member> <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only"> - If [code]true[/code] Light2D will only appear when editing the scene. Default value: [code]false[/code]. + If [code]true[/code], Light2D will only appear when editing the scene. Default value: [code]false[/code]. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> - If [code]true[/code] Light2D will emit light. Default value: [code]true[/code]. + If [code]true[/code], Light2D will emit light. Default value: [code]true[/code]. </member> <member name="energy" type="float" setter="set_energy" getter="get_energy"> The Light2D's energy value. The larger the value, the stronger the light. @@ -56,10 +56,10 @@ [Color] of shadows cast by the Light2D. </member> <member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled"> - If [code]true[/code] the Light2D will cast shadows. Default value: [code]false[/code]. + If [code]true[/code], the Light2D will cast shadows. Default value: [code]false[/code]. </member> <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter"> - Shadow filter type. Use SHADOW_FILTER_* constants to set [code]shadow_filter[/code]. Default value: [code]None[/code]. + Shadow filter type. Use [enum Light2D.ShadowFilter] constants as values. Default value: [code]SHADOW_FILTER_NONE[/code]. </member> <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth"> Smoothing value for shadows. @@ -91,22 +91,22 @@ The light texture of the Light2D is used as a mask, hiding or revealing parts of the screen underneath depending on the value of each pixel of the light (mask) texture. </constant> <constant name="SHADOW_FILTER_NONE" value="0" enum="ShadowFilter"> - No filter applies to the shadow map. See [method shadow_filter]. + No filter applies to the shadow map. See [member shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF3" value="1" enum="ShadowFilter"> - Percentage closer filtering (3 samples) applies to the shadow map. See [method shadow_filter]. + Percentage closer filtering (3 samples) applies to the shadow map. See [member shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF5" value="2" enum="ShadowFilter"> - Percentage closer filtering (5 samples) applies to the shadow map. See [method shadow_filter]. + Percentage closer filtering (5 samples) applies to the shadow map. See [member shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF7" value="3" enum="ShadowFilter"> - Percentage closer filtering (7 samples) applies to the shadow map. See [method shadow_filter]. + Percentage closer filtering (7 samples) applies to the shadow map. See [member shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF9" value="4" enum="ShadowFilter"> - Percentage closer filtering (9 samples) applies to the shadow map. See [method shadow_filter]. + Percentage closer filtering (9 samples) applies to the shadow map. See [member shadow_filter]. </constant> <constant name="SHADOW_FILTER_PCF13" value="5" enum="ShadowFilter"> - Percentage closer filtering (13 samples) applies to the shadow map. See [method shadow_filter]. + Percentage closer filtering (13 samples) applies to the shadow map. See [member shadow_filter]. </constant> </constants> </class> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index f842dd8311..1e1ffd71b5 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -24,7 +24,7 @@ <return type="void"> </return> <description> - Erases the [LineEdit] text. + Erases the [code]LineEdit[/code] text. </description> </method> <method name="deselect"> @@ -38,7 +38,7 @@ <return type="PopupMenu"> </return> <description> - Returns the [PopupMenu] of this [code]LineEdit[/code]. By default, this menu is displayed when right-clicking on the [LineEdit]. + Returns the [PopupMenu] of this [code]LineEdit[/code]. By default, this menu is displayed when right-clicking on the [code]LineEdit[/code]. </description> </method> <method name="menu_option"> @@ -58,7 +58,7 @@ <argument index="1" name="to" type="int" default="-1"> </argument> <description> - Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default [code]from[/code] is at the beginning and [code]to[/code] at the end. + Selects characters inside [code]LineEdit[/code] between [code]from[/code] and [code]to[/code]. By default [code]from[/code] is at the beginning and [code]to[/code] at the end. [codeblock] text = "Welcome" select() # Welcome @@ -80,7 +80,7 @@ Text alignment as defined in the ALIGN_* enum. </member> <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled"> - If [code]true[/code] the caret (visual cursor) blinks. + If [code]true[/code], the caret (visual cursor) blinks. </member> <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed"> Duration (in seconds) of a caret's blinking cycle. @@ -89,28 +89,28 @@ The cursor's position inside the [code]LineEdit[/code]. When set, the text may scroll to accommodate it. </member> <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled"> - If [code]true[/code] the [code]LineEdit[/code] will show a clear button if [code]text[/code] is not empty. + If [code]true[/code], the [code]LineEdit[/code] will show a clear button if [code]text[/code] is not empty. </member> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled"> - If [code]true[/code] the context menu will appear when right clicked. + If [code]true[/code], the context menu will appear when right clicked. </member> <member name="editable" type="bool" setter="set_editable" getter="is_editable"> - If [code]false[/code] existing text cannot be modified and new text cannot be added. + If [code]false[/code], existing text cannot be modified and new text cannot be added. </member> <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length"> - If [code]true[/code] the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. + If [code]true[/code], the [code]LineEdit[/code] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode"> - Defines how the [LineEdit] can grab focus (Keyboard and mouse, only keyboard, or none). See [code]enum FocusMode[/code] in [Control] for details. + Defines how the [code]LineEdit[/code] can grab focus (Keyboard and mouse, only keyboard, or none). See [code]enum FocusMode[/code] in [Control] for details. </member> <member name="max_length" type="int" setter="set_max_length" getter="get_max_length"> - Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit. + Maximum amount of characters that can be entered inside the [code]LineEdit[/code]. If [code]0[/code], there is no limit. </member> <member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha"> Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code]. </member> <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder"> - Text shown when the [LineEdit] is empty. It is [b]not[/b] the [LineEdit]'s default value (see [member text]). + Text shown when the [code]LineEdit[/code] is empty. It is [b]not[/b] the [code]LineEdit[/code]'s default value (see [member text]). </member> <member name="secret" type="bool" setter="set_secret" getter="is_secret"> If [code]true[/code], every character is replaced with the secret character (see [member secret_character]). @@ -119,7 +119,7 @@ The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character. </member> <member name="text" type="String" setter="set_text" getter="get_text"> - String value of the [LineEdit]. + String value of the [code]LineEdit[/code]. </member> </members> <signals> @@ -134,25 +134,25 @@ <argument index="0" name="new_text" type="String"> </argument> <description> - Emitted when the user presses KEY_ENTER on the [code]LineEdit[/code]. + Emitted when the user presses [code]KEY_ENTER[/code] on the [code]LineEdit[/code]. </description> </signal> </signals> <constants> <constant name="ALIGN_LEFT" value="0" enum="Align"> - Aligns the text on the left hand side of the [LineEdit]. + Aligns the text on the left hand side of the [code]LineEdit[/code]. </constant> <constant name="ALIGN_CENTER" value="1" enum="Align"> - Centers the text in the middle of the [LineEdit]. + Centers the text in the middle of the [code]LineEdit[/code]. </constant> <constant name="ALIGN_RIGHT" value="2" enum="Align"> - Aligns the text on the right hand side of the [LineEdit]. + Aligns the text on the right hand side of the [code]LineEdit[/code]. </constant> <constant name="ALIGN_FILL" value="3" enum="Align"> - Stretches whitespaces to fit the [LineEdit]'s width. + Stretches whitespaces to fit the [code]LineEdit[/code]'s width. </constant> <constant name="MENU_CUT" value="0" enum="MenuItems"> - Cuts (Copies and clears) the selected text. + Cuts (copies and clears) the selected text. </constant> <constant name="MENU_COPY" value="1" enum="MenuItems"> Copies the selected text. @@ -161,10 +161,10 @@ Pastes the clipboard text over the selected text (or at the cursor's position). </constant> <constant name="MENU_CLEAR" value="3" enum="MenuItems"> - Erases the whole [Linedit] text. + Erases the whole [code]LineEdit[/code] text. </constant> <constant name="MENU_SELECT_ALL" value="4" enum="MenuItems"> - Selects the whole [Linedit] text. + Selects the whole [code]LineEdit[/code] text. </constant> <constant name="MENU_UNDO" value="5" enum="MenuItems"> Undoes the previous action. diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index ad763e6532..01836cff95 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -136,5 +136,7 @@ </constant> <constant name="NOTIFICATION_CRASH" value="92"> </constant> + <constant name="NOTIFICATION_OS_IME_UPDATE" value="93"> + </constant> </constants> </class> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index c9a8d3ce7a..636edd504b 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -27,6 +27,11 @@ </description> </method> </methods> + <members> + <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover"> + If [code]true[/code], when the cursor hovers above another MenuButton within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current MenuButton and open the other one. + </member> + </members> <signals> <signal name="about_to_show"> <description> diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index 5c3af3e2e1..7bd98323c7 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -11,9 +11,9 @@ var mdt = MeshDataTool.new() mdt.create_from_surface(mesh, 0) for i in range(mdt.get_vertex_count()): - var vertex = mdt.get_vertex(i) - ... - mdt.set_vertex(i, vertex) + var vertex = mdt.get_vertex(i) + ... + mdt.set_vertex(i, vertex) mesh.surface_remove(0) mdt.commit_to_surface(mesh) [/codeblock] @@ -104,7 +104,7 @@ </argument> <description> Returns specified edge associated with given face. - Edge argument must 2 or less becuase a face only has three edges. + Edge argument must 2 or less because a face only has three edges. </description> </method> <method name="get_face_meta" qualifiers="const"> @@ -134,14 +134,14 @@ </argument> <description> Returns specified vertex of given face. - Vertex argument must be 2 or less becuase faces contain three vertices. + Vertex argument must be 2 or less because faces contain three vertices. </description> </method> <method name="get_format" qualifiers="const"> <return type="int"> </return> <description> - Returns format of [Mesh]. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] becuase [code]ARRAY_FORMAT_VERTEX[/code] is [code]1[/code] and [code]ARRAY_FORMAT_NORMAL[/code] is [code]2[/code]. + Returns format of [Mesh]. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [code]ARRAY_FORMAT_VERTEX[/code] is [code]1[/code] and [code]ARRAY_FORMAT_NORMAL[/code] is [code]2[/code]. For list of format flags see [ArrayMesh]. </description> </method> diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml index ef42726ca9..bcc9a7cad9 100644 --- a/doc/classes/MeshInstance.xml +++ b/doc/classes/MeshInstance.xml @@ -41,6 +41,12 @@ Returns the [Material] for a surface of the [Mesh] resource. </description> </method> + <method name="get_surface_material_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="set_surface_material"> <return type="void"> </return> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 1908fdd684..0cc9764e36 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -4,8 +4,8 @@ Provides high performance mesh instancing. </brief_description> <description> - MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory. - For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead. + MultiMesh provides low level mesh instancing. Drawing thousands of [MeshInstance] nodes can be slow because each object is submitted to the GPU to be drawn individually. + MultiMesh is much faster because it can draw thousands of instances with a single draw call, resulting in less API overhead. As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). Since instances may have any behavior, the AABB used for visibility must be provided by the user. </description> @@ -36,6 +36,7 @@ <argument index="0" name="instance" type="int"> </argument> <description> + Return the custom data that has been set for a specific instance. </description> </method> <method name="get_instance_transform" qualifiers="const"> @@ -47,6 +48,14 @@ Return the transform of a specific instance. </description> </method> + <method name="get_instance_transform_2d" qualifiers="const"> + <return type="Transform2D"> + </return> + <argument index="0" name="instance" type="int"> + </argument> + <description> + </description> + </method> <method name="set_instance_color"> <return type="void"> </return> @@ -56,6 +65,7 @@ </argument> <description> Set the color of a specific instance. + For the color to take effect, ensure that [member color_format] is non-[code]null[/code] on the [code]MultiMesh[/code] and [member SpatialMaterial.vertex_color_use_as_albedo] is [code]true[/code] on the material. </description> </method> <method name="set_instance_custom_data"> @@ -66,6 +76,7 @@ <argument index="1" name="custom_data" type="Color"> </argument> <description> + Set custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers. </description> </method> <method name="set_instance_transform"> @@ -79,35 +90,58 @@ Set the transform for a specific instance. </description> </method> + <method name="set_instance_transform_2d"> + <return type="void"> + </return> + <argument index="0" name="instance" type="int"> + </argument> + <argument index="1" name="transform" type="Transform2D"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat"> + Format of colors in color array that gets passed to shader. </member> <member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat"> + Format of custom data in custom data array that gets passed to shader. </member> <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count"> + Number of instances that will get drawn. </member> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + Mesh to be drawn. </member> <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat"> + Format of transform used to transform mesh, either 2D or 3D. </member> </members> <constants> <constant name="TRANSFORM_2D" value="0" enum="TransformFormat"> + Use this when using 2D transforms. </constant> <constant name="TRANSFORM_3D" value="1" enum="TransformFormat"> + Use this when using 3D transforms. </constant> <constant name="COLOR_NONE" value="0" enum="ColorFormat"> + Use when you are not using per-instance [Color]s. </constant> <constant name="COLOR_8BIT" value="1" enum="ColorFormat"> + Compress [Color] data into 8 bits when passing to shader. This uses less memory and can be faster, but the [Color] loses precision. </constant> <constant name="COLOR_FLOAT" value="2" enum="ColorFormat"> + The [Color] passed into [method set_instance_color] will use 4 floats. Use this for highest precision [Color]. </constant> <constant name="CUSTOM_DATA_NONE" value="0" enum="CustomDataFormat"> + Use when you are not using per-instance custom data. </constant> <constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat"> + Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision. </constant> <constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat"> + The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision. </constant> </constants> </class> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index d8d7d9acfc..f3e26a3bcb 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -93,7 +93,7 @@ The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. </member> <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections"> - If [code]true[/code] the MultiplayerAPI's [member network_peer] refuses new incoming connections. + If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections. </member> </members> <signals> diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml index 8f2751af98..718b3b04b2 100644 --- a/doc/classes/Mutex.xml +++ b/doc/classes/Mutex.xml @@ -22,7 +22,7 @@ <return type="int" enum="Error"> </return> <description> - Try locking this [code]Mutex[/code], does not block. Returns [OK] on success, [ERR_BUSY] otherwise. + Try locking this [code]Mutex[/code], does not block. Returns [code]OK[/code] on success, [code]ERR_BUSY[/code] otherwise. </description> </method> <method name="unlock"> diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index 08f22d49d3..9d830168d3 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -35,7 +35,7 @@ <argument index="0" name="to_point" type="Vector3"> </argument> <description> - Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigtionMeshInstance]. For meshes added via [method navmesh_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted). + Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance]. For meshes added via [method navmesh_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted). </description> </method> <method name="get_closest_point_to_segment"> diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml index 364da55f99..4982c6f87d 100644 --- a/doc/classes/Navigation2D.xml +++ b/doc/classes/Navigation2D.xml @@ -26,7 +26,7 @@ <argument index="0" name="to_point" type="Vector2"> </argument> <description> - Returns the owner of the [NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [NavigtionPolygonInstance]. For polygons added via [method navpoly_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted). + Returns the owner of the [NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [NavigationPolygonInstance]. For polygons added via [method navpoly_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted). </description> </method> <method name="get_simple_path"> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index 4ede80b98c..53389d6599 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -6,22 +6,22 @@ <description> There are two ways to create polygons. Either by using the [method add_outline] method or using the [method add_polygon] method. Using [method add_outline]: - [code] + [codeblock] var polygon = NavigationPolygon.new() var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.add_outline(outline) polygon.make_polygons_from_outlines() $NavigationPolygonInstance.navpoly = polygon - [/code] + [/codeblock] Using [method add_polygon] and indices of the vertices array. - [code] + [codeblock] var polygon = NavigationPolygon.new() var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.set_vertices(vertices) var indices = PoolIntArray(0, 3, 1) polygon.add_polygon(indices) $NavigationPolygonInstance.navpoly = polygon - [/code] + [/codeblock] </description> <tutorials> </tutorials> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index ea6fe6d11c..42f08b36af 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -7,7 +7,7 @@ Manages the connection to network peers. Assigns unique IDs to each client connected to the server. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/networking/high_level_multiplayer.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link> </tutorials> <demos> </demos> @@ -53,7 +53,7 @@ </methods> <members> <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections"> - If [code]true[/code] this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code]. + If [code]true[/code], this [code]NetworkedMultiplayerPeer[/code] refuses new connections. Default value: [code]false[/code]. </member> <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="NetworkedMultiplayerPeer.TransferMode"> The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. @@ -92,7 +92,7 @@ </signals> <constants> <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode"> - Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [code]TRANSFER_MODE_UNRELIABLE_ORDERED[/code]. Use for non-critical data, and always consider whether the order matters. + Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [code]TRANSFER_MODE_UNRELIABLE_ORDERED[/code]. Use for non-critical data, and always consider whether the order matters. </constant> <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode"> Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [code]TRANSFER_MODE_RELIABLE[/code]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index a33ee5c363..e872fee1cc 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -11,13 +11,13 @@ This means that when adding a node to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (recursively for the entire scene tree). [b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine. Nodes can also process input events. When present, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it. - To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. + To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children. [b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree]. [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers). Also take a look at the high-level networking tutorial and corresponding demos. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/getting_started/step_by_step/scenes_and_nodes.html</link> + <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link> </tutorials> <demos> </demos> @@ -152,7 +152,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the node can process while the scene tree is paused (see [method set_pause_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree. FIXME: Why FAIL_COND? + Returns [code]true[/code] if the node can process while the scene tree is paused (see [member pause_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree. </description> </method> <method name="duplicate" qualifiers="const"> @@ -162,7 +162,7 @@ </argument> <description> Duplicates the node, returning a new node. - You can fine-tune the behavior using the [code]flags[/code]. See DUPLICATE_* constants. + You can fine-tune the behavior using the [code]flags[/code] (see [enum Node.DuplicateFlags]). </description> </method> <method name="find_node" qualifiers="const"> @@ -179,6 +179,15 @@ If [code]owned[/code] is [code]true[/code], this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through script, because those scenes don't have an owner. </description> </method> + <method name="find_parent" qualifiers="const"> + <return type="Node"> + </return> + <argument index="0" name="mask" type="String"> + </argument> + <description> + Finds the first parent of the current node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. + </description> + </method> <method name="get_child" qualifiers="const"> <return type="Node"> </return> @@ -260,20 +269,20 @@ <description> </description> </method> - <method name="get_parent" qualifiers="const"> + <method name="get_node_or_null" qualifiers="const"> <return type="Node"> </return> + <argument index="0" name="path" type="NodePath"> + </argument> <description> - Returns the parent node of the current node, or an empty [code]Node[/code] if the node lacks a parent. + Similar to [method get_node], but does not raise an error when [code]path[/code] does not point to a valid [code]Node[/code]. </description> </method> - <method name="find_parent" qualifiers="const"> + <method name="get_parent" qualifiers="const"> <return type="Node"> </return> - <argument index="0" name="mask" type="String"> - </argument> <description> - Finds the first parent of the current node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. + Returns the parent node of the current node, or an empty [code]Node[/code] if the node lacks a parent. </description> </method> <method name="get_path" qualifiers="const"> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 13eabeca17..80f9329402 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -7,7 +7,7 @@ A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/custom_drawing_in_2d.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> </tutorials> <demos> </demos> @@ -148,7 +148,7 @@ Local [Transform2D]. </member> <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative"> - If [code]true[/code] the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. + If [code]true[/code], the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. </member> <member name="z_index" type="int" setter="set_z_index" getter="get_z_index"> Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 26684836ea..5e71ed094e 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -159,6 +159,13 @@ <description> </description> </method> + <method name="get_current_video_driver" qualifiers="const"> + <return type="int" enum="OS.VideoDriver"> + </return> + <description> + Returns the currently used video driver, using one of the values from [enum OS.VideoDriver]. + </description> + </method> <method name="get_date" qualifiers="const"> <return type="Dictionary"> </return> @@ -210,6 +217,20 @@ Returns the path to the current engine executable. </description> </method> + <method name="get_ime_selection" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns IME selection range. + </description> + </method> + <method name="get_ime_text" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns IME intermediate text. + </description> + </method> <method name="get_latin_keyboard_variant" qualifiers="const"> <return type="String"> </return> @@ -357,7 +378,14 @@ <argument index="0" name="dir" type="int" enum="OS.SystemDir"> </argument> <description> - Returns the actual path to commonly used folders across different platforms. Available locations are specified in [OS.SystemDir]. + Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum OS.SystemDir]. + </description> + </method> + <method name="get_system_time_msecs" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the epoch time of the operating system in milliseconds. </description> </method> <method name="get_system_time_secs" qualifiers="const"> @@ -438,14 +466,16 @@ <return type="int"> </return> <description> + Returns the number of video drivers supported on the current platform. </description> </method> <method name="get_video_driver_name" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="driver" type="int"> + <argument index="0" name="driver" type="int" enum="OS.VideoDriver"> </argument> <description> + Returns the name of the video driver matching the given [code]driver[/code] index. This index is a value from [enum OS.VideoDriver], and you can use [method get_current_video_driver] to get the current backend's index. </description> </method> <method name="get_virtual_keyboard_height"> @@ -556,6 +586,13 @@ Note that this method can also be used to kill processes that were not spawned by the game. </description> </method> + <method name="move_window_to_foreground"> + <return type="void"> + </return> + <description> + Moves the window to the front. + </description> + </method> <method name="native_video_is_playing"> <return type="bool"> </return> @@ -656,12 +693,22 @@ Sets the game's icon. </description> </method> + <method name="set_ime_active"> + <return type="void"> + </return> + <argument index="0" name="active" type="bool"> + </argument> + <description> + Sets whether IME input mode should be enabled. + </description> + </method> <method name="set_ime_position"> <return type="void"> </return> <argument index="0" name="position" type="Vector2"> </argument> <description> + Sets position of IME suggestion list popup (in window coordinates). </description> </method> <method name="set_thread_name"> @@ -708,7 +755,7 @@ <description> Requests the OS to open a resource with the most appropriate program. For example. [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the downloads folders of the user. - [code]OS.shell_open("http://godotengine.org")[/code] opens the default web browser on the official Godot website. + [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. </description> </method> <method name="show_virtual_keyboard"> @@ -732,28 +779,28 @@ The exit code passed to the OS when the main loop exits. </member> <member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on"> - If [code]true[/code] the engine tries to keep the screen on while the game is running. Useful on mobile. + If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile. </member> <member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode"> - If [code]true[/code] the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. + If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. </member> <member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation"> The current screen orientation. </member> <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled"> - If [code]true[/code] vertical synchronization (Vsync) is enabled. + If [code]true[/code], vertical synchronization (Vsync) is enabled. </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window"> - If [code]true[/code] removes the window frame. + If [code]true[/code], removes the window frame. </member> <member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen"> - If [code]true[/code] the window is fullscreen. + If [code]true[/code], the window is fullscreen. </member> <member name="window_maximized" type="bool" setter="set_window_maximized" getter="is_window_maximized"> - If [code]true[/code] the window is maximized. + If [code]true[/code], the window is maximized. </member> <member name="window_minimized" type="bool" setter="set_window_minimized" getter="is_window_minimized"> - If [code]true[/code] the window is minimized. + If [code]true[/code], the window is minimized. </member> <member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled"> </member> @@ -768,6 +815,12 @@ </member> </members> <constants> + <constant name="VIDEO_DRIVER_GLES2" value="1" enum="VideoDriver"> + The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web. + </constant> + <constant name="VIDEO_DRIVER_GLES3" value="0" enum="VideoDriver"> + The GLES3 rendering backend. It uses OpenGL ES 3.0 on mobile devices, OpenGL 3.3 on desktop platforms and WebGL 2.0 on the web. + </constant> <constant name="DAY_SUNDAY" value="0" enum="Weekday"> Sunday. </constant> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index fcd105d66b..76cbe5eebd 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -4,7 +4,8 @@ Base class for all non built-in types. </brief_description> <description> - Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class. + Base class for all non built-in types. Everything which is not a built-in type starts the inheritance chain from this class. + Objects can be constructed from scripting languages, using [code]Object.new()[/code] in GDScript, [code]new Object[/code] in C#, or the "Construct Object" node in VisualScript. Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++). Some derivatives add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. @@ -348,6 +349,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/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index e8d6b54f27..b8adc4c96f 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -14,13 +14,13 @@ </methods> <members> <member name="closed" type="bool" setter="set_closed" getter="is_closed"> - If [code]true[/code] closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value [code]true[/code]. + If [code]true[/code], closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value [code]true[/code]. </member> <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode"> Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code]. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - A [Vector2] array with the index for polygon's vertices positions. + A [Vector2] array with the index for polygon's vertices positions. Note that the returned value is a copy of the underlying array, rather than a reference. </member> </members> <constants> diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml index 5ed058bb06..8d67cb626b 100644 --- a/doc/classes/OmniLight.xml +++ b/doc/classes/OmniLight.xml @@ -7,7 +7,7 @@ An Omnidirectional light is a type of [Light] that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/lights_and_shadows.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index c58c932b61..0f795b4bf8 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -71,7 +71,16 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Return the ID of the item at index "idx". + Return the ID of the item at index [code]idx[/code]. + </description> + </method> + <method name="get_item_index" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + Return the index of the item with the given [code]id[/code]. </description> </method> <method name="get_item_metadata" qualifiers="const"> @@ -198,14 +207,14 @@ <argument index="0" name="ID" type="int"> </argument> <description> - This signal is emitted when user navigated to an item using [code]ui_up[/code] or [code]ui_down[/code] action. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). + This signal is emitted when user navigated to an item using [code]ui_up[/code] or [code]ui_down[/code] action. ID of the item selected is passed as argument. </description> </signal> <signal name="item_selected"> <argument index="0" name="ID" type="int"> </argument> <description> - This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). + This signal is emitted when the current item was changed by the user. Index of the item selected is passed as argument. </description> </signal> </signals> diff --git a/doc/classes/OrientedPathFollow.xml b/doc/classes/OrientedPathFollow.xml deleted file mode 100644 index 85d60936ad..0000000000 --- a/doc/classes/OrientedPathFollow.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="OrientedPathFollow" inherits="Spatial" category="Core" version="3.1"> - <brief_description> - 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. - 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> - </tutorials> - <demos> - </demos> - <methods> - </methods> - <members> - <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation"> - If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise. - The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. - There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. - </member> - <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset"> - The node's offset along the curve. - </member> - <member name="loop" type="bool" setter="set_loop" getter="has_loop"> - If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. - </member> - <member name="offset" type="float" setter="set_offset" getter="get_offset"> - The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. - </member> - <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset"> - The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. - </member> - <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset"> - The node's offset perpendicular to the curve. - </member> - </members> - <constants> - </constants> -</class> 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/PackedScene.xml b/doc/classes/PackedScene.xml index 08df3f0ad6..432ca4b23f 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -6,10 +6,23 @@ <description> A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]). Note that the node doesn't need to own itself. - Example of saving a node: + Example of saving a node with different owners: The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. [codeblock] + # create the objects + var node = Node2D.new() + var rigid = RigidBody2D.new() + var collision = CollisionShape2D.new() + + # create the object hierarchy + rigid.add_child(collision) + node.add_child(rigid) + + # change owner of rigid, but not of collision + rigid.owner = node + var scene = PackedScene.new() - var result = scene.pack(child) + # only node and rigid are now packed + var result = scene.pack(node) if result == OK: ResourceSaver.save("res://path/name.scn", scene) # or user://... [/codeblock] @@ -39,7 +52,7 @@ <argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0"> </argument> <description> - Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers the [enum Node.NOTIFICATION_INSTANCED] notification on the root node. + Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers [Node]'s [code]NOTIFICATION_INSTANCED[/code] notification on the root node. </description> </method> <method name="pack"> @@ -48,7 +61,7 @@ <argument index="0" name="path" type="Node"> </argument> <description> - Pack will ignore any sub-nodes not owned by given node. See [method Node.set_owner]. + Pack will ignore any sub-nodes not owned by given node. See [member Node.owner]. </description> </method> </methods> diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml index 2409b7a1c1..81795df87f 100644 --- a/doc/classes/ParallaxBackground.xml +++ b/doc/classes/ParallaxBackground.xml @@ -20,7 +20,7 @@ Base motion scale of all [ParallaxLayer] children. </member> <member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom"> - If [code]true[/code] elements in [ParallaxLayer] child aren't affected by the zoom level of the camera. + If [code]true[/code], elements in [ParallaxLayer] child aren't affected by the zoom level of the camera. </member> <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin"> Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than [member scroll_limit_end] to work. diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 2e30750bf9..b6e31d3576 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -49,7 +49,7 @@ The number of draw passes when rendering particles. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> - If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. + If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code]. @@ -62,10 +62,10 @@ Amount of time each particle will exist. Default value: [code]1[/code]. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> - If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code]. + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> - If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. + If [code]true[/code], only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting. diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index f872552a49..91c1a0ca9b 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -16,12 +16,14 @@ <return type="Rect2"> </return> <description> + Returns a rectangle containing the positions of all existing particles. </description> </method> <method name="restart"> <return type="void"> </return> <description> + Restarts all the existing particles. </description> </method> </methods> @@ -33,28 +35,28 @@ Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code]. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> - If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. + If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. </member> <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> - </member> - <member name="h_frames" type="int" setter="set_h_frames" getter="get_h_frames"> - Number of horizontal frames in [code]texture[/code]. + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> Amount of time each particle will exist. Default value: [code]1[/code]. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> - If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code]. + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + Normal map to be used for the [code]texture[/code] property. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> - If [code]true[/code] only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> Particle system starts as if it had already run for this many seconds. @@ -71,9 +73,6 @@ <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> Particle texture. If [code]null[/code] particles will be squares. </member> - <member name="v_frames" type="int" setter="set_v_frames" getter="get_v_frames"> - Number of vertical frames in [code]texture[/code]. - </member> <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect"> Editor visibility helper. </member> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 354b98485e..89913d9e0d 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -6,6 +6,7 @@ <description> ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [Particles] and [Particles2D] emitter nodes. Some of this material's properties are applied to each particle when emitted, while others can have a [CurveTexture] applied to vary values over the lifetime of the particle. + When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between [code]1.0[/code] and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of [code]0.4[/code] would scale the original property between [code]0.4-1.0[/code] of its original value. </description> <tutorials> </tutorials> @@ -15,7 +16,8 @@ </methods> <members> <member name="angle" type="float" setter="set_param" getter="get_param"> - Initial rotation applied to each particle. + Initial rotation applied to each particle, in degrees. + Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. </member> <member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> Each particle's rotation will be animated along this [CurveTexture]. @@ -24,7 +26,8 @@ Rotation randomness ratio. Default value: [code]0[/code]. </member> <member name="angular_velocity" type="float" setter="set_param" getter="get_param"> - Initial angular velocity applied to each particle. + Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. </member> <member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> Each particle's angular velocity will vary along this [CurveTexture]. @@ -32,9 +35,6 @@ <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> Angular velocity randomness ratio. Default value: [code]0[/code]. </member> - <member name="anim_loop" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] animation will loop. Default value: [code]false[/code]. - </member> <member name="anim_offset" type="float" setter="set_param" getter="get_param"> Particle animation offset. </member> @@ -54,7 +54,7 @@ Animation speed randomness ratio. Default value: [code]0[/code]. </member> <member name="color" type="Color" setter="set_color" getter="get_color"> - Each particle's initial color. If the [Particle2D]'s [code]texture[/code] is defined, it will be multiplied by this color. + Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [SpatialMaterial] make sure to set [member SpatialMaterial.vertex_color_use_as_albedo] to [code]true[/code]. </member> <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp"> Each particle's color will vary along this [GradientTexture]. @@ -72,13 +72,16 @@ The box's extents if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_BOX[/code]. </member> <member name="emission_color_texture" type="Texture" setter="set_emission_color_texture" getter="get_emission_color_texture"> + Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture]. </member> <member name="emission_normal_texture" type="Texture" setter="set_emission_normal_texture" getter="get_emission_normal_texture"> + Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [code]EMISSION_SHAPE_DIRECTED[/code]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. </member> <member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count"> The number of emission points if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_POINTS[/code] or [code]EMISSION_SHAPE_DIRECTED_POINTS[/code]. </member> <member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture"> + Particles will be emitted at positions determined by sampling this texture at a random position. Used with [code]EMISSION_SHAPE_POINTS[/code] and [code]EMISSION_SHAPE_DIRECTED_POINTS[/code]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape"> Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. Default value: [code]EMISSION_SHAPE_POINT[/code]. @@ -87,13 +90,16 @@ The sphere's radius if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_SPHERE[/code]. </member> <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag"> + Align y-axis of particle with the direction of its velocity. </member> <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles]. + If [code]true[/code], particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles]. </member> <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag"> + If [code]true[/code], particles rotate around y-axis by [member angle]. </member> <member name="flatness" type="float" setter="set_flatness" getter="get_flatness"> + Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. Default [code]0[/code]. </member> <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity"> Gravity applied to every particle. Default value: [code](0, 98, 0)[/code]. @@ -108,13 +114,13 @@ Hue variation randomness ratio. Default value: [code]0[/code]. </member> <member name="initial_velocity" type="float" setter="set_param" getter="get_param"> - Initial velocity for each particle. + Initial velocity magnitude for each particle. Direction comes from [member spread]. </member> <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> Initial velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="linear_accel" type="float" setter="set_param" getter="get_param"> - Linear acceleration applied to each particle. + Linear acceleration applied to each particle. Acceleration increases velocity magnitude each frame without affecting direction. </member> <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> Each particle's linear acceleration will vary along this [CurveTexture]. @@ -123,7 +129,8 @@ Linear acceleration randomness ratio. Default value: [code]0[/code]. </member> <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> - Orbital velocity applied to each particle. + Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. + Only available when [member flag_disable_z] is [code]true[/code]. </member> <member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> Each particle's orbital velocity will vary along this [CurveTexture]. @@ -132,7 +139,7 @@ Orbital velocity randomness ratio. Default value: [code]0[/code]. </member> <member name="radial_accel" type="float" setter="set_param" getter="get_param"> - Radial acceleration applied to each particle. + Radial acceleration applied to each particle. Makes particle accelerate away from origin. </member> <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> Each particle's radial acceleration will vary along this [CurveTexture]. @@ -150,10 +157,10 @@ Scale randomness ratio. Default value: [code]0[/code]. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread"> - Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. Applied to X/Z plane and Y/Z planes. </member> <member name="tangential_accel" type="float" setter="set_param" getter="get_param"> - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity. + Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. </member> <member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> Each particle's tangential acceleration will vary along this [CurveTexture]. @@ -216,7 +223,7 @@ <constant name="FLAG_ROTATE_Y" value="1" enum="Flags"> Use with [method set_flag] to set [member flag_rotate_y] </constant> - <constant name="FLAG_MAX" value="4" enum="Flags"> + <constant name="FLAG_MAX" value="3" enum="Flags"> </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> All particles will be emitted from a single point. @@ -228,8 +235,10 @@ Particles will be emitted in the volume of a box. </constant> <constant name="EMISSION_SHAPE_POINTS" value="3" enum="EmissionShape"> + Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle color will be modulated by [member emission_color_texture]. </constant> <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> + Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture]. </constant> </constants> </class> diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml index 650fed7ec6..da4782a7c3 100644 --- a/doc/classes/PathFollow.xml +++ b/doc/classes/PathFollow.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation"> - If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise. + If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. </member> @@ -51,5 +51,8 @@ <constant name="ROTATION_XYZ" value="3" enum="RotationMode"> Allows the PathFollow to rotate in any axis. </constant> + <constant name="ROTATION_ORIENTED" value="4" enum="RotationMode"> + Uses the up vector information in a [Curve3D] to enforce orientation. This rotation mode requires the [Path]'s [member Curve3D.up_vector_enabled] property to be set to [code]true[/code]. + </constant> </constants> </class> diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml index 515c921d0d..a31652b7f9 100644 --- a/doc/classes/PathFollow2D.xml +++ b/doc/classes/PathFollow2D.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation"> - If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise. + If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. </member> diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml index aa54d9a11a..1bffea0c09 100644 --- a/doc/classes/Physics2DDirectSpaceState.xml +++ b/doc/classes/Physics2DDirectSpaceState.xml @@ -7,7 +7,7 @@ Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/ray-casting.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <demos> </demos> @@ -18,7 +18,7 @@ <argument index="0" name="shape" type="Physics2DShapeQueryParameters"> </argument> <description> - Checks how far the shape can travel toward a point. Note that both the shape and the motion are supplied through a [Physics2DShapeQueryParameters] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [1, 1]. + Checks how far the shape can travel toward a point. Note that both the shape and the motion are supplied through a [Physics2DShapeQueryParameters] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. If the shape can not move, the array will be empty. </description> </method> @@ -75,6 +75,26 @@ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively. </description> </method> + <method name="intersect_point_on_canvas"> + <return type="Array"> + </return> + <argument index="0" name="point" type="Vector2"> + </argument> + <argument index="1" name="canvas_instance_id" type="int"> + </argument> + <argument index="2" name="max_results" type="int" default="32"> + </argument> + <argument index="3" name="exclude" type="Array" default="[ ]"> + </argument> + <argument index="4" name="collision_layer" type="int" default="2147483647"> + </argument> + <argument index="5" name="collide_with_bodies" type="bool" default="true"> + </argument> + <argument index="6" name="collide_with_areas" type="bool" default="false"> + </argument> + <description> + </description> + </method> <method name="intersect_ray"> <return type="Dictionary"> </return> diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index a473de4ce8..341457a2b3 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -24,6 +24,16 @@ Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. </description> </method> + <method name="area_attach_canvas_instance_id"> + <return type="void"> + </return> + <argument index="0" name="area" type="RID"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> <method name="area_attach_object_instance_id"> <return type="void"> </return> @@ -51,6 +61,14 @@ Creates an [Area2D]. </description> </method> + <method name="area_get_canvas_instance_id" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="area" type="RID"> + </argument> + <description> + </description> + </method> <method name="area_get_object_instance_id" qualifiers="const"> <return type="int"> </return> @@ -377,6 +395,16 @@ <description> </description> </method> + <method name="body_attach_canvas_instance_id"> + <return type="void"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> <method name="body_attach_object_instance_id"> <return type="void"> </return> @@ -404,6 +432,14 @@ Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. </description> </method> + <method name="body_get_canvas_instance_id" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <description> + </description> + </method> <method name="body_get_collision_layer" qualifiers="const"> <return type="int"> </return> @@ -699,6 +735,8 @@ </argument> <argument index="2" name="enable" type="bool"> </argument> + <argument index="3" name="margin" type="float"> + </argument> <description> Enables one way collision on body if [code]enable[/code] is [code]true[/code]. </description> @@ -1074,6 +1112,8 @@ <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="6" enum="SpaceParameter"> Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. </constant> + <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="7" enum="SpaceParameter"> + </constant> <constant name="SHAPE_LINE" value="0" enum="ShapeType"> This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. </constant> @@ -1092,7 +1132,7 @@ This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. </constant> <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> - This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the method [method CollisionPolygon2D.set_polygon], polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. + This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. </constant> <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml index af00027ed3..2658732f84 100644 --- a/doc/classes/PhysicsBody.xml +++ b/doc/classes/PhysicsBody.xml @@ -7,7 +7,7 @@ PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <demos> </demos> @@ -21,6 +21,13 @@ Adds a body to the list of bodies that this body can't collide with. </description> </method> + <method name="get_collision_exceptions"> + <return type="Array"> + </return> + <description> + Returns an array of nodes that were added as collision exceptions for this body. + </description> + </method> <method name="get_collision_layer_bit" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 4278979049..f848b6df70 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -7,7 +7,7 @@ PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <demos> </demos> @@ -21,6 +21,13 @@ Adds a body to the list of bodies that this body can't collide with. </description> </method> + <method name="get_collision_exceptions"> + <return type="Array"> + </return> + <description> + Returns an array of nodes that were added as collision exceptions for this body. + </description> + </method> <method name="get_collision_layer_bit" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index 2f3501ae5d..cf718f06b2 100644 --- a/doc/classes/PhysicsDirectBodyState.xml +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -46,7 +46,7 @@ </argument> <description> Applies a single directional impulse without affecting rotation. - This is equivalent to ``apply_impulse(Vector3(0,0,0), impulse)``. + This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code]. </description> </method> <method name="apply_impulse"> @@ -57,7 +57,7 @@ <argument index="1" name="j" type="Vector3"> </argument> <description> - Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin. + Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml index 1fd00fa21c..118010b3cf 100644 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -7,7 +7,7 @@ Direct access object to a space in the [PhysicsServer]. It's used mainly to do queries against objects and areas residing in a given space. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/ray-casting.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <demos> </demos> @@ -20,8 +20,8 @@ <argument index="1" name="motion" type="Vector3"> </argument> <description> - Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [1, 1]. - If the shape can not move, the returned array will be [0, 0]. + Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. + If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics. </description> </method> <method name="collide_shape"> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index c836414dd2..b797e6ecf7 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -135,7 +135,7 @@ <argument index="0" name="area" type="RID"> </argument> <description> - If [code]true[/code] area collides with rays. + If [code]true[/code], area collides with rays. </description> </method> <method name="area_remove_shape"> @@ -556,7 +556,7 @@ <argument index="0" name="body" type="RID"> </argument> <description> - If [code]true[/code] the continuous collision detection mode is enabled. + If [code]true[/code], the continuous collision detection mode is enabled. </description> </method> <method name="body_is_omitting_force_integration" qualifiers="const"> @@ -574,7 +574,7 @@ <argument index="0" name="body" type="RID"> </argument> <description> - If [code]true[/code] the body can be detected by rays + If [code]true[/code], the body can be detected by rays </description> </method> <method name="body_remove_collision_exception"> @@ -653,7 +653,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the continuous collision detection mode is enabled. + If [code]true[/code], the continuous collision detection mode is enabled. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. </description> </method> @@ -773,7 +773,7 @@ <argument index="1" name="space" type="RID"> </argument> <description> - Assigns a space to the body (see [method create_space]). + Assigns a space to the body (see [method space_create]). </description> </method> <method name="body_set_state"> @@ -884,7 +884,7 @@ <argument index="0" name="process_info" type="int" enum="PhysicsServer.ProcessInfo"> </argument> <description> - Returns an Info defined by the [ProcessInfo] input given. + Returns an Info defined by the [enum PhysicsServer.ProcessInfo] input given. </description> </method> <method name="hinge_joint_get_flag" qualifiers="const"> @@ -1286,10 +1286,10 @@ Maximum acceleration for the motor. </constant> <constant name="HINGE_JOINT_FLAG_USE_LIMIT" value="0" enum="HingeJointFlag"> - If [code]true[/code] the Hinge has a maximum and a minimum rotation. + If [code]true[/code], the Hinge has a maximum and a minimum rotation. </constant> <constant name="HINGE_JOINT_FLAG_ENABLE_MOTOR" value="1" enum="HingeJointFlag"> - If [code]true[/code] a motor turns the Hinge + If [code]true[/code], a motor turns the Hinge </constant> <constant name="SLIDER_JOINT_LINEAR_LIMIT_UPPER" value="0" enum="SliderJointParam"> The maximum difference between the pivot points on their x-axis before damping happens. @@ -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"> @@ -1595,6 +1595,8 @@ <constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7" enum="SpaceParameter"> Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. </constant> + <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="8" enum="SpaceParameter"> + </constant> <constant name="BODY_AXIS_LINEAR_X" value="1" enum="BodyAxis"> </constant> <constant name="BODY_AXIS_LINEAR_Y" value="2" enum="BodyAxis"> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index 3d5eada066..a57659abda 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -7,7 +7,7 @@ Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/math/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index bf4519fd0a..31ee0a9490 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -80,28 +80,30 @@ </methods> <members> <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased"> - If [code]true[/code] polygon edges will be anti-aliased. Default value: [code]false[/code]. + If [code]true[/code], polygon edges will be anti-aliased. Default value: [code]false[/code]. </member> <member name="bones" type="Array" setter="_set_bones" getter="_get_bones"> </member> <member name="color" type="Color" setter="set_color" getter="get_color"> The polygon's fill color. If [code]texture[/code] is defined, it will be multiplied by this color. It will also be the default color for vertices not set in [code]vertex_colors[/code]. </member> + <member name="internal_vertex_count" type="int" setter="set_internal_vertex_count" getter="get_internal_vertex_count"> + </member> <member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border"> Added padding applied to the bounding box when using [code]invert[/code]. Setting this value too small may result in a "Bad Polygon" error. Default value: [code]100[/code]. </member> <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert"> - If [code]true[/code] polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. Default value: [code]false[/code]. + If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. Default value: [code]false[/code]. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> The offset applied to each vertex. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - The polygon's list of vertices. The final point will be connected to the first. + The polygon's list of vertices. The final point will be connected to the first. Note that this returns a copy of the [PoolVector2Array] rather than a reference. </member> - <member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton"> + <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons"> </member> - <member name="splits" type="PoolIntArray" setter="set_splits" getter="get_splits"> + <member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton"> </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> The polygon's fill texture. Use [code]uv[/code] to set texture coordinates. diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml index ae722b1053..83a138be97 100644 --- a/doc/classes/PoolByteArray.xml +++ b/doc/classes/PoolByteArray.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PoolByteArray" category="Built-In Types" version="3.1"> <brief_description> - Raw byte array. + A pooled [Array] of bytes. </brief_description> <description> - Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Create from a generic array. + Construct a new [code]PoolByteArray[/code]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> @@ -40,7 +40,7 @@ <argument index="0" name="compression_mode" type="int" default="0"> </argument> <description> - Returns a new [code]PoolByteArray[/code] with the data compressed. Set the compression mode using one of [File]'s COMPRESS_* constants. + Returns a new [code]PoolByteArray[/code] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="decompress"> @@ -51,21 +51,21 @@ <argument index="1" name="compression_mode" type="int" default="0"> </argument> <description> - Returns a new [code]PoolByteArray[/code] with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of [File]'s COMPRESS_* constants. + Returns a new [code]PoolByteArray[/code] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="get_string_from_ascii"> <return type="String"> </return> <description> - Returns a copy of the array's contents as [String]. Fast alternative to [method PoolByteArray.get_string_from_utf8] if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method PoolByteArray.get_string_from_utf8]. + Returns a copy of the array's contents as [String]. Fast alternative to [method get_string_from_utf8] if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method get_string_from_utf8]. </description> </method> <method name="get_string_from_utf8"> <return type="String"> </return> <description> - Returns a copy of the array's contents as [String]. Slower than [method PoolByteArray.get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. + Returns a copy of the array's contents as [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. </description> </method> <method name="insert"> @@ -76,7 +76,7 @@ <argument index="1" name="byte" type="int"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml index 021d5f5089..9fdd1090ae 100644 --- a/doc/classes/PoolColorArray.xml +++ b/doc/classes/PoolColorArray.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PoolColorArray" category="Built-In Types" version="3.1"> <brief_description> - Array of Colors + A pooled [Array] of [Color]. </brief_description> <description> - Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold [Color]. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Create from a generic array. + Construct a new [code]PoolColorArray[/code]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> @@ -42,7 +42,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml index 347dcb09f2..a8808284b5 100644 --- a/doc/classes/PoolIntArray.xml +++ b/doc/classes/PoolIntArray.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PoolIntArray" category="Built-In Types" version="3.1"> <brief_description> - Integer Array. + A pooled [Array] of integers ([int]). </brief_description> <description> - Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold integer values ([int]). Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Create from a generic array. + Construct a new [code]PoolIntArray[/code]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> @@ -31,7 +31,7 @@ <argument index="0" name="array" type="PoolIntArray"> </argument> <description> - Append an [code]PoolIntArray[/code] at the end of this array. + Append a [code]PoolIntArray[/code] at the end of this array. </description> </method> <method name="insert"> @@ -42,7 +42,7 @@ <argument index="1" name="integer" type="int"> </argument> <description> - Insert a new int at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + Insert a new int at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml index c0c6ef8700..3eb485ce12 100644 --- a/doc/classes/PoolRealArray.xml +++ b/doc/classes/PoolRealArray.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PoolRealArray" category="Built-In Types" version="3.1"> <brief_description> - Real Array. + A pooled [Array] of reals ([float]). </brief_description> <description> - Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold floating point values ([float]). Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Create from a generic array. + Construct a new [code]PoolRealArray[/code]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> @@ -31,7 +31,7 @@ <argument index="0" name="array" type="PoolRealArray"> </argument> <description> - Append an [RealArray] at the end of this array. + Append a [code]PoolRealArray[/code] at the end of this array. </description> </method> <method name="insert"> @@ -42,7 +42,7 @@ <argument index="1" name="value" type="float"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml index 8b3ac4c16a..a02c6c1bdb 100644 --- a/doc/classes/PoolStringArray.xml +++ b/doc/classes/PoolStringArray.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PoolStringArray" category="Built-In Types" version="3.1"> <brief_description> - String Array. + A pooled [Array] of [String]. </brief_description> <description> - String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold [String]. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Create from a generic array. + Construct a new [code]PoolStringArray[/code]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> @@ -31,7 +31,7 @@ <argument index="0" name="array" type="PoolStringArray"> </argument> <description> - Append an [StringArray] at the end of this array. + Append a [code]PoolStringArray[/code] at the end of this array. </description> </method> <method name="insert"> @@ -42,7 +42,7 @@ <argument index="1" name="string" type="String"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> @@ -56,7 +56,7 @@ <argument index="0" name="delimiter" type="String"> </argument> <description> - Returns a [String] with each element of the array joined with the delimiter. + Returns a [String] with each element of the array joined with the given [code]delimiter[/code]. </description> </method> <method name="push_back"> diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml index ecf8f5a6ba..39d89c2ebd 100644 --- a/doc/classes/PoolVector2Array.xml +++ b/doc/classes/PoolVector2Array.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PoolVector2Array" category="Built-In Types" version="3.1"> <brief_description> - An Array of Vector2. + A pooled [Array] of [Vector2]. </brief_description> <description> - An Array specifically designed to hold Vector2. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold [Vector2]. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new [code]PoolVector2Array[/code]. Optionally, you can pass in an Array that will be converted. + Construct a new [code]PoolVector2Array[/code]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> @@ -31,7 +31,7 @@ <argument index="0" name="array" type="PoolVector2Array"> </argument> <description> - Append an [code]PoolVector2Array[/code] at the end of this array. + Append a [code]PoolVector2Array[/code] at the end of this array. </description> </method> <method name="insert"> @@ -42,7 +42,7 @@ <argument index="1" name="vector2" type="Vector2"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml index 456b54d209..3f77e737f6 100644 --- a/doc/classes/PoolVector3Array.xml +++ b/doc/classes/PoolVector3Array.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PoolVector3Array" category="Built-In Types" version="3.1"> <brief_description> - An Array of Vector3. + A pooled [Array] of [Vector3]. </brief_description> <description> - An Array specifically designed to hold Vector3. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold [Vector3]. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new PoolVector3Array. Optionally, you can pass in an Array that will be converted. + Construct a new [code]PoolVector3Array[/code]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> @@ -31,7 +31,7 @@ <argument index="0" name="array" type="PoolVector3Array"> </argument> <description> - Append an [code]PoolVector3Array[/code] at the end of this array. + Append a [code]PoolVector3Array[/code] at the end of this array. </description> </method> <method name="insert"> @@ -42,7 +42,7 @@ <argument index="1" name="vector3" type="Vector3"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index ae5bce5d7d..be6e8b6ef1 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -26,7 +26,7 @@ <argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> - Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size". + Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by "size". </description> </method> <method name="popup_centered_minsize"> @@ -35,7 +35,7 @@ <argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> - Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than [code]minsize[/code]. + Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than [code]minsize[/code]. </description> </method> <method name="popup_centered_ratio"> @@ -44,13 +44,13 @@ <argument index="0" name="ratio" type="float" default="0.75"> </argument> <description> - Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen. + Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen. </description> </method> </methods> <members> <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive"> - If [code]true[/code] the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event. + If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event. </member> </members> <signals> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index fe7dbe52b0..ea696e624a 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -378,7 +378,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - Mark the item at index "idx" as a separator, which means that it would be displayed as a mere line. + Mark the item at index "idx" as a separator, which means that it would be displayed as a line. </description> </method> <method name="set_item_checked"> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 0f03b7b80a..8d6e77751d 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible"> - If [code]true[/code] the fill percentage is displayed on the bar. Default value: [code]true[/code]. + If [code]true[/code], the fill percentage is displayed on the bar. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index dfecff9050..1fec737642 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -172,8 +172,8 @@ Path to an image used for boot splash. </member> <member name="application/config/custom_user_dir_name" type="String" setter="" getter=""> - This directory is used for storing persistent data (user:// filesystem). If a custom name is set, then system paths will be used to store this on Desktop (AppData on Windows, user ~/.config on Unixes, etc), else the Godot config folder is used. This name needs to be unique, and it's recommended to set it to something before publishing. - the "use_custom_user_dir" setting must be enabled for this to take effect. + This user directory is used for storing persistent data ([code]user://[/code] filesystem). By default (no custom name defined), [code]user://[/code] resolves to a project-specific folder in Godot's own configuration folder (see [method OS.get_user_data_dir]). If a custom directory name is defined, this name will be used instead and appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in [method OS.get_user_data_dir]). + The [member application/config/use_custom_user_dir] setting must be enabled for this to take effect. </member> <member name="application/config/icon" type="String" setter="" getter=""> Icon used for the project, set when project loads. Exporters will use this icon when possible to. @@ -181,8 +181,11 @@ <member name="application/config/name" type="String" setter="" getter=""> Name of the project. It is used from both project manager and by the exporters. Overriding this as name.locale allows setting it in multiple languages. </member> + <member name="application/config/project_settings_override" type="String" setter="" getter=""> + Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. + </member> <member name="application/config/use_custom_user_dir" type="bool" setter="" getter=""> - Allow the project to save to its own custom user dir (in AppData on windows or ~/.config on unixes). This setting only works for desktop exporters. A name must be set in the "custom_user_dir_name" setting for this to take effect. + Allow the project to save to its own custom user dir (see [member application/config/custom_user_dir_name]). This setting only works for desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. </member> <member name="application/run/disable_stderr" type="bool" setter="" getter=""> Disable printing to stderr on exported build. @@ -210,9 +213,14 @@ </member> <member name="audio/driver" type="String" setter="" getter=""> </member> + <member name="audio/enable_audio_input" type="bool" setter="" getter=""> + This option should be enabled if project works with microphone. + </member> <member name="audio/mix_rate" type="int" setter="" getter=""> Mix rate used for audio. In general, it's better to not touch this and leave it to the host operating system. </member> + <member name="audio/output_latency" type="int" setter="" getter=""> + </member> <member name="audio/video_delay_compensation_ms" type="int" setter="" getter=""> Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing. </member> @@ -230,6 +238,8 @@ </member> <member name="compression/formats/zstd/window_log_size" type="int" setter="" getter=""> </member> + <member name="debug/gdscript/completion/autocomplete_setters_and_getters" type="bool" setter="" getter=""> + </member> <member name="debug/gdscript/warnings/constant_used_as_function" type="bool" setter="" getter=""> </member> <member name="debug/gdscript/warnings/deprecated_keyword" type="bool" setter="" getter=""> @@ -309,9 +319,6 @@ <member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter=""> Hotspot for the custom mouse cursor image. </member> - <member name="display/window/allow_per_pixel_transparency" type="bool" setter="" getter=""> - Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off. - </member> <member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter=""> Allow HiDPI display on Windows and OSX. On Desktop Linux, this can't be enabled or disabled. </member> @@ -321,9 +328,12 @@ <member name="display/window/handheld/orientation" type="String" setter="" getter=""> Default orientation for cell phone or tablet. </member> - <member name="display/window/per_pixel_transparency" type="bool" setter="" getter=""> + <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter=""> + Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off. + </member> + <member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter=""> </member> - <member name="display/window/per_pixel_transparency_splash" type="bool" setter="" getter=""> + <member name="display/window/per_pixel_transparency/splash" type="bool" setter="" getter=""> </member> <member name="display/window/size/always_on_top" type="bool" setter="" getter=""> Force the window to be always on top. @@ -372,7 +382,7 @@ <member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter=""> Timer setting for incremental search in Tree, IntemList, etc. controls. </member> - <member name="gui/timers/text_edit_idle_detect_sec" type="int" setter="" getter=""> + <member name="gui/timers/text_edit_idle_detect_sec" type="float" setter="" getter=""> Timer for detecting idle in the editor. </member> <member name="input/ui_accept" type="Dictionary" setter="" getter=""> @@ -573,10 +583,10 @@ Log all output to a file. </member> <member name="logging/file_logging/log_path" type="String" setter="" getter=""> - Path to logs withint he project. Using an user:// based path is recommended. + Path to logs withint he project. Using an [code]user://[/code] based path is recommended. </member> <member name="logging/file_logging/max_log_files" type="int" setter="" getter=""> - Amount of log files (used for rotation)/ + Amount of log files (used for rotation). </member> <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter=""> Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here. @@ -584,14 +594,6 @@ <member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter=""> This is used by servers when used in multi threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number. </member> - <member name="mono/debugger_agent/port" type="int" setter="" getter=""> - </member> - <member name="mono/debugger_agent/wait_for_debugger" type="bool" setter="" getter=""> - </member> - <member name="mono/debugger_agent/wait_timeout" type="int" setter="" getter=""> - </member> - <member name="mono/export/include_scripts_content" type="bool" setter="" getter=""> - </member> <member name="network/limits/debugger_stdout/max_chars_per_second" type="int" setter="" getter=""> Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> @@ -604,8 +606,21 @@ <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter=""> Default size of packet peer stream for deserializing godot data. Over this size, data is dropped. </member> - <member name="network/remote_fs/max_pages" type="int" setter="" getter=""> - Maximum amount of pages used for remote filesystem (used by debugging). + <member name="network/limits/websocket_client/max_in_buffer_kb" type="int" setter="" getter=""> + </member> + <member name="network/limits/websocket_client/max_in_packets" type="int" setter="" getter=""> + </member> + <member name="network/limits/websocket_client/max_out_buffer_kb" type="int" setter="" getter=""> + </member> + <member name="network/limits/websocket_client/max_out_packets" type="int" setter="" getter=""> + </member> + <member name="network/limits/websocket_server/max_in_buffer_kb" type="int" setter="" getter=""> + </member> + <member name="network/limits/websocket_server/max_in_packets" type="int" setter="" getter=""> + </member> + <member name="network/limits/websocket_server/max_out_buffer_kb" type="int" setter="" getter=""> + </member> + <member name="network/limits/websocket_server/max_out_packets" type="int" setter="" getter=""> </member> <member name="network/remote_fs/page_read_ahead" type="int" setter="" getter=""> Amount of read ahead used by remote filesystem. Improves latency. @@ -652,9 +667,13 @@ <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter=""> Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not mesh themselves. </member> - <member name="rendering/limits/time/time_rollover_secs" type="int" setter="" getter=""> + <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter=""> Shaders have a time variable that constantly increases. At some point it needs to be rolled back to zero to avoid numerical errors on shader animations. This setting specifies when. </member> + <member name="rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" type="bool" setter="" getter=""> + Some Nvidia GPU drivers have a bug, which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to https://github.com/godotengine/godot/issues/9913 for details. + If [code]true[/code], this option enables a "safe" code path for such Nvidia GPUs, at the cost of performance. This option only impacts the GLES2 rendering backend (so the bug stays if you use GLES3), and only desktop platforms. Default value: [code]false[/code]. + </member> <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter=""> Force snapping of polygons to pixels in 2D rendering. May help in some pixel art styles. </member> @@ -669,10 +688,13 @@ </member> <member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter=""> </member> - <member name="rendering/quality/driver/driver_fallback" type="String" setter="" getter=""> - Whether to allow falling back to other graphics drivers if the preferred driver is not available. Best means use the best working driver (this is the default). Never means never fall back to another driver even if it does not work. This means the project will not run if the preferred driver does not function. - </member> <member name="rendering/quality/driver/driver_name" type="String" setter="" getter=""> + Name of the configured video driver ("GLES2" or "GLES3"). + Note that the backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument, or by the [member rendering/quality/driver/fallback_to_gles2] option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at runtime. + </member> + <member name="rendering/quality/driver/fallback_to_gles2" type="bool" setter="" getter=""> + Whether to allow falling back to the GLES2 driver if the GLES3 driver is not supported. Default value: [code]false[/code]. + Note that the two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the size of the game data pack. </member> <member name="rendering/quality/filters/anisotropic_filter_level" type="int" setter="" getter=""> Maximum Anisotropic filter level used for textures when anisotropy enabled. diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 67631bbc92..990dcc7a91 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -9,8 +9,7 @@ Quaternions need to be (re)normalized. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link> - <link>http://docs.godotengine.org/en/latest/tutorials/math/rotations.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link> </tutorials> <demos> </demos> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml new file mode 100644 index 0000000000..fff13402f1 --- /dev/null +++ b/doc/classes/RandomNumberGenerator.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="RandomNumberGenerator" inherits="Reference" category="Core" version="3.1"> + <brief_description> + A class for generation pseudo-random numbers. + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="randf"> + <return type="float"> + </return> + <description> + Generates pseudo-random float between '0.0' and '1.0'. + </description> + </method> + <method name="randf_range"> + <return type="float"> + </return> + <argument index="0" name="from" type="float"> + </argument> + <argument index="1" name="to" type="float"> + </argument> + <description> + Generates pseudo-random float between [code]from[/code] and [code]to[/code]. + </description> + </method> + <method name="randi"> + <return type="int"> + </return> + <description> + Generates pseudo-random 32-bit unsigned integer between '0' and '4294967295'. + </description> + </method> + <method name="randi_range"> + <return type="int"> + </return> + <argument index="0" name="from" type="int"> + </argument> + <argument index="1" name="to" type="int"> + </argument> + <description> + Generates pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive). + </description> + </method> + <method name="randomize"> + <return type="void"> + </return> + <description> + Setups a time-based seed to generator. + </description> + </method> + </methods> + <members> + <member name="seed" type="int" setter="set_seed" getter="get_seed"> + The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 46a6132b94..0dc02a68da 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -30,13 +30,13 @@ </methods> <members> <member name="allow_greater" type="bool" setter="set_allow_greater" getter="is_greater_allowed"> - If [code]true[/code] [member value] may be greater than [member max_value]. Default value: [code]false[/code]. + If [code]true[/code], [member value] may be greater than [member max_value]. Default value: [code]false[/code]. </member> <member name="allow_lesser" type="bool" setter="set_allow_lesser" getter="is_lesser_allowed"> - If [code]true[/code] [member value] may be less than [member min_value]. Default value: [code]false[/code]. + If [code]true[/code], [member value] may be less than [member min_value]. Default value: [code]false[/code]. </member> <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp"> - If [code]true[/code] and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly. + If [code]true[/code], and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly. </member> <member name="max_value" type="float" setter="set_max" getter="get_max"> Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code]. Default value: [code]100[/code]. @@ -51,7 +51,7 @@ The value mapped between 0 and 1. </member> <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values"> - If [code]true[/code] [code]value[/code] will always be rounded to the nearest integer. Default value: [code]false[/code]. + If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. Default value: [code]false[/code]. </member> <member name="step" type="float" setter="set_step" getter="get_step"> If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer. diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml index 84c83d1282..61f2737c01 100644 --- a/doc/classes/RayCast.xml +++ b/doc/classes/RayCast.xml @@ -136,10 +136,10 @@ The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> - If [code]true[/code] collisions will be reported. Default value: [code]false[/code]. + If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. </member> <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body"> - If [code]true[/code] collisions will be ignored for this RayCast's immediate parent. Default value: [code]true[/code]. + If [code]true[/code], collisions will be ignored for this RayCast's immediate parent. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml index e03541011d..50d324f72c 100644 --- a/doc/classes/RayShape.xml +++ b/doc/classes/RayShape.xml @@ -17,7 +17,7 @@ The ray's length. </member> <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope"> - If [code]true[/code] allow the shape to return the correct normal. Default value: [code]false[/code]. + If [code]true[/code], allow the shape to return the correct normal. Default value: [code]false[/code]. </member> </members> <constants> diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml index 37cfe4f2d3..2fdc1930fb 100644 --- a/doc/classes/RayShape2D.xml +++ b/doc/classes/RayShape2D.xml @@ -17,7 +17,7 @@ The ray's length. </member> <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope"> - If [code]true[/code] allow the shape to return the correct normal. Default value: [code]false[/code]. + If [code]true[/code], allow the shape to return the correct normal. Default value: [code]false[/code]. </member> </members> <constants> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 1eea940da9..45bfd16cb8 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -7,7 +7,7 @@ Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/math/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <demos> </demos> @@ -111,7 +111,7 @@ <argument index="1" name="by" type="float"> </argument> <description> - Returns a copy of the [code]Rect2[/code] grown a given amount of units towards the [Margin] direction. + Returns a copy of the [code]Rect2[/code] grown a given amount of units towards the [enum Margin] direction. </description> </method> <method name="has_no_area"> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index a9a897ebaf..7662f72eca 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -5,7 +5,7 @@ <description> </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/reflection_probes.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml index 1a5d1eb907..3df94bdfca 100644 --- a/doc/classes/RemoteTransform.xml +++ b/doc/classes/RemoteTransform.xml @@ -18,16 +18,16 @@ The [NodePath] to the remote node, relative to the RemoteTransform's position in the scene. </member> <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position"> - If [code]true[/code] the remote node's position is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's position is updated. Default value: [code]true[/code]. </member> <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation"> - If [code]true[/code] the remote node's rotation is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's rotation is updated. Default value: [code]true[/code]. </member> <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale"> - If [code]true[/code] the remote node's scale is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's scale is updated. Default value: [code]true[/code]. </member> <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates"> - If [code]true[/code] global coordinates are used. If [code]false[/code] local coordinates are used. Default value: [code]true[/code]. + If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml index d83ec9f6b1..cf0e6c6199 100644 --- a/doc/classes/RemoteTransform2D.xml +++ b/doc/classes/RemoteTransform2D.xml @@ -18,16 +18,16 @@ The [NodePath] to the remote node, relative to the RemoteTransform2D's position in the scene. </member> <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position"> - If [code]true[/code] the remote node's position is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's position is updated. Default value: [code]true[/code]. </member> <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation"> - If [code]true[/code] the remote node's rotation is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's rotation is updated. Default value: [code]true[/code]. </member> <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale"> - If [code]true[/code] the remote node's scale is updated. Default value: [code]true[/code]. + If [code]true[/code], the remote node's scale is updated. Default value: [code]true[/code]. </member> <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates"> - If [code]true[/code] global coordinates are used. If [code]false[/code] local coordinates are used. Default value: [code]true[/code]. + If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index fc42635ce2..4369f77abd 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -4,9 +4,10 @@ Base class for all resources. </brief_description> <description> - Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. + Resource is the base class for all resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. </description> <tutorials> + <link>https://docs.godotengine.org/en/stable/getting_started/step_by_step/resources.html</link> </tutorials> <demos> </demos> @@ -23,6 +24,7 @@ <argument index="0" name="subresources" type="bool" default="false"> </argument> <description> + Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency, this can be changed by passing [code]true[/code] to the [code]subresources[/code] argument. </description> </method> <method name="get_local_scene" qualifiers="const"> @@ -35,7 +37,7 @@ <return type="RID"> </return> <description> - Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID. + Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID. </description> </method> <method name="setup_local_to_scene"> @@ -50,7 +52,7 @@ <argument index="0" name="path" type="String"> </argument> <description> - Set the path of the resource. Differs from set_path(), if another [code]Resource[/code] exists with "path" it over-takes it, instead of failing. + Sets the path of the resource. Differs from [code]set_path()[/code], if another [code]Resource[/code] exists with "path" it over-takes it, instead of failing. </description> </method> </methods> @@ -58,8 +60,10 @@ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene"> </member> <member name="resource_name" type="String" setter="set_name" getter="get_name"> + The name of the resource. This is an optional identifier. </member> <member name="resource_path" type="String" setter="set_path" getter="get_path"> + The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index. </member> </members> <signals> diff --git a/doc/classes/ResourceFormatDDS.xml b/doc/classes/ResourceFormatDDS.xml new file mode 100644 index 0000000000..e237dfc6a5 --- /dev/null +++ b/doc/classes/ResourceFormatDDS.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatDDS" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatImporter.xml b/doc/classes/ResourceFormatImporter.xml new file mode 100644 index 0000000000..fa5b44fa18 --- /dev/null +++ b/doc/classes/ResourceFormatImporter.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatImporter" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml new file mode 100644 index 0000000000..97547a607a --- /dev/null +++ b/doc/classes/ResourceFormatLoader.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoader" inherits="Reference" category="Core" version="3.1"> + <brief_description> + Loads a specific resource type from a file. + </brief_description> + <description> + Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They get queried when you call [code]load[/code], or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoader are registered in the engine. + Extending this class allows you to define your own. You should give it a global class name with [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatSaver]. + Note: You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. Example: it's better to import .PNG textures as .STEX first, so they can be loaded with better efficiency on the graphics card. + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="get_dependencies" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="add_types" type="String"> + </argument> + <description> + If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]Resource[/code] for them. + </description> + </method> + <method name="get_recognized_extensions" qualifiers="virtual"> + <return type="PoolStringArray"> + </return> + <description> + Gets the list of extensions for files this loader is able to read. + </description> + </method> + <method name="get_resource_type" qualifiers="virtual"> + <return type="String"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return [code]""[/code]. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. + </description> + </method> + <method name="handles_type" qualifiers="virtual"> + <return type="bool"> + </return> + <argument index="0" name="typename" type="String"> + </argument> + <description> + Tells which resource class this loader can load. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them. + </description> + </method> + <method name="load" qualifiers="virtual"> + <return type="Variant"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="original_path" type="String"> + </argument> + <description> + Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a resource object if succeeded, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed. + </description> + </method> + <method name="rename_dependencies" qualifiers="virtual"> + <return type="int"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="renames" type="String"> + </argument> + <description> + If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String => String }[/code] mapping old dependency paths to new paths. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] in case of failure. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderBMFont.xml b/doc/classes/ResourceFormatLoaderBMFont.xml new file mode 100644 index 0000000000..1e999353f8 --- /dev/null +++ b/doc/classes/ResourceFormatLoaderBMFont.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderBMFont" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderBinary.xml b/doc/classes/ResourceFormatLoaderBinary.xml new file mode 100644 index 0000000000..3c768851e2 --- /dev/null +++ b/doc/classes/ResourceFormatLoaderBinary.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderBinary" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderDynamicFont.xml b/doc/classes/ResourceFormatLoaderDynamicFont.xml new file mode 100644 index 0000000000..4cd5c9b2a6 --- /dev/null +++ b/doc/classes/ResourceFormatLoaderDynamicFont.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderDynamicFont" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderGDScript.xml b/doc/classes/ResourceFormatLoaderGDScript.xml new file mode 100644 index 0000000000..b661e4746a --- /dev/null +++ b/doc/classes/ResourceFormatLoaderGDScript.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderGDScript" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderImage.xml b/doc/classes/ResourceFormatLoaderImage.xml new file mode 100644 index 0000000000..5f7e55af28 --- /dev/null +++ b/doc/classes/ResourceFormatLoaderImage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderImage" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderNativeScript.xml b/doc/classes/ResourceFormatLoaderNativeScript.xml new file mode 100644 index 0000000000..496602e7dd --- /dev/null +++ b/doc/classes/ResourceFormatLoaderNativeScript.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderNativeScript" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderShader.xml b/doc/classes/ResourceFormatLoaderShader.xml new file mode 100644 index 0000000000..0948810532 --- /dev/null +++ b/doc/classes/ResourceFormatLoaderShader.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderShader" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderStreamTexture.xml b/doc/classes/ResourceFormatLoaderStreamTexture.xml new file mode 100644 index 0000000000..34843f9e1a --- /dev/null +++ b/doc/classes/ResourceFormatLoaderStreamTexture.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderStreamTexture" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderText.xml b/doc/classes/ResourceFormatLoaderText.xml new file mode 100644 index 0000000000..db3b28f233 --- /dev/null +++ b/doc/classes/ResourceFormatLoaderText.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderText" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderTextureLayered.xml b/doc/classes/ResourceFormatLoaderTextureLayered.xml new file mode 100644 index 0000000000..cd31f35e49 --- /dev/null +++ b/doc/classes/ResourceFormatLoaderTextureLayered.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderTextureLayered" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderTheora.xml b/doc/classes/ResourceFormatLoaderTheora.xml new file mode 100644 index 0000000000..dff7e2f3dc --- /dev/null +++ b/doc/classes/ResourceFormatLoaderTheora.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderTheora" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatLoaderWebm.xml b/doc/classes/ResourceFormatLoaderWebm.xml new file mode 100644 index 0000000000..f2b403161e --- /dev/null +++ b/doc/classes/ResourceFormatLoaderWebm.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatLoaderWebm" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatPKM.xml b/doc/classes/ResourceFormatPKM.xml new file mode 100644 index 0000000000..aa511823d3 --- /dev/null +++ b/doc/classes/ResourceFormatPKM.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatPKM" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatPVR.xml b/doc/classes/ResourceFormatPVR.xml new file mode 100644 index 0000000000..4f3b4f670f --- /dev/null +++ b/doc/classes/ResourceFormatPVR.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatPVR" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml new file mode 100644 index 0000000000..d50027ef8e --- /dev/null +++ b/doc/classes/ResourceFormatSaver.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatSaver" inherits="Reference" category="Core" version="3.1"> + <brief_description> + Saves a specific resource type to a file. + </brief_description> + <description> + The engine can save resources when you do it from the editor, or when you call [method ResourceSaver.save]. This is accomplished with multiple [code]ResourceFormatSaver[/code]s, each handling its own format. + By default, Godot saves resources as [code].tres[/code], [code].res[/code] or another built-in format, but you can choose to create your own format by extending this class. You should give it a global class name with [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatLoader]. + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="get_recognized_extensions" qualifiers="virtual"> + <return type="PoolStringArray"> + </return> + <argument index="0" name="resource" type="Resource"> + </argument> + <description> + Gets the list of extensions for files this saver is able to write. + </description> + </method> + <method name="recognize" qualifiers="virtual"> + <return type="bool"> + </return> + <argument index="0" name="resource" type="Resource"> + </argument> + <description> + Returns true if the given resource object can be saved by this saver. + </description> + </method> + <method name="save" qualifiers="virtual"> + <return type="int"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="resource" type="Resource"> + </argument> + <argument index="2" name="flags" type="int"> + </argument> + <description> + Saves the given resource object to a file. [code]flags[/code] is a bitmask composed with [code]FLAG_*[/code] constants defined in [ResourceSaver]. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatSaverBinary.xml b/doc/classes/ResourceFormatSaverBinary.xml new file mode 100644 index 0000000000..7afec9ba23 --- /dev/null +++ b/doc/classes/ResourceFormatSaverBinary.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatSaverBinary" inherits="ResourceFormatSaver" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatSaverGDScript.xml b/doc/classes/ResourceFormatSaverGDScript.xml new file mode 100644 index 0000000000..27964c7c9b --- /dev/null +++ b/doc/classes/ResourceFormatSaverGDScript.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatSaverGDScript" inherits="ResourceFormatSaver" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatSaverNativeScript.xml b/doc/classes/ResourceFormatSaverNativeScript.xml new file mode 100644 index 0000000000..9f8c0ccc78 --- /dev/null +++ b/doc/classes/ResourceFormatSaverNativeScript.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatSaverNativeScript" inherits="ResourceFormatSaver" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatSaverShader.xml b/doc/classes/ResourceFormatSaverShader.xml new file mode 100644 index 0000000000..cdc512dfea --- /dev/null +++ b/doc/classes/ResourceFormatSaverShader.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatSaverShader" inherits="ResourceFormatSaver" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceFormatSaverText.xml b/doc/classes/ResourceFormatSaverText.xml new file mode 100644 index 0000000000..6ae4ff4a2c --- /dev/null +++ b/doc/classes/ResourceFormatSaverText.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceFormatSaverText" inherits="ResourceFormatSaver" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index ae900e34ef..926bd63de2 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -61,7 +61,7 @@ </argument> <argument index="1" name="type_hint" type="String" default=""""> </argument> - <argument index="2" name="p_no_cache" type="bool" default="false"> + <argument index="2" name="no_cache" type="bool" default="false"> </argument> <description> </description> diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index 002bcd891a..18d6e04d8e 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -4,7 +4,7 @@ Resource Preloader Node. </brief_description> <description> - Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here. + This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. </description> <tutorials> </tutorials> @@ -19,6 +19,7 @@ <argument index="1" name="resource" type="Resource"> </argument> <description> + Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2. </description> </method> <method name="get_resource" qualifiers="const"> @@ -27,14 +28,14 @@ <argument index="0" name="name" type="String"> </argument> <description> - Return the resource given a text-id. + Returns the resource associated to [code]name[/code]. </description> </method> <method name="get_resource_list" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Return the list of resources inside the preloader. + Returns the list of resources inside the preloader. </description> </method> <method name="has_resource" qualifiers="const"> @@ -43,7 +44,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Return true if the preloader has a given resource. + Returns true if the preloader contains a resource associated to [code]name[/code]. </description> </method> <method name="remove_resource"> @@ -52,7 +53,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Remove a resource from the preloader by text id. + Removes the resource associated to [code]name[/code] from the preloader. </description> </method> <method name="rename_resource"> @@ -63,7 +64,7 @@ <argument index="1" name="newname" type="String"> </argument> <description> - Rename a resource inside the preloader, from a text-id to a new text-id. + Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code]. </description> </method> </methods> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index bf3ea95bce..f388667891 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -47,5 +47,7 @@ </constant> <constant name="FLAG_COMPRESS" value="32" enum="SaverFlags"> </constant> + <constant name="FLAG_REPLACE_SUBRESOURCE_PATHS" value="64" enum="SaverFlags"> + </constant> </constants> </class> diff --git a/doc/classes/ResourceSaverPNG.xml b/doc/classes/ResourceSaverPNG.xml new file mode 100644 index 0000000000..a161a4de5f --- /dev/null +++ b/doc/classes/ResourceSaverPNG.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceSaverPNG" inherits="ResourceFormatSaver" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 357d2e7a15..dcfb980e21 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -8,7 +8,7 @@ Note that assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> </tutorials> <demos> </demos> @@ -111,14 +111,14 @@ <argument index="0" name="align" type="int" enum="RichTextLabel.Align"> </argument> <description> - Adds a [code][right][/code] tag to the tag stack. + Adds an alignment tag based on the given [code]align[/code] value. See [enum Align] for possible values. </description> </method> <method name="push_cell"> <return type="void"> </return> <description> - Adds a [code][cell][/code] tag to the tag stack. Must be inside a [table] tag. See [method push_table] for details. + Adds a [code][cell][/code] tag to the tag stack. Must be inside a [code][table][/code] tag. See [method push_table] for details. </description> </method> <method name="push_color"> @@ -170,6 +170,7 @@ <return type="void"> </return> <description> + Adds a [code][s][/code] tag to the tag stack. </description> </method> <method name="push_table"> @@ -224,16 +225,16 @@ </methods> <members> <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode"> - If [code]true[/code] the label uses BBCode formatting. Default value: [code]false[/code]. + If [code]true[/code], the label uses BBCode formatting. Default value: [code]false[/code]. </member> <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode"> The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. </member> <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined"> - If [code]true[/code], the label underlines meta tags such as [url]{text}[/url]. Default value: [code]true[/code]. + If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. Default value: [code]true[/code]. </member> <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color"> - If [code]true[/code] the label uses the custom font color. Default value: [code]false[/code]. + If [code]true[/code], the label uses the custom font color. Default value: [code]false[/code]. </member> <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible"> The text's visibility, as a [float] between 0.0 and 1.0. @@ -263,7 +264,7 @@ <argument index="0" name="meta" type="Nil"> </argument> <description> - Triggered when the user clicks on content between [url] tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack. + Triggered when the user clicks on content between [code][url][/code] tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack. </description> </signal> <signal name="meta_hover_ended"> diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 0977b7ea01..3c253c3bea 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -10,7 +10,7 @@ If you need to override the default physics behavior, you can write a custom force integration. See [member custom_integrator]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <demos> </demos> @@ -21,7 +21,7 @@ <argument index="0" name="state" type="PhysicsDirectBodyState"> </argument> <description> - Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body. + Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body. </description> </method> <method name="add_central_force"> @@ -72,7 +72,7 @@ <argument index="1" name="impulse" type="Vector3"> </argument> <description> - Applies a positioned impulse which will be affected by the body mass and shape. This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin. + Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> @@ -88,7 +88,7 @@ <return type="Array"> </return> <description> - Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the [member contacts_reported] property to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_axis_velocity"> @@ -130,20 +130,20 @@ RigidBody's bounciness. </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep"> - If [code]true[/code] the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. + If [code]true[/code], the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled"> - If [code]true[/code] the RigidBody will emit signals when it collides with another RigidBody. + If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported"> The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. </member> <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection"> - If [code]true[/code] continuous collision detection is used. + If [code]true[/code], continuous collision detection is used. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. </member> <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator"> - If [code]true[/code] internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. + If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> The body's friction, from 0 (frictionless) to 1 (max friction). @@ -166,7 +166,7 @@ <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> </member> <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping"> - If [code]true[/code] the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. + If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. </member> <member name="weight" type="float" setter="set_weight" getter="get_weight"> The body's weight based on its mass and the global 3D gravity. Global values are set in "Project > Project Settings > Physics > 3d". diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 079440ab8b..9b74dbedb4 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -20,7 +20,7 @@ <argument index="0" name="state" type="Physics2DDirectBodyState"> </argument> <description> - Allows you to read and safely modify the simulation state for the object. Use this instead of [Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body. + Allows you to read and safely modify the simulation state for the object. Use this instead of [method Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default, it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body. </description> </method> <method name="add_central_force"> @@ -69,7 +69,7 @@ <argument index="1" name="impulse" type="Vector2"> </argument> <description> - Applies a positioned impulse to the body (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied instantaneously. Both the impulse and the offset from the body origin are in global coordinates. + Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> @@ -130,10 +130,10 @@ The body's bounciness. Default value: [code]0[/code]. </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep"> - If [code]true[/code] the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force]. Default value: [code]true[/code]. + If [code]true[/code], the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force]. Default value: [code]true[/code]. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled"> - If [code]true[/code] the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. Default value: [code]false[/code]. + If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. Default value: [code]false[/code]. </member> <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported"> The maximum number of contacts to report. Default value: [code]0[/code]. @@ -143,7 +143,7 @@ Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [code]CCD_MODE_[/code] constants for details. </member> <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator"> - If [code]true[/code] internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function. + If [code]true[/code], internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Default value: [code]1[/code]. @@ -169,7 +169,7 @@ <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> </member> <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping"> - If [code]true[/code] the body is sleeping and will not calculate forces until woken up by a collision or by using [method apply_impulse] or [method add_force]. + If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or by using [method apply_impulse] or [method add_force]. </member> <member name="weight" type="float" setter="set_weight" getter="get_weight"> The body's weight based on its mass and the "Default Gravity" value in "Project > Project Settings > Physics > 2d". diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index b89ecd1de9..7e696badb2 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -7,8 +7,8 @@ As one of the most important classes, the [code]SceneTree[/code] manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. You can also use the SceneTree to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/getting_started/step_by_step/scene_tree.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/viewports/multiple_resolutions.html</link> + <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scene_tree.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html</link> </tutorials> <demos> </demos> @@ -64,6 +64,13 @@ </argument> <description> Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this SceneTree. If [code]pause_mode_process[/code] is set to false, pausing the SceneTree will also pause the timer. + Commonly used to create a one-shot delay timer as in the following example: + [codeblock] + func some_function(): + print("start") + yield(get_tree().create_timer(1.0), "timeout") + print("end") + [/codeblock] </description> </method> <method name="get_frame" qualifiers="const"> @@ -192,7 +199,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the application automatically accepts quitting. + If [code]true[/code], the application automatically accepts quitting. </description> </method> <method name="set_group"> @@ -236,7 +243,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the application quits automatically on going back (e.g. on Android). + If [code]true[/code], the application quits automatically on going back (e.g. on Android). </description> </method> <method name="set_screen_stretch"> @@ -270,27 +277,27 @@ The default [MultiplayerAPI] instance for this SceneTree. </member> <member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled"> - If [code]true[/code] (default) enable the automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame]. + If [code]true[/code], (default) enable the automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame]. When [code]false[/code] you need to manually call [method MultiplayerAPI.poll] for processing network packets and delivering RPCs/RSETs. This allows to run RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals. </member> <member name="paused" type="bool" setter="set_pause" getter="is_paused"> - If [code]true[/code] the SceneTree is paused. + If [code]true[/code], the SceneTree is paused. Doing so will have the following behavior: * 2D and 3D physics will be stopped. * _process and _physics_process will not be called anymore in nodes. * _input and _input_event will not be called anymore either. </member> <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections"> - If [code]true[/code] the SceneTree's [member network_peer] refuses new incoming connections. + If [code]true[/code], the SceneTree's [member network_peer] refuses new incoming connections. </member> <member name="root" type="Viewport" setter="" getter="get_root"> The SceneTree's [Viewport]. </member> <member name="use_font_oversampling" type="bool" setter="set_use_font_oversampling" getter="is_using_font_oversampling"> - If [code]true[/code] font oversampling is used. + If [code]true[/code], font oversampling is used. </member> </members> <signals> diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml index e1234ce88a..f58c531ed5 100644 --- a/doc/classes/SceneTreeTimer.xml +++ b/doc/classes/SceneTreeTimer.xml @@ -1,8 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.1"> <brief_description> + One-shot timer. </brief_description> <description> + A one-shot timer managed by the scene tree, which emits [signal timeout] on completion. See also [method SceneTree.create_timer]. + As opposed to [Timer], it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example: + [codeblock] + func some_function(): + print("start") + yield(get_tree().create_timer(1.0), "timeout") + print("end") + [/codeblock] </description> <tutorials> </tutorials> @@ -12,11 +21,13 @@ </methods> <members> <member name="time_left" type="float" setter="set_time_left" getter="get_time_left"> + The time remaining. </member> </members> <signals> <signal name="timeout"> <description> + Emitted when the timer reaches 0. </description> </signal> </signals> diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index 128d7475cc..ec1d544c03 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -8,7 +8,7 @@ The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/getting_started/step_by_step/scripting.html</link> + <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scripting.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml index 67ce9a8e87..2e24a2626b 100644 --- a/doc/classes/ScriptCreateDialog.xml +++ b/doc/classes/ScriptCreateDialog.xml @@ -4,12 +4,12 @@ The Editor's popup dialog for creating new [Script] files. </brief_description> <description> - The ScriptCreateDialog creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling a [method popup]() method. + The [code]ScriptCreateDialog[/code] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Popup.popup] methods. [codeblock] func _ready(): - dialog.config("Node", "res://new_node.gd") # for in-engine types - dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # for script types - dialog.popup_centered() + dialog.config("Node", "res://new_node.gd") # for in-engine types + dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # for script types + dialog.popup_centered() [/codeblock] </description> <tutorials> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index d310561233..c8c7fa1d01 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -4,7 +4,7 @@ A helper node for displaying scrollable elements (e.g. lists). </brief_description> <description> - A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [VScrollBar], or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). + A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). </description> <tutorials> </tutorials> diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml index f3a37b78e1..5f46b949aa 100644 --- a/doc/classes/Semaphore.xml +++ b/doc/classes/Semaphore.xml @@ -15,14 +15,14 @@ <return type="int" enum="Error"> </return> <description> - Lowers the [code]Semaphore[/code], allowing one more thread in. Returns [OK] on success, [ERR_BUSY] otherwise. + Lowers the [code]Semaphore[/code], allowing one more thread in. Returns [code]OK[/code] on success, [code]ERR_BUSY[/code] otherwise. </description> </method> <method name="wait"> <return type="int" enum="Error"> </return> <description> - Tries to wait for the [code]Semaphore[/code], if its value is zero, blocks until non-zero. Returns [OK] on success, [ERR_BUSY] otherwise. + Tries to wait for the [code]Semaphore[/code], if its value is zero, blocks until non-zero. Returns [code]OK[/code] on success, [code]ERR_BUSY[/code] otherwise. </description> </method> </methods> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index 7f9a124683..dd6a023af4 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -7,7 +7,7 @@ This class allows you to define a custom shader program that can be used for various materials to render objects. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/shading/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml index bc1a429418..6e51d3156f 100644 --- a/doc/classes/Shape.xml +++ b/doc/classes/Shape.xml @@ -7,7 +7,7 @@ Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody] or [Area] objects. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 2772538cec..fc773faf5e 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -7,7 +7,7 @@ Base class for all 2D Shapes. All 2D shape types inherit from this. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/physics_introduction.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> </tutorials> <demos> </demos> @@ -27,7 +27,7 @@ </description> </method> <method name="collide_and_get_contacts"> - <return type="Variant"> + <return type="Array"> </return> <argument index="0" name="local_xform" type="Transform2D"> </argument> @@ -59,7 +59,7 @@ </description> </method> <method name="collide_with_motion_and_get_contacts"> - <return type="Variant"> + <return type="Array"> </return> <argument index="0" name="local_xform" type="Transform2D"> </argument> diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml index 1b5fc035c2..b3bb364e54 100644 --- a/doc/classes/ShortCut.xml +++ b/doc/classes/ShortCut.xml @@ -32,7 +32,7 @@ <return type="bool"> </return> <description> - If [code]true[/code] this shortcut is valid. + If [code]true[/code], this shortcut is valid. </description> </method> </methods> diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml index 712b9ca2a5..d40b8a2fc7 100644 --- a/doc/classes/Skeleton2D.xml +++ b/doc/classes/Skeleton2D.xml @@ -30,6 +30,12 @@ </description> </method> </methods> + <signals> + <signal name="bone_setup_changed"> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> diff --git a/doc/classes/SkeletonIK.xml b/doc/classes/SkeletonIK.xml index 50246f1b18..e720ff8f52 100644 --- a/doc/classes/SkeletonIK.xml +++ b/doc/classes/SkeletonIK.xml @@ -45,6 +45,8 @@ </member> <member name="min_distance" type="float" setter="set_min_distance" getter="get_min_distance"> </member> + <member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis"> + </member> <member name="root_bone" type="String" setter="set_root_bone" getter="get_root_bone"> </member> <member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform"> diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml index edb8e6d562..b3d59d6b75 100644 --- a/doc/classes/SliderJoint.xml +++ b/doc/classes/SliderJoint.xml @@ -4,7 +4,7 @@ Piston kind of slider between two bodies in 3D. </brief_description> <description> - Slides across the x-axis of the [Pivot] object. + Slides across the x-axis of the pivot object. </description> <tutorials> </tutorials> diff --git a/doc/classes/SoftBody.xml b/doc/classes/SoftBody.xml index 196d29fc60..6c3929d65b 100644 --- a/doc/classes/SoftBody.xml +++ b/doc/classes/SoftBody.xml @@ -20,6 +20,13 @@ Adds a body to the list of bodies that this body can't collide with. </description> </method> + <method name="get_collision_exceptions"> + <return type="Array"> + </return> + <description> + Returns an array of nodes that were added as collision exceptions for this body. + </description> + </method> <method name="get_collision_layer_bit" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index 7fd7b5deed..518a942cc2 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -4,11 +4,11 @@ Most basic 3D game object, parent of all 3D related nodes. </brief_description> <description> - Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project. - Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the Spatial object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the Spatial's transform. The word local below refers to this coordinate system. The coordinate system that is attached to the Spatial object itself is referred to as object-local coordinate system. + Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use [code]Spatial[/code] as a parent node to move, scale, rotate and show/hide children in a 3D project. + Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [code]Spatial[/code] object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the [code]Spatial[/code]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [code]Spatial[/code] object itself is referred to as object-local coordinate system. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/introduction_to_3d.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link> </tutorials> <demos> </demos> @@ -30,7 +30,7 @@ <return type="World"> </return> <description> - Returns the current [World] resource this Spatial node is registered to. + Returns the current [World] resource this [code]Spatial[/code] node is registered to. </description> </method> <method name="global_rotate"> @@ -65,14 +65,14 @@ <return type="void"> </return> <description> - Disables rendering of this node. Change Spatial Visible property to false. + Disables rendering of this node. Changes [member visible] to [code]false[/code]. </description> </method> <method name="is_local_transform_notification_enabled" qualifiers="const"> <return type="bool"> </return> <description> - Returns whether node notifies about its local transformation changes. Spatial will not propagate this by default. + Returns whether node notifies about its local transformation changes. [code]Spatial[/code] will not propagate this by default. </description> </method> <method name="is_scale_disabled" qualifiers="const"> @@ -92,7 +92,7 @@ <return type="bool"> </return> <description> - Returns whether the node notifies about its global and local transformation changes. Spatial will not propagate this by default. + Returns whether the node notifies about its global and local transformation changes. [code]Spatial[/code] will not propagate this by default. </description> </method> <method name="is_visible_in_tree" qualifiers="const"> @@ -132,7 +132,7 @@ <return type="void"> </return> <description> - Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. + Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform]. </description> </method> <method name="rotate"> @@ -214,7 +214,7 @@ <return type="void"> </return> <description> - Reset all transformations for this node. Set its [Transform3D] to identity matrix. + Reset all transformations for this node. Set its [Transform] to identity matrix. </description> </method> <method name="set_ignore_transform_notification"> @@ -232,7 +232,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Set whether the node notifies about its local transformation changes. Spatial will not propagate this by default. + Set whether the node notifies about its local transformation changes. [code]Spatial[/code] will not propagate this by default. </description> </method> <method name="set_notify_transform"> @@ -241,14 +241,14 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Set whether the node notifies about its global and local transformation changes. Spatial will not propagate this by default. + Set whether the node notifies about its global and local transformation changes. [code]Spatial[/code] will not propagate this by default. </description> </method> <method name="show"> <return type="void"> </return> <description> - Enables rendering of this node. Change Spatial Visible property to "True". + Enables rendering of this node. Changes [member visible] to [code]true[/code]. </description> </method> <method name="to_global" qualifiers="const"> @@ -296,7 +296,7 @@ </methods> <members> <member name="gizmo" type="SpatialGizmo" setter="set_gizmo" getter="get_gizmo"> - The SpatialGizmo for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. + The [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. </member> <member name="global_transform" type="Transform" setter="set_global_transform" getter="get_global_transform"> World space (global) [Transform] of this node. @@ -318,7 +318,7 @@ Local translation of this node. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible"> - If [code]true[/code] this node is drawn. Default value: [code]true[/code]. + If [code]true[/code], this node is drawn. Default value: [code]true[/code]. </member> </members> <signals> @@ -331,7 +331,7 @@ <constants> <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29"> Spatial nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. - In order for NOTIFICATION_TRANSFORM_CHANGED to work user first needs to ask for it, with set_notify_transform(true). + In order for [code]NOTIFICATION_TRANSFORM_CHANGED[/code] to work, users first need to ask for it, with [method set_notify_transform]. </constant> <constant name="NOTIFICATION_ENTER_WORLD" value="41"> Spatial nodes receives this notification when they are registered to new [World] resource. diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index 57fb267e91..62a34821fe 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -7,7 +7,7 @@ This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/spatial_material.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/spatial_material.html</link> </tutorials> <demos> </demos> @@ -23,12 +23,12 @@ The strength of the anisotropy effect. </member> <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Default value: [code]false[/code]. + If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Default value: [code]false[/code]. </member> <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture"> </member> <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] ambient occlusion is enabled. + If [code]true[/code], ambient occlusion is enabled. </member> <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect"> </member> @@ -41,7 +41,7 @@ <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat"> </member> <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] clearcoat rendering is enabled. Adds a secondary transparent pass to the material. Default value: [code]false[/code]. + If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the material. Default value: [code]false[/code]. </member> <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss"> </member> @@ -50,7 +50,11 @@ <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled"> </member> <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]. + 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> @@ -82,7 +86,7 @@ The emitted light's color. See [member emission_enabled]. </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] the body emits light. + If [code]true[/code], the body emits light. </member> <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy"> The emitted light's strength. See [member emission_enabled]. @@ -96,33 +100,33 @@ <member name="flags_albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag"> </member> <member name="flags_disable_ambient_light" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the object receives no ambient light. Default value: [code]false[/code]. + If [code]true[/code], the object receives no ambient light. Default value: [code]false[/code]. </member> <member name="flags_do_not_receive_shadows" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the object receives no shadow that would otherwise be cast onto it. Default value: [code]false[/code]. + If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. Default value: [code]false[/code]. </member> <member name="flags_ensure_correct_normals" type="bool" setter="set_flag" getter="get_flag"> </member> <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the object is rendered at the same size regardless of distance. Default value: [code]false[/code]. + If [code]true[/code], the object is rendered at the same size regardless of distance. Default value: [code]false[/code]. </member> <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] depth testing is disabled and the object will be drawn in render order. + If [code]true[/code], depth testing is disabled and the object will be drawn in render order. </member> <member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] transparency is enabled on the body. Default value: [code]false[/code]. See also [member params_blend_mode]. + If [code]true[/code], transparency is enabled on the body. Default value: [code]false[/code]. See also [member params_blend_mode]. </member> <member name="flags_unshaded" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the object is unaffected by lighting. Default value: [code]false[/code]. + If [code]true[/code], the object is unaffected by lighting. Default value: [code]false[/code]. </member> <member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. + If [code]true[/code], render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. </member> <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. Default value: [code]false[/code]. + If [code]true[/code], lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. Default value: [code]false[/code]. </member> <member name="flags_world_triplanar" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] triplanar mapping is calculated in world space rather than object local space. See also [member uv1_triplanar]. Default value: [code]false[/code]. + If [code]true[/code], triplanar mapping is calculated in world space rather than object local space. See also [member uv1_triplanar]. Default value: [code]false[/code]. </member> <member name="metallic" type="float" setter="set_metallic" getter="get_metallic"> The reflectivity of the object's surface. The higher the value the more light is reflected. @@ -135,7 +139,7 @@ <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel"> </member> <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] normal mapping is enabled. + If [code]true[/code], normal mapping is enabled. </member> <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale"> The strength of the normal map's effect. @@ -162,7 +166,7 @@ The algorithm used for diffuse light scattering. See [enum DiffuseMode]. </member> <member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled"> - If [code]true[/code] enables the vertex grow setting. See [member params_grow_amount]. + If [code]true[/code], enables the vertex grow setting. See [member params_grow_amount]. </member> <member name="params_grow_amount" type="float" setter="set_grow" getter="get_grow"> Grows object vertices in the direction of their normals. @@ -180,8 +184,8 @@ <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> The number of horizontal frames in the particle spritesheet. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. </member> - <member name="particles_anim_loop" type="int" setter="set_particles_anim_loop" getter="get_particles_anim_loop"> - If [code]true[/code] particle animations are looped. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. + <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop"> + If [code]true[/code], particle animations are looped. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. </member> <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> The number of vertical frames in the particle spritesheet. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. @@ -189,10 +193,10 @@ <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance"> </member> <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled"> - If [code]true[/code] the proximity and distance fade effect is enabled. Default value: [code]false[/code]. + If [code]true[/code], the proximity and distance fade effect is enabled. Default value: [code]false[/code]. </member> <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] the refraction effect is enabled. Distorts transparency based on light from behind the object. Default value: [code]false[/code]. + If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object. Default value: [code]false[/code]. </member> <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction"> The strength of the refraction effect. @@ -204,7 +208,7 @@ <member name="rim" type="float" setter="set_rim" getter="get_rim"> </member> <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] rim effect is enabled. Default value: [code]false[/code]. + If [code]true[/code], rim effect is enabled. Default value: [code]false[/code]. </member> <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture"> </member> @@ -219,7 +223,7 @@ <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel"> </member> <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. + If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. </member> <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength"> The strength of the subsurface scattering effect. @@ -230,7 +234,7 @@ The color used by the transmission effect. Represents the light passing through an object. </member> <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code] the transmission effect is enabled. Default value: [code]false[/code]. + If [code]true[/code], the transmission effect is enabled. Default value: [code]false[/code]. </member> <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture"> </member> @@ -251,10 +255,10 @@ <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness"> </member> <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the model's vertex colors are processed as sRGB mode. Default value: [code]false[/code]. + If [code]true[/code], the model's vertex colors are processed as sRGB mode. Default value: [code]false[/code]. </member> <member name="vertex_color_use_as_albedo" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code] the vertex color is used as albedo color. Default value: [code]false[/code]. + If [code]true[/code], the vertex color is used as albedo color. Default value: [code]false[/code]. </member> </members> <constants> diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml index d56da68448..6370c40aba 100644 --- a/doc/classes/SplitContainer.xml +++ b/doc/classes/SplitContainer.xml @@ -11,6 +11,12 @@ <demos> </demos> <methods> + <method name="clamp_split_offset"> + <return type="void"> + </return> + <description> + </description> + </method> </methods> <members> <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed"> diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml index 1f81e9e5c2..56ba2fc5b9 100644 --- a/doc/classes/SpotLight.xml +++ b/doc/classes/SpotLight.xml @@ -4,10 +4,10 @@ Spotlight [Light], such as a reflector spotlight or a lantern. </brief_description> <description> - A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight. + A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/lights_and_shadows.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index 52650c7300..d1cdbffc6c 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -29,13 +29,13 @@ </methods> <members> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code] texture is centered. Default value: [code]true[/code]. + If [code]true[/code], texture is centered. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="frame" type="int" setter="set_frame" getter="get_frame"> Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. @@ -50,10 +50,10 @@ The texture's drawing offset. </member> <member name="region_enabled" type="bool" setter="set_region" getter="is_region"> - If [code]true[/code] texture is cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code]. + If [code]true[/code], texture is cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code]. </member> <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled"> - If [code]true[/code] the outermost pixels get blurred out. + If [code]true[/code], the outermost pixels get blurred out. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index 2a65246dde..f43fa34785 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -20,7 +20,7 @@ The number of columns in the sprite sheet. </member> <member name="region_enabled" type="bool" setter="set_region" getter="is_region"> - If [code]true[/code] texture will be cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code]. + If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code]. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index fd4b583928..12d58808d5 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -31,16 +31,16 @@ The direction in which the front of the texture faces. </member> <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code] texture will be centered. Default value: [code]true[/code]. + If [code]true[/code], texture will be centered. Default value: [code]true[/code]. </member> <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code] texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. Default value: [code]true[/code]. + If [code]true[/code], texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. Default value: [code]true[/code]. </member> <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. </member> <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code]. + If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. </member> <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate"> A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light. @@ -55,10 +55,10 @@ The size of one pixel's width on the Sprite to scale it in 3D. </member> <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code] the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code]. + If [code]true[/code], the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code]. </member> <member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code] the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: [code]true[/code]. + If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index 0e11d797e4..e261b2112f 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -55,7 +55,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> - If [code]true[/code] the given animation will loop. + If [code]true[/code], the given animation will loop. </description> </method> <method name="get_animation_names" qualifiers="const"> @@ -100,7 +100,7 @@ <argument index="0" name="anim" type="String"> </argument> <description> - If [code]true[/code] the named animation exists. + If [code]true[/code], the named animation exists. </description> </method> <method name="remove_animation"> @@ -142,7 +142,7 @@ <argument index="1" name="loop" type="bool"> </argument> <description> - If [code]true[/code] the animation will loop. + If [code]true[/code], the animation will loop. </description> </method> <method name="set_animation_speed"> diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml index 442a520e30..01f5b07329 100644 --- a/doc/classes/StaticBody.xml +++ b/doc/classes/StaticBody.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StaticBody" inherits="PhysicsBody" category="Core" version="3.1"> <brief_description> - Static body for 3D Physics. + Static body for 3D physics. </brief_description> <description> - Static body for 3D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody3D] so they are great for scenario collision. + Static body for 3D physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody] so they are great for scenario collision. A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). </description> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index 33948df509..40a4e04a80 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -7,7 +7,7 @@ SSL Stream peer. This object can be used to connect to SSL servers. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/networking/ssl_certificates.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml index 9a0fceddab..18324d9043 100644 --- a/doc/classes/StreamPeerTCP.xml +++ b/doc/classes/StreamPeerTCP.xml @@ -19,7 +19,7 @@ <argument index="1" name="port" type="int"> </argument> <description> - Connect to the specified host:port pair. A hostname will be resolved if valid. Returns [OK] on success or [FAILED] on failure. + Connect to the specified host:port pair. A hostname will be resolved if valid. Returns [code]OK[/code] on success or [code]FAILED[/code] on failure. </description> </method> <method name="disconnect_from_host"> @@ -47,14 +47,14 @@ <return type="int" enum="StreamPeerTCP.Status"> </return> <description> - Return the status of the connection, one of STATUS_* enum. + Return the status of the connection, see [enum StreamPeerTCP.Status]. </description> </method> <method name="is_connected_to_host" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if this peer is currently connected to a host, [code]false[code] otherwise. + Returns [code]true[/code] if this peer is currently connected to a host, [code]false[/code] otherwise. </description> </method> <method name="set_no_delay"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 536165487d..6ac47a89c2 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -439,6 +439,15 @@ Returns [code]true[/code] if this string contains a valid float. </description> </method> + <method name="is_valid_hex_number"> + <return type="bool"> + </return> + <argument index="0" name="with_prefix" type="bool" default="False"> + </argument> + <description> + Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code]. + </description> + </method> <method name="is_valid_html_color"> <return type="bool"> </return> @@ -450,7 +459,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit. + Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]) and the first character may not be a digit. </description> </method> <method name="is_valid_integer"> @@ -505,7 +514,7 @@ <argument index="0" name="expr" type="String"> </argument> <description> - Does a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'. + Does a simple expression match, where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except '.'. </description> </method> <method name="matchn"> @@ -514,7 +523,7 @@ <argument index="0" name="expr" type="String"> </argument> <description> - Does a simple case insensitive expression match, using ? and * wildcards (see [method match]). + Does a simple case insensitive expression match, using [code]?[/code] and [code]*[/code] wildcards (see [method match]). </description> </method> <method name="md5_buffer"> @@ -654,7 +663,7 @@ </argument> <description> Splits the string by a [code]divisor[/code] string and returns an array of the substrings, starting from right. - [b]Example:[/b] "One,Two,Three" will return ["One","Two","Three"] if split by ",". + [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two","Three"][/code] if split by [code]","[/code]. If [code]maxsplit[/code] is specified, then it is number of splits to do, default is 0 which splits all the items. </description> </method> @@ -701,7 +710,7 @@ </argument> <description> Splits the string by a divisor string and returns an array of the substrings. - [b]Example:[/b] "One,Two,Three" will return ["One","Two","Three"] if split by ",". + [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two","Three"][/code] if split by [code]","[/code]. If [code]maxsplit[/code] is given, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements) </description> </method> @@ -714,7 +723,7 @@ </argument> <description> Splits the string in floats by using a divisor string and returns an array of the substrings. - [b]Example:[/b] "1,2.5,3" will return [1,2.5,3] if split by ",". + [b]Example:[/b] [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code]. </description> </method> <method name="strip_edges"> @@ -743,7 +752,7 @@ <return type="PoolByteArray"> </return> <description> - Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is sped up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. + Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is sped up in comparison to [method to_utf8] with the assumption that all the characters the String contains are only ASCII characters. </description> </method> <method name="to_float"> @@ -778,7 +787,7 @@ <return type="PoolByteArray"> </return> <description> - Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). + Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii]. </description> </method> <method name="trim_prefix"> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index dee3e6db49..d8cc56cc8c 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -27,13 +27,20 @@ <description> </description> </method> + <method name="get_current_item_drawn" qualifiers="const"> + <return type="CanvasItem"> + </return> + <description> + </description> + </method> <method name="get_margin" qualifiers="const"> <return type="float"> </return> <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> - Return the offset of margin "margin" (see MARGIN_* enum). + Return the content margin offset for the specified margin + Positive values reduce size inwards, unlike [Control]'s margin values. </description> </method> <method name="get_minimum_size" qualifiers="const"> @@ -64,12 +71,22 @@ </methods> <members> <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin"> + The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom. + If this value is negative, it is ignored and a child-specific margin is used instead. For example for [StyleBoxFlat] the border thickness (if any) is used instead. + It is up to the code using this style box to decide what these contents are: for example, a [Button] respects this content margin for the textual contents of the button. + [method get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above. </member> <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin"> + The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. + Refer to [member content_margin_bottom] for extra considerations. </member> <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin"> + The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right. + Refer to [member content_margin_bottom] for extra considerations. </member> <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin"> + The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top. + Refer to [member content_margin_bottom] for extra considerations. </member> </members> <constants> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 641d6214a4..a162aa02b0 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> @@ -115,9 +114,9 @@ Border width for the top border. </member> <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 ... + 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_all]) into account. + For corner radius smaller than 10, 4-5 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/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index d8c378fde2..806ed1941a 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -42,28 +42,49 @@ <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled"> </member> <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size"> + Expands the bottom margin of this style box when drawing, causing it be drawn larger than requested. </member> <member name="expand_margin_left" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size"> + Expands the left margin of this style box when drawing, causing it be drawn larger than requested. </member> <member name="expand_margin_right" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size"> + Expands the right margin of this style box when drawing, causing it be drawn larger than requested. </member> <member name="expand_margin_top" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size"> + Expands the top margin of this style box when drawing, causing it be drawn larger than requested. </member> <member name="margin_bottom" type="float" setter="set_margin_size" getter="get_margin_size"> + Increases the bottom margin of the 3x3 texture box. + A higher value means more of the source texture is considered to be part of the bottom border of the 3x3 box. + This is also the value used as fallback for [member StyleBox.content_margin_bottom] if it is negative. </member> <member name="margin_left" type="float" setter="set_margin_size" getter="get_margin_size"> + Increases the left margin of the 3x3 texture box. + A higher value means more of the source texture is considered to be part of the left border of the 3x3 box. + This is also the value used as fallback for [member StyleBox.content_margin_left] if it is negative. </member> <member name="margin_right" type="float" setter="set_margin_size" getter="get_margin_size"> + Increases the right margin of the 3x3 texture box. + A higher value means more of the source texture is considered to be part of the right border of the 3x3 box. + This is also the value used as fallback for [member StyleBox.content_margin_right] if it is negative. </member> <member name="margin_top" type="float" setter="set_margin_size" getter="get_margin_size"> + Increases the top margin of the 3x3 texture box. + A higher value means more of the source texture is considered to be part of the top border of the 3x3 box. + This is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative. </member> <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate"> + Modulates the color of the texture when this style box is drawn. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + The normal map to use when drawing this style box. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> + Species a sub region of the texture to use. + This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + The texture to use when drawing this style box. </member> </members> <signals> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 4f9ac68e47..587b0190fe 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -75,18 +75,10 @@ Specify a Tangent for the next Vertex to use. </description> </method> - <method name="add_to_format"> - <return type="void"> - </return> - <argument index="0" name="flags" type="int"> - </argument> - <description> - </description> - </method> <method name="add_triangle_fan"> <return type="void"> </return> - <argument index="0" name="vertexes" type="PoolVector3Array"> + <argument index="0" name="vertices" type="PoolVector3Array"> </argument> <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> </argument> @@ -149,7 +141,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> - Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]. + Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]. </description> </method> <method name="begin"> @@ -187,7 +179,7 @@ <argument index="1" name="surface" type="int"> </argument> <description> - Creates a vertex array from an existing [Mesh]. + Creates a vertex array from an existing [Mesh]. </description> </method> <method name="deindex"> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index f17c10b31e..3c5bc25def 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -148,7 +148,7 @@ The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details. </member> <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible"> - If [code]true[/code] tabs are visible. If [code]false[/code] tabs' content and titles are hidden. Default value: [code]true[/code]. + If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden. Default value: [code]true[/code]. </member> </members> <signals> @@ -216,6 +216,8 @@ </theme_item> <theme_item name="tab_bg" type="StyleBox"> </theme_item> + <theme_item name="tab_disabled" type="StyleBox"> + </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> <theme_item name="top_margin" type="int"> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 350b49513d..b22d9d73da 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -126,7 +126,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] enables selecting a tab with right mouse button. + If [code]true[/code], enables selecting a tab with right mouse button. </description> </method> <method name="set_tab_disabled"> @@ -279,6 +279,8 @@ </theme_item> <theme_item name="tab_bg" type="StyleBox"> </theme_item> + <theme_item name="tab_disabled" type="StyleBox"> + </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> <theme_item name="top_margin" type="int"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index a958c3fcfa..e237cfa220 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -359,39 +359,39 @@ </methods> <members> <member name="breakpoint_gutter" type="bool" setter="set_breakpoint_gutter_enabled" getter="is_breakpoint_gutter_enabled"> - If [code]true[/code] the breakpoint gutter is visible. + If [code]true[/code], the breakpoint gutter is visible. </member> <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled"> - If [code]true[/code] the caret (visual cursor) blinks. + If [code]true[/code], the caret (visual cursor) blinks. </member> <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed"> Duration (in seconds) of a caret's blinking cycle. </member> <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode"> - If [code]true[/code] the caret displays as a rectangle. - If [code]false[/code] the caret displays as a bar. + If [code]true[/code], the caret displays as a rectangle. + If [code]false[/code], the caret displays as a bar. </member> <member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret"> - If [code]true[/code] a right click moves the cursor at the mouse position before displaying the context menu. - If [code]false[/code] the context menu disregards mouse location. + If [code]true[/code], a right click moves the cursor at the mouse position before displaying the context menu. + If [code]false[/code], the context menu disregards mouse location. </member> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled"> - If [code]true[/code] a right click displays the context menu. + If [code]true[/code], a right click displays the context menu. </member> <member name="hiding_enabled" type="int" setter="set_hiding_enabled" getter="is_hiding_enabled"> </member> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled"> </member> <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled"> - If [code]true[/code] the line containing the cursor is highlighted. + If [code]true[/code], the line containing the cursor is highlighted. </member> <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color"> </member> <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly"> - If [code]true[/code] read-only mode is enabled. Existing text cannot be modified and new text cannot be added. + If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled"> - If [code]true[/code] line numbers are displayed to the left of the text. + If [code]true[/code], line numbers are displayed to the left of the text. </member> <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled"> </member> @@ -467,7 +467,9 @@ <constant name="MENU_UNDO" value="5" enum="MenuItems"> Undoes the previous action. </constant> - <constant name="MENU_MAX" value="6" enum="MenuItems"> + <constant name="MENU_REDO" value="6" enum="MenuItems"> + </constant> + <constant name="MENU_MAX" value="7" enum="MenuItems"> </constant> </constants> <theme_items> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 7e54ab9fe8..b25c69c680 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -15,13 +15,13 @@ </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="get_expand"> - If [code]true[/code] the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code] the texture will not scale with the node. Default value: [code]false[/code]. + If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. Default value: [code]false[/code]. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode"> Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. </member> <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask"> - Pure black and white [Bitmap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. + Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. </member> <member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture"> Texture to display when the node is disabled. See [member BaseButton.disabled]. diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml index 3cbaf0429c..a98a2e9f74 100644 --- a/doc/classes/TextureProgress.xml +++ b/doc/classes/TextureProgress.xml @@ -17,7 +17,7 @@ The fill direction. Uses FILL_* constants. </member> <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch"> - If [code]true[/code] Godot treats the bar's textures like [NinePatchRect]. Use [code]stretch_margin_*[/code], like [member stretch_margin_bottom], to set up the nine patch's 3x3 grid. Default value: [code]false[/code]. + If [code]true[/code], Godot treats the bar's textures like [NinePatchRect]. Use [code]stretch_margin_*[/code], like [member stretch_margin_bottom], to set up the nine patch's 3x3 grid. Default value: [code]false[/code]. </member> <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset"> Offsets [member texture_progress] if [member fill_mode] is [code]FILL_CLOCKWISE[/code] or [code]FILL_COUNTER_CLOCKWISE[/code]. diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 95afc5d281..78065afcc9 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="has_expand"> - If [code]true[/code] the texture scales to fit its bounding rectangle. Default value: [code]false[/code]. + If [code]true[/code], the texture scales to fit its bounding rectangle. Default value: [code]false[/code]. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode"> Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode]. diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index fe43b54d5e..bffd8ea6d9 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -12,6 +12,12 @@ <demos> </demos> <methods> + <method name="clear"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="clear_color"> <return type="void"> </return> @@ -74,6 +80,14 @@ Sets theme values to a copy of the default theme values. </description> </method> + <method name="copy_theme"> + <return type="void"> + </return> + <argument index="0" name="other" type="Theme"> + </argument> + <description> + </description> + </method> <method name="get_color" qualifiers="const"> <return type="Color"> </return> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 6f8c76d1ea..fe3b2118a3 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -7,7 +7,7 @@ Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/using_tilemaps.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link> </tutorials> <demos> </demos> @@ -34,7 +34,17 @@ <argument index="1" name="y" type="int"> </argument> <description> - Returns the tile index of the given cell. + Returns the tile index of the given cell. If no tile exists in the cell, returns [constant INVALID_CELL]. + </description> + </method> + <method name="get_cell_autotile_coord" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <description> </description> </method> <method name="get_cellv" qualifiers="const"> @@ -43,7 +53,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Returns the tile index of the cell given by a Vector2. + Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant INVALID_CELL]. </description> </method> <method name="get_collision_layer_bit" qualifiers="const"> @@ -234,7 +244,7 @@ <argument index="0" name="world_position" type="Vector2"> </argument> <description> - Returns the tilemap (grid-based) coordinatescorresponding to the given global position. + Returns the tilemap (grid-based) coordinates corresponding to the given local position. </description> </method> </methods> @@ -257,7 +267,7 @@ Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT. </member> <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled"> - If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. + If [code]true[/code], the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. </member> <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce"> Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0. @@ -272,7 +282,7 @@ The collision mask(s) for all colliders in the TileMap. </member> <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic"> - If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code]. + If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body. Default value: [code]false[/code]. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode"> The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index ffd15e8d8b..4abe94f119 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -36,12 +36,66 @@ <description> </description> </method> + <method name="autotile_clear_bitmask_map"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + Clears all bitmask info of the autotile. + </description> + </method> + <method name="autotile_get_bitmask"> + <return type="int"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="coord" type="Vector2"> + </argument> + <description> + Returns the bitmask of the subtile from an autotile given its coordinates. + The value is the sum of the values in [enum TileSet.AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right). + </description> + </method> <method name="autotile_get_bitmask_mode" qualifiers="const"> <return type="int" enum="TileSet.BitmaskMode"> </return> <argument index="0" name="id" type="int"> </argument> <description> + Returns the [enum TileSet.BitmaskMode] of the autotile. + </description> + </method> + <method name="autotile_get_icon_coordinate" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates. + The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask info is incomplete. It will also be used to represent it in the TileSet editor. + </description> + </method> + <method name="autotile_get_light_occluder" qualifiers="const"> + <return type="OccluderPolygon2D"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="coord" type="Vector2"> + </argument> + <description> + Returns the light occluder of the subtile from an atlas/autotile given its coordinates. + </description> + </method> + <method name="autotile_get_navigation_polygon" qualifiers="const"> + <return type="NavigationPolygon"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="coord" type="Vector2"> + </argument> + <description> + Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates. </description> </method> <method name="autotile_get_size" qualifiers="const"> @@ -50,6 +104,53 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the size of the subtiles in an atlas/autotile. + </description> + </method> + <method name="autotile_get_spacing" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + Returns the spacing between subtiles of the atlas/autotile. + </description> + </method> + <method name="autotile_get_subtile_priority"> + <return type="int"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="coord" type="Vector2"> + </argument> + <description> + Returns the priority of the subtile from an autotile given its coordinates. + When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked. + </description> + </method> + <method name="autotile_get_z_index"> + <return type="int"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="coord" type="Vector2"> + </argument> + <description> + Returns the drawing index of the subtile from an atlas/autotile given its coordinates. + </description> + </method> + <method name="autotile_set_bitmask"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="bitmask" type="Vector2"> + </argument> + <argument index="2" name="flag" type="int"> + </argument> + <description> + Sets the bitmask of the subtile from an autotile given its coordinates. + The value is the sum of the values in [enum TileSet.AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right). </description> </method> <method name="autotile_set_bitmask_mode"> @@ -60,6 +161,45 @@ <argument index="1" name="mode" type="int" enum="TileSet.BitmaskMode"> </argument> <description> + Sets the [enum TileSet.BitmaskMode] of the autotile. + </description> + </method> + <method name="autotile_set_icon_coordinate"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="coord" type="Vector2"> + </argument> + <description> + Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates. + The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask info is incomplete. It will also be used to represent it in the TileSet editor. + </description> + </method> + <method name="autotile_set_light_occluder"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="light_occluder" type="OccluderPolygon2D"> + </argument> + <argument index="2" name="coord" type="Vector2"> + </argument> + <description> + Sets the light occluder of the subtile from an atlas/autotile given its coordinates. + </description> + </method> + <method name="autotile_set_navigation_polygon"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="navigation_polygon" type="NavigationPolygon"> + </argument> + <argument index="2" name="coord" type="Vector2"> + </argument> + <description> + Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates. </description> </method> <method name="autotile_set_size"> @@ -70,6 +210,45 @@ <argument index="1" name="size" type="Vector2"> </argument> <description> + Sets the size of the subtiles in an atlas/autotile. + </description> + </method> + <method name="autotile_set_spacing"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="spacing" type="int"> + </argument> + <description> + Sets the spacing between subtiles of the atlas/autotile. + </description> + </method> + <method name="autotile_set_subtile_priority"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="coord" type="Vector2"> + </argument> + <argument index="2" name="priority" type="int"> + </argument> + <description> + Sets the priority of the subtile from an autotile given its coordinates. + When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked. + </description> + </method> + <method name="autotile_set_z_index"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="coord" type="Vector2"> + </argument> + <argument index="2" name="z_index" type="int"> + </argument> + <description> + Sets the drawing index of the subtile from an atlas/autotile given its coordinates. </description> </method> <method name="clear"> @@ -260,6 +439,16 @@ Returns the one-way collision value of a tile's shape. </description> </method> + <method name="tile_get_shape_one_way_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="shape_id" type="int"> + </argument> + <description> + </description> + </method> <method name="tile_get_shape_transform" qualifiers="const"> <return type="Transform2D"> </return> @@ -304,7 +493,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the tile's [enum TileMode]. + Returns the tile's [enum TileSet.TileMode]. </description> </method> <method name="tile_get_z_index" qualifiers="const"> @@ -454,6 +643,18 @@ Enables one-way collision on a tile's shape. </description> </method> + <method name="tile_set_shape_one_way_margin"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="shape_id" type="int"> + </argument> + <argument index="2" name="one_way" type="float"> + </argument> + <description> + </description> + </method> <method name="tile_set_shape_transform"> <return type="void"> </return> @@ -508,7 +709,7 @@ <argument index="1" name="tilemode" type="int" enum="TileSet.TileMode"> </argument> <description> - Sets the tile's [enum TileMode]. + Sets the tile's [enum TileSet.TileMode]. </description> </method> <method name="tile_set_z_index"> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 65d638c4c0..ae0a3ad148 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -24,8 +24,8 @@ <argument index="0" name="time_sec" type="float" default="-1"> </argument> <description> - Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec[/code] > 0. This also resets the remaining time to [code]wait_time[/code]. - Note: this method will not resume a paused timer. See [method set_paused]. + Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec > 0[/code]. This also resets the remaining time to [code]wait_time[/code]. + Note: this method will not resume a paused timer. See [member paused]. </description> </method> <method name="stop"> @@ -38,13 +38,13 @@ </methods> <members> <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart"> - If [code]true[/code] the timer will automatically start when entering the scene tree. Default value: [code]false[/code]. + If [code]true[/code], the timer will automatically start when entering the scene tree. Default value: [code]false[/code]. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot"> - If [code]true[/code] the timer will stop when reaching 0. If [code]false[/code] it will restart. Default value: [code]false[/code]. + If [code]true[/code], the timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. </member> <member name="paused" type="bool" setter="set_paused" getter="is_paused"> - If [code]true[/code] the timer is paused and will not process until it is unpaused again, even if [method start] is called. + If [code]true[/code], the timer is paused and will not process until it is unpaused again, even if [method start] is called. </member> <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode"> Processing mode. See [enum TimerProcessMode]. diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml index d8db95a854..b52e1d39dc 100644 --- a/doc/classes/ToolButton.xml +++ b/doc/classes/ToolButton.xml @@ -4,10 +4,10 @@ Flat button helper class. </brief_description> <description> - This is a helper class to generate a flat [Button] (see [method Button.set_flat]), creating a ToolButton is equivalent to: + This is a helper class to generate a flat [Button] (see [member Button.flat]), creating a [code]ToolButton[/code] is equivalent to: [codeblock] var btn = Button.new() - btn.set_flat(true) + btn.flat = true [/codeblock] </description> <tutorials> diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index 1b37ce95ba..6cc688d3c5 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -30,7 +30,7 @@ The button's texture for the normal state. </member> <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled"> - If [code]true[/code] passby presses are enabled. + If [code]true[/code], passby presses are enabled. </member> <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed"> The button's texture for the pressed state. @@ -39,10 +39,10 @@ The button's shape. </member> <member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered"> - If [code]true[/code] the button's shape is centered. + If [code]true[/code], the button's shape is centered. </member> <member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible"> - If [code]true[/code] the button's shape is visible. + If [code]true[/code], the button's shape is visible. </member> <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode"> The button's visibility mode. See [code]VISIBILITY_*[/code] constants. diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 09edfe4235..b3168ef129 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -7,8 +7,8 @@ Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/math/index.html</link> - <link>http://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> </tutorials> <demos> </demos> 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/TranslationLoaderPO.xml b/doc/classes/TranslationLoaderPO.xml new file mode 100644 index 0000000000..58cf2f6572 --- /dev/null +++ b/doc/classes/TranslationLoaderPO.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="TranslationLoaderPO" inherits="ResourceFormatLoader" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <constants> + </constants> +</class> 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..d4a11247dc 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -184,7 +184,7 @@ <argument index="1" name="expand" type="bool"> </argument> <description> - If [code]true[/code] the column will have the "Expand" flag of [Control]. + If [code]true[/code], the column will have the "Expand" flag of [Control]. </description> </method> <method name="set_column_min_width"> @@ -215,16 +215,16 @@ <argument index="0" name="visible" type="bool"> </argument> <description> - If [code]true[/code] column titles are visible. + If [code]true[/code], column titles are visible. </description> </method> </methods> <members> <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect"> - If [code]true[/code] the currently selected cell may be selected again. + If [code]true[/code], the currently selected cell may be selected again. </member> <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select"> - If [code]true[/code] a right mouse button click can select items. + If [code]true[/code], a right mouse button click can select items. </member> <member name="columns" type="int" setter="set_columns" getter="get_columns"> The amount of columns. @@ -233,10 +233,10 @@ The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. Once dropping is done, reverts to [code]DROP_MODE_DISABLED[/code]. Setting this during [method Control.can_drop_data] is recommended. </member> <member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden"> - If [code]true[/code] the folding arrow is hidden. + If [code]true[/code], the folding arrow is hidden. </member> <member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden"> - If [code]true[/code] the tree's root is hidden. + If [code]true[/code], the tree's root is hidden. </member> <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode"> Allow single or multiple selection. See the [code]SELECT_*[/code] constants. @@ -315,12 +315,12 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Emitted when an item is selected with right mouse button. + Emitted when an item is selected with the right mouse button. </description> </signal> <signal name="item_selected"> <description> - Emitted when an item is selected with right mouse button. + Emitted when an item is selected. </description> </signal> <signal name="multi_selected"> @@ -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/TreeItem.xml b/doc/classes/TreeItem.xml index b4227b34be..209e5a8bd0 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -352,7 +352,7 @@ <argument index="1" name="checked" type="bool"> </argument> <description> - If [code]true[/code] the column [code]column[/code] is checked. + If [code]true[/code], the column [code]column[/code] is checked. </description> </method> <method name="set_custom_as_button"> @@ -411,7 +411,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] column [code]column[/code] is editable. + If [code]true[/code], column [code]column[/code] is editable. </description> </method> <method name="set_expand_right"> @@ -422,7 +422,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - If [code]true[/code] column [code]column[/code] is expanded to the right. + If [code]true[/code], column [code]column[/code] is expanded to the right. </description> </method> <method name="set_icon"> @@ -502,7 +502,7 @@ <argument index="1" name="selectable" type="bool"> </argument> <description> - If [code]true[/code] the given column is selectable. + If [code]true[/code], the given column is selectable. </description> </method> <method name="set_text"> @@ -540,13 +540,13 @@ </methods> <members> <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed"> - If [code]true[/code] the TreeItem is collapsed. + If [code]true[/code], the TreeItem is collapsed. </member> <member name="custom_minimum_height" type="int" setter="set_custom_minimum_height" getter="get_custom_minimum_height"> The custom minimum height. </member> <member name="disable_folding" type="bool" setter="set_disable_folding" getter="is_folding_disabled"> - If [code]true[/code] folding is disabled for this TreeItem. + If [code]true[/code], folding is disabled for this TreeItem. </member> </members> <constants> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 1dc03ed314..f5f50a75b1 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -13,8 +13,8 @@ Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() [/codeblock] - Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. - Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [code]http://easings.net/[/code] for some examples). The second accepts an [enum EaseType] constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [enum EASE_IN_OUT], and use the one that looks best. + Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using "property:component" (eg. [code]position:x[/code]), where it would only apply to that particular component. + Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [code]http://easings.net/[/code] for some examples). The second accepts an [enum EaseType] constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [code]EASE_IN_OUT[/code], and use the one that looks best. </description> <tutorials> </tutorials> @@ -340,13 +340,13 @@ </methods> <members> <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" enum="Tween.TweenProcessMode"> - The tween's animation process thread. See [enum TweenProcessMode]. Default value: [enum TWEEN_PROCESS_IDLE]. + The tween's animation process thread. See [enum TweenProcessMode]. Default value: [constant TWEEN_PROCESS_IDLE]. </member> <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale"> The tween's speed multiplier. For example, set it to [code]1.0[/code] for normal speed, [code]2.0[/code] for two times normal speed, or [code]0.5[/code] for half of the normal speed. A value of [code]0[/code] pauses the animation, but see also [method set_active] or [method stop_all] for this. </member> <member name="repeat" type="bool" setter="set_repeat" getter="is_repeat"> - If [code]true[/code] the tween loops. + If [code]true[/code], the tween loops. </member> </members> <signals> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 0ea5c6e005..8d98bcfdb0 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -8,22 +8,22 @@ Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. Here's an example on how to add an action to Godot editor's own 'undoredo': [codeblock] - var undoredo = get_undo_redo() # method of EditorPlugin + var undo_redo = get_undo_redo() # Method of EditorPlugin. func do_something(): - pass # put your code here + pass # Put your code here. func undo_something(): - pass # put here the code that reverts what's done by "do_something()" + pass # Put here the code that reverts what's done by "do_something()". func _on_MyButton_pressed(): var node = get_node("MyNode2D") - undoredo.create_action("Move the node") - undoredo.add_do_method(self, "do_something") - undoredo.add_undo_method(self, "undo_something") - undoredo.add_do_property(node, "position", Vector2(100,100)) - undoredo.add_undo_property(node, "position", node.position) - undoredo.commit_action() + undo_redo.create_action("Move the node") + undo_redo.add_do_method(self, "do_something") + undo_redo.add_undo_method(self, "undo_something") + undo_redo.add_do_property(node, "position", Vector2(100,100)) + undo_redo.add_undo_property(node, "position", node.position) + undo_redo.commit_action() [/codeblock] [method create_action], [method add_do_method], [method add_undo_method], [method add_do_property], [method add_undo_property], and [method commit_action] should be called one after the other, like in the example. Not doing so could lead to crashes. If you don't need to register a method you can leave [method add_do_method] and [method add_undo_method] out, and so it goes for properties. You can register more than one method/property. @@ -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"> @@ -122,6 +125,7 @@ </argument> <description> Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action]. + The way actions are merged is dictated by the [code]merge_mode[/code] argument. See [enum MergeMode] for details. </description> </method> <method name="get_current_action_name" qualifiers="const"> @@ -156,10 +160,13 @@ </methods> <constants> <constant name="MERGE_DISABLE" value="0" enum="MergeMode"> + Makes [code]do[/code]/[code]undo[/code] operations stay in separate actions. </constant> <constant name="MERGE_ENDS" value="1" enum="MergeMode"> + Makes so that the action's [code]do[/code] operation is from the first action created and the [code]undo[/code] operation is from the last subsequent action with the same name. </constant> <constant name="MERGE_ALL" value="2" enum="MergeMode"> + Makes subsequent actions with the same name be merged into one. </constant> </constants> </class> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 1f8eb47044..1770dec80d 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -7,7 +7,7 @@ 2-element structure that can be used to represent positions in 2d space or any other pair of numeric values. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/math/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <demos> </demos> @@ -164,7 +164,7 @@ <return type="float"> </return> <description> - Returns the vector's length squared. Prefer this function over [member length] if you need to sort vectors or need the squared length for some formula. + Returns the vector's length squared. Prefer this method over [method length] if you need to sort vectors or need the squared length for some formula. </description> </method> <method name="linear_interpolate"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 2499ba75ff..48856875e7 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -7,7 +7,7 @@ Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/math/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml index 3ce0cadde9..53a47ec7d6 100644 --- a/doc/classes/VehicleBody.xml +++ b/doc/classes/VehicleBody.xml @@ -18,11 +18,11 @@ Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. </member> <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force"> - Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel.set_use_as_traction] set to true and are in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. Note that the simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. + Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel.use_as_traction] set to true and are in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. Note that the simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the vehicle reversing. </member> <member name="steering" type="float" setter="set_steering" getter="get_steering"> - The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel.set_use_as_steering] set to true will automatically be rotated. + The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel.use_as_steering] set to true will automatically be rotated. </member> </members> <constants> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 9ffa3aa52b..c4c129b0f6 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -52,7 +52,7 @@ The embedded audio track to play. </member> <member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay"> - If [code]true[/code] playback starts when the scene loads. Default value: [code]false[/code]. + If [code]true[/code], playback starts when the scene loads. Default value: [code]false[/code]. </member> <member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec"> Amount of time in milliseconds to store in buffer while playing. @@ -61,10 +61,10 @@ Audio bus to use for sound playback. </member> <member name="expand" type="bool" setter="set_expand" getter="has_expand"> - If [code]true[/code] the video scales to the control size. Default value: [code]true[/code]. + If [code]true[/code], the video scales to the control size. Default value: [code]true[/code]. </member> <member name="paused" type="bool" setter="set_paused" getter="is_paused"> - If [code]true[/code] the video is paused. + If [code]true[/code], the video is paused. </member> <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream"> </member> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 9cd501630e..09891ca889 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -12,8 +12,8 @@ Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/2d/2d_transforms.html</link> - <link>http://docs.godotengine.org/en/3.0/tutorials/viewports/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link> </tutorials> <demos> </demos> @@ -80,7 +80,11 @@ <return type="ViewportTexture"> </return> <description> - Returns the viewport's texture. + Returns the viewport's texture. Note that due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture.get_data] to flip it back, for example: + [codeblock] + var img = get_viewport().get_texture().get_data() + img.flip_y() + [/codeblock] </description> </method> <method name="get_viewport_rid" qualifiers="const"> @@ -125,6 +129,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 +157,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> @@ -166,7 +182,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the size override affects stretch as well. + If [code]true[/code], the size override affects stretch as well. </description> </method> <method name="unhandled_input"> @@ -196,13 +212,13 @@ </methods> <members> <member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr"> - If [code]true[/code] the viewport will be used in AR/VR process. Default value: [code]false[/code]. + If [code]true[/code], the viewport will be used in AR/VR process. Default value: [code]false[/code]. </member> <member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d"> - If [code]true[/code] the viewport will process 2D audio streams. Default value: [code]false[/code]. + If [code]true[/code], the viewport will process 2D audio streams. Default value: [code]false[/code]. </member> <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener"> - If [code]true[/code] the viewport will process 3D audio streams. Default value: [code]false[/code]. + If [code]true[/code], the viewport will process 3D audio streams. Default value: [code]false[/code]. </member> <member name="canvas_transform" type="Transform2D" setter="set_canvas_transform" getter="get_canvas_transform"> The canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport. @@ -211,31 +227,33 @@ The overlay mode for test rendered geometry in debug purposes. Default value: [code]DEBUG_DRAW_DISABLED[/code]. </member> <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled"> - If [code]true[/code] the viewport will disable 3D rendering. For actual disabling use [code]usage[/code]. Default value: [code]false[/code]. + If [code]true[/code], the viewport will disable 3D rendering. For actual disabling use [code]usage[/code]. Default value: [code]false[/code]. </member> <member name="global_canvas_transform" type="Transform2D" setter="set_global_canvas_transform" getter="get_global_canvas_transform"> The global canvas transform of the viewport. The canvas transform is relative to this. </member> <member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled"> - If [code]true[/code] the viewport will not receive input event. Default value: [code]false[/code]. + If [code]true[/code], the viewport will not receive input event. Default value: [code]false[/code]. </member> <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]. + 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]. + If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. Default value: [code]true[/code]. </member> <member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear"> - If [code]true[/code] the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. + If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. </member> <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA"> The multisample anti-aliasing mode. Default value: [code]MSAA_DISABLED[/code]. </member> <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world"> - If [code]true[/code] the viewport will use [World] defined in [code]world[/code] property. Default value: [code]false[/code]. + If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property. Default value: [code]false[/code]. </member> <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking"> - If [code]true[/code] the objects rendered by viewport become subjects of mouse picking process. Default value: [code]false[/code]. + If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. Default value: [code]false[/code]. </member> <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode"> The clear mode when viewport used as a render target. Default value: [code]CLEAR_MODE_ALWAYS[/code]. @@ -244,7 +262,7 @@ The update mode when viewport used as a render target. Default value: [code]UPDATE_WHEN_VISIBLE[/code]. </member> <member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip"> - If [code]true[/code] the result of rendering will be flipped vertically. Default value: [code]false[/code]. + If [code]true[/code], the result of rendering will be flipped vertically. Default value: [code]false[/code]. </member> <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv"> The subdivision amount of first quadrant on shadow atlas. Default value: [code]SHADOW_ATLAS_QUADRANT_SUBDIV_4[/code]. @@ -265,7 +283,7 @@ The width and height of viewport. </member> <member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background"> - If [code]true[/code] the viewport should render its background as transparent. Default value: [code]false[/code]. + If [code]true[/code], the viewport should render its background as transparent. Default value: [code]false[/code]. </member> <member name="usage" type="int" setter="set_usage" getter="get_usage" enum="Viewport.Usage"> The rendering mode of viewport. Default value: [code]USAGE_3D[/code]. diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml index dde429440d..e022b8fa90 100644 --- a/doc/classes/ViewportContainer.xml +++ b/doc/classes/ViewportContainer.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled"> - If [code]true[/code] the viewport will be scaled to the control's size. Default value:[code]false[/code]. + If [code]true[/code], the viewport will be scaled to the control's size. Default value:[code]false[/code]. </member> <member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink"> </member> diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml index 5f0a4ef0f4..fc6ceac5de 100644 --- a/doc/classes/VisibilityEnabler.xml +++ b/doc/classes/VisibilityEnabler.xml @@ -14,10 +14,10 @@ </methods> <members> <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [RigidBody] nodes will be paused. + If [code]true[/code], [RigidBody] nodes will be paused. </member> <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [AnimationPlayer] nodes will be paused. + If [code]true[/code], [AnimationPlayer] nodes will be paused. </member> </members> <constants> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index eab9bd1991..8d393fc138 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -14,22 +14,22 @@ </methods> <members> <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [RigidBody2D] nodes will be paused. + If [code]true[/code], [RigidBody2D] nodes will be paused. </member> <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [AnimatedSprite] nodes will be paused. + If [code]true[/code], [AnimatedSprite] nodes will be paused. </member> <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [AnimationPlayer] nodes will be paused. + If [code]true[/code], [AnimationPlayer] nodes will be paused. </member> <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] [Particles2D] nodes will be paused. + If [code]true[/code], [Particles2D] nodes will be paused. </member> <member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] the parent's [method Node._physics_process] will be stopped. + If [code]true[/code], the parent's [method Node._physics_process] will be stopped. </member> <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled"> - If [code]true[/code] the parent's [method Node._process] will be stopped. + If [code]true[/code], the parent's [method Node._process] will be stopped. </member> </members> <constants> diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml index 95da708420..16329d1d0d 100644 --- a/doc/classes/VisibilityNotifier.xml +++ b/doc/classes/VisibilityNotifier.xml @@ -15,7 +15,7 @@ <return type="bool"> </return> <description> - If [code]true[/code] the bounding box is on the screen. + If [code]true[/code], the bounding box is on the screen. </description> </method> </methods> diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index aaaa9b63bb..c60591cce6 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -15,7 +15,7 @@ <return type="bool"> </return> <description> - If [code]true[/code] the bounding rectangle is on the screen. + If [code]true[/code], the bounding rectangle is on the screen. </description> </method> </methods> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 225a1f2bba..26a6bae48c 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -239,10 +239,6 @@ </argument> <argument index="3" name="normal_map" type="RID"> </argument> - <argument index="4" name="h_frames" type="int"> - </argument> - <argument index="5" name="v_frames" type="int"> - </argument> <description> Adds a particles system to the [CanvasItem]'s draw commands. </description> @@ -1117,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="depth_curve" type="float"> </argument> - <argument index="4" name="transmit" type="bool"> + <argument index="5" name="transmit" type="bool"> </argument> - <argument index="5" name="transmit_curve" type="float"> + <argument index="6" name="transmit_curve" type="float"> </argument> <description> </description> @@ -1163,7 +1161,9 @@ </argument> <argument index="8" name="hdr_bleed_scale" type="float"> </argument> - <argument index="9" name="bicubic_upscale" type="bool"> + <argument index="9" name="hdr_luminance_cap" type="float"> + </argument> + <argument index="10" name="bicubic_upscale" type="bool"> </argument> <description> </description> @@ -1188,6 +1188,16 @@ <description> </description> </method> + <method name="environment_set_sky_orientation"> + <return type="void"> + </return> + <argument index="0" name="env" type="RID"> + </argument> + <argument index="1" name="orientation" type="Basis"> + </argument> + <description> + </description> + </method> <method name="environment_set_ssao"> <return type="void"> </return> @@ -3103,7 +3113,7 @@ </return> <argument index="0" name="scenario" type="RID"> </argument> - <argument index="1" name="p_size" type="int"> + <argument index="1" name="size" type="int"> </argument> <argument index="2" name="subdiv" type="int"> </argument> @@ -3494,7 +3504,7 @@ <argument index="0" name="shrink" type="bool"> </argument> <description> - If [code]true[/code] sets internal processes to shrink all image data to half the size. + If [code]true[/code], sets internal processes to shrink all image data to half the size. </description> </method> <method name="texture_set_size_override"> @@ -3517,7 +3527,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - If [code]true[/code] the image will be stored in the texture's images array if overwritten. + If [code]true[/code], the image will be stored in the texture's images array if overwritten. </description> </method> <method name="viewport_attach_camera"> @@ -3610,10 +3620,10 @@ <argument index="1" name="active" type="bool"> </argument> <description> - If [code]true[/code] sets the viewport active, else sets it inactive. + If [code]true[/code], sets the viewport active, else sets it inactive. </description> </method> - <method name="viewport_set_canvas_layer"> + <method name="viewport_set_canvas_stacking"> <return type="void"> </return> <argument index="0" name="viewport" type="RID"> @@ -3622,8 +3632,11 @@ </argument> <argument index="2" name="layer" type="int"> </argument> + <argument index="3" name="sublayer" type="int"> + </argument> <description> - Sets the renderlayer for a viewport's canvas. + Sets the stacking order for a viewport's canvas. + [code]layer[/code] is the actual canvas layer, while [code]sublayer[/code] specifies the stacking order of the canvas among those in the same layer. </description> </method> <method name="viewport_set_canvas_transform"> @@ -3647,7 +3660,7 @@ <argument index="1" name="clear_mode" type="int" enum="VisualServer.ViewportClearMode"> </argument> <description> - Sets the clear mode of a viewport. See VIEWPORT_CLEAR_MODE_* constants for options. + Sets the clear mode of a viewport. See [enum VisualServer.ViewportClearMode] for options. </description> </method> <method name="viewport_set_debug_draw"> @@ -3658,7 +3671,7 @@ <argument index="1" name="draw" type="int" enum="VisualServer.ViewportDebugDraw"> </argument> <description> - Sets the debug draw mode of a viewport. See VIEWPORT_DEBUG_DRAW_* constants for options. + Sets the debug draw mode of a viewport. See [enum VisualServer.ViewportDebugDraw] for options. </description> </method> <method name="viewport_set_disable_3d"> @@ -3669,7 +3682,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]true[/code] a viewport's 3D rendering is disabled. + If [code]true[/code], a viewport's 3D rendering is disabled. </description> </method> <method name="viewport_set_disable_environment"> @@ -3680,7 +3693,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]true[/code] rendering of a viewport's environment is disabled. + If [code]true[/code], rendering of a viewport's environment is disabled. </description> </method> <method name="viewport_set_global_canvas_transform"> @@ -3702,7 +3715,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the viewport renders to hdr. + If [code]true[/code], the viewport renders to hdr. </description> </method> <method name="viewport_set_hide_canvas"> @@ -3713,7 +3726,7 @@ <argument index="1" name="hidden" type="bool"> </argument> <description> - If [code]true[/code] the viewport's canvas is not rendered. + If [code]true[/code], the viewport's canvas is not rendered. </description> </method> <method name="viewport_set_hide_scenario"> @@ -3805,7 +3818,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the viewport renders its background as transparent. + If [code]true[/code], the viewport renders its background as transparent. </description> </method> <method name="viewport_set_update_mode"> @@ -3838,7 +3851,7 @@ <argument index="1" name="use_arvr" type="bool"> </argument> <description> - If [code]true[/code] the viewport uses augmented or virtual reality technologies. See [ARVRInterface]. + If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [ARVRInterface]. </description> </method> <method name="viewport_set_vflip"> @@ -3849,7 +3862,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If [code]true[/code] the viewport's rendering is flipped vertically. + If [code]true[/code], the viewport's rendering is flipped vertically. </description> </method> </methods> @@ -4147,7 +4160,7 @@ The viewport is never cleared before drawing. </constant> <constant name="VIEWPORT_CLEAR_ONLY_NEXT_FRAME" value="2" enum="ViewportClearMode"> - The viewport is cleared once, then the clear mode is set to [VIEWPORT_CLEAR_NEVER]. + The viewport is cleared once, then the clear mode is set to [code]VIEWPORT_CLEAR_NEVER[/code]. </constant> <constant name="VIEWPORT_MSAA_DISABLED" value="0" enum="ViewportMSAA"> Multisample antialiasing is disabled. @@ -4340,6 +4353,12 @@ </constant> <constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat"> </constant> + <constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat"> + </constant> + <constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat"> + </constant> + <constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat"> + </constant> <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> </constant> <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode"> diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml index f7f2d10fcd..51931444fc 100644 --- a/doc/classes/WindowDialog.xml +++ b/doc/classes/WindowDialog.xml @@ -21,7 +21,7 @@ </methods> <members> <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable"> - If [code]true[/code] the user can resize the window. Default value: [code]false[/code]. + If [code]true[/code], the user can resize the window. Default value: [code]false[/code]. </member> <member name="window_title" type="String" setter="set_title" getter="get_title"> The text displayed in the window's title bar. diff --git a/doc/classes/World.xml b/doc/classes/World.xml index 540848e40a..4e954acd48 100644 --- a/doc/classes/World.xml +++ b/doc/classes/World.xml @@ -7,7 +7,7 @@ Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/ray-casting.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index 780cdd181a..9c3d66dade 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -7,7 +7,7 @@ Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/physics/ray-casting.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index e68ad2800e..8c212502d6 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="WorldEnvironment" inherits="Node" category="Core" version="3.1"> <brief_description> - Default environment properties for the entire scene (post-processing effects, lightning and background settings). + Default environment properties for the entire scene (post-processing effects, lighting and background settings). </brief_description> <description> The [code]WorldEnvironment[/code] node is used to configure the default [Environment] for the scene. @@ -9,7 +9,7 @@ The [code]WorldEnvironment[/code] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene. </description> <tutorials> - <link>http://docs.godotengine.org/en/3.0/tutorials/3d/environment_and_post_processing.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml index 45ae8645b1..e9233ff079 100644 --- a/doc/classes/YSort.xml +++ b/doc/classes/YSort.xml @@ -14,7 +14,7 @@ </methods> <members> <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled"> - If [code]true[/code] child nodes are sorted, otherwise sorting is disabled. Default: [code]true[/code]. + If [code]true[/code], child nodes are sorted, otherwise sorting is disabled. Default: [code]true[/code]. </member> </members> <constants> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 0c5536b5fe..7297f5bf94 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -17,7 +17,7 @@ <argument index="0" name="from" type="bool"> </argument> <description> - Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equals to 1.0 and [code]float(false)[/code] will be equals to 0.0. + Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. </description> </method> <method name="float"> @@ -26,7 +26,7 @@ <argument index="0" name="from" type="int"> </argument> <description> - Cast an [int] value to a floating point value, [code]float(1)[/code] will be equals to 1.0. + Cast an [int] value to a floating point value, [code]float(1)[/code] will be equal to 1.0. </description> </method> <method name="float"> @@ -35,7 +35,7 @@ <argument index="0" name="from" type="String"> </argument> <description> - Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return 0.001. + Cast a [String] value to a floating point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. </description> </method> </methods> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 4855fa2848..7175b9fd88 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -4,7 +4,21 @@ Integer built-in type. </brief_description> <description> - Integer built-in type. + Signed 64-bit integer type. + It can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. + [code]int[/code] is a [Variant] type, and will thus be used when assigning an integer value to a [Variant]. It can also be enforced with the [code]: int[/code] type hint. + [codeblock] + var my_variant = 0 # int, value 0 + my_variant += 4.2 # float, value 4.2 + var my_int: int = 1 # int, value 1 + my_int = 4.2 # int, value 4, the right value is implicitly cast to int + my_int = int("6.7") # int, value 6, the String is explicitly cast with [method int] + + var max_int = 9223372036854775807 + print(max_int) # 9223372036854775807, OK + max_int += 1 + print(max_int) # -9223372036854775808, we overflowed and wrapped around + [/codeblock] </description> <tutorials> </tutorials> diff --git a/doc/tools/doc_merge.py b/doc/tools/doc_merge.py index 57ac4bdcdd..496d5dcb74 100644 --- a/doc/tools/doc_merge.py +++ b/doc/tools/doc_merge.py @@ -82,7 +82,7 @@ def find_signal_descr(old_class, name): def find_constant_descr(old_class, name): - if (old_class == None): + if (old_class is None): return None constants = old_class.find("constants") if(constants != None and len(list(constants)) > 0): diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index ab74c0b9d6..4bb4342d5f 100644 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -229,11 +229,11 @@ class ClassStatus: output['overall'] = (description_progress + items_progress).to_colored_string('{percent}%', '{pad_percent}{s}') if self.name.startswith('Total'): - output['url'] = color('url', 'http://docs.godotengine.org/en/latest/classes/') + output['url'] = color('url', 'https://docs.godotengine.org/en/latest/classes/') if flags['s']: output['comment'] = color('part_good', 'ALL OK') else: - output['url'] = color('url', 'http://docs.godotengine.org/en/latest/classes/class_{name}.html'.format(name=self.name.lower())) + output['url'] = color('url', 'https://docs.godotengine.org/en/latest/classes/class_{name}.html'.format(name=self.name.lower())) if flags['s'] and not flags['g'] and self.is_ok(): output['comment'] = color('part_good', 'ALL OK') diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index b3d6d32c26..4b5785f604 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -1,73 +1,563 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 -import codecs +import argparse import sys import os import re import xml.etree.ElementTree as ET +from collections import defaultdict, OrderedDict -input_list = [] -cur_file = "" +# Uncomment to do type checks. I have it commented out so it works below Python 3.5 +#from typing import List, Dict, TextIO, Tuple, Iterable, Optional, DefaultDict, Any, Union # http(s)://docs.godotengine.org/<langcode>/<tag>/path/to/page.html(#fragment-tag) -godot_docs_pattern = re.compile('^http(?:s)?:\/\/docs\.godotengine\.org\/(?:[a-zA-Z0-9\.\-_]*)\/(?:[a-zA-Z0-9\.\-_]*)\/(.*)\.html(#.*)?$') +GODOT_DOCS_PATTERN = re.compile(r'^http(?:s)?://docs\.godotengine\.org/(?:[a-zA-Z0-9.\-_]*)/(?:[a-zA-Z0-9.\-_]*)/(.*)\.html(#.*)?$') -for arg in sys.argv[1:]: - if arg.endswith(os.sep): - arg = arg[:-1] - input_list.append(arg) -if len(input_list) < 1: - print('usage: makerst.py <path to folders> and/or <path to .xml files> (order of arguments irrelevant)') - print('example: makerst.py "../../modules/" "../classes" path_to/some_class.xml') - sys.exit(0) +def print_error(error, state): # type: (str, State) -> None + print(error) + state.errored = True -def validate_tag(elem, tag): - if elem.tag != tag: - print("Tag mismatch, expected '" + tag + "', got " + elem.tag) - sys.exit(255) +class TypeName: + def __init__(self, type_name, enum=None): # type: (str, Optional[str]) -> None + self.type_name = type_name + self.enum = enum + + def to_rst(self, state): # type: ("State") -> str + if self.enum is not None: + return make_enum(self.enum, state) + elif self.type_name == "void": + return "void" + else: + return make_type(self.type_name, state) + + @classmethod + def from_element(cls, element): # type: (ET.Element) -> "TypeName" + return cls(element.attrib["type"], element.get("enum")) + + +class PropertyDef: + def __init__(self, name, type_name, setter, getter, text): # type: (str, TypeName, Optional[str], Optional[str], Optional[str]) -> None + self.name = name + self.type_name = type_name + self.setter = setter + self.getter = getter + self.text = text + +class ParameterDef: + def __init__(self, name, type_name, default_value): # type: (str, TypeName, Optional[str]) -> None + self.name = name + self.type_name = type_name + self.default_value = default_value + + +class SignalDef: + def __init__(self, name, parameters, description): # type: (str, List[ParameterDef], Optional[str]) -> None + self.name = name + self.parameters = parameters + self.description = description + + +class MethodDef: + def __init__(self, name, return_type, parameters, description, qualifiers): # type: (str, TypeName, List[ParameterDef], Optional[str], Optional[str]) -> None + self.name = name + self.return_type = return_type + self.parameters = parameters + self.description = description + self.qualifiers = qualifiers + + +class ConstantDef: + def __init__(self, name, value, text): # type: (str, str, Optional[str]) -> None + self.name = name + self.value = value + self.text = text + + +class EnumDef: + def __init__(self, name): # type: (str) -> None + self.name = name + self.values = OrderedDict() # type: OrderedDict[str, ConstantDef] + + +class ThemeItemDef: + def __init__(self, name, type_name): # type: (str, TypeName) -> None + self.name = name + self.type_name = type_name + + +class ClassDef: + def __init__(self, name): # type: (str) -> None + self.name = name + self.constants = OrderedDict() # type: OrderedDict[str, ConstantDef] + self.enums = OrderedDict() # type: OrderedDict[str, EnumDef] + self.properties = OrderedDict() # type: OrderedDict[str, PropertyDef] + self.methods = OrderedDict() # type: OrderedDict[str, List[MethodDef]] + self.signals = OrderedDict() # type: OrderedDict[str, SignalDef] + self.inherits = None # type: Optional[str] + self.category = None # type: Optional[str] + self.brief_description = None # type: Optional[str] + self.description = None # type: Optional[str] + self.theme_items = None # type: Optional[OrderedDict[str, List[ThemeItemDef]]] + self.tutorials = [] # type: List[str] + + +class State: + def __init__(self): # type: () -> None + # Has any error been reported? + self.errored = False + self.classes = OrderedDict() # type: OrderedDict[str, ClassDef] + self.current_class = "" # type: str + + def parse_class(self, class_root): # type: (ET.Element) -> None + class_name = class_root.attrib["name"] + + class_def = ClassDef(class_name) + self.classes[class_name] = class_def + + inherits = class_root.get("inherits") + if inherits is not None: + class_def.inherits = inherits + + category = class_root.get("category") + if category is not None: + class_def.category = category + + brief_desc = class_root.find("brief_description") + if brief_desc is not None and brief_desc.text: + class_def.brief_description = brief_desc.text + + desc = class_root.find("description") + if desc is not None and desc.text: + class_def.description = desc.text + + properties = class_root.find("members") + if properties is not None: + for property in properties: + assert property.tag == "member" + + property_name = property.attrib["name"] + if property_name in class_def.properties: + print_error("Duplicate property '{}', file: {}".format(property_name, class_name), self) + continue + + type_name = TypeName.from_element(property) + setter = property.get("setter") or None # Use or None so '' gets turned into None. + getter = property.get("getter") or None + + property_def = PropertyDef(property_name, type_name, setter, getter, property.text) + class_def.properties[property_name] = property_def + + methods = class_root.find("methods") + if methods is not None: + for method in methods: + assert method.tag == "method" + + method_name = method.attrib["name"] + qualifiers = method.get("qualifiers") + + return_element = method.find("return") + if return_element is not None: + return_type = TypeName.from_element(return_element) + + else: + return_type = TypeName("void") + + params = parse_arguments(method) + + desc_element = method.find("description") + method_desc = None + if desc_element is not None: + method_desc = desc_element.text + + method_def = MethodDef(method_name, return_type, params, method_desc, qualifiers) + if method_name not in class_def.methods: + class_def.methods[method_name] = [] + + class_def.methods[method_name].append(method_def) + + constants = class_root.find("constants") + if constants is not None: + for constant in constants: + assert constant.tag == "constant" + + constant_name = constant.attrib["name"] + value = constant.attrib["value"] + enum = constant.get("enum") + constant_def = ConstantDef(constant_name, value, constant.text) + if enum is None: + if constant_name in class_def.constants: + print_error("Duplicate constant '{}', file: {}".format(constant_name, class_name), self) + continue + + class_def.constants[constant_name] = constant_def + + else: + if enum in class_def.enums: + enum_def = class_def.enums[enum] + + else: + enum_def = EnumDef(enum) + class_def.enums[enum] = enum_def + + enum_def.values[constant_name] = constant_def + + signals = class_root.find("signals") + if signals is not None: + for signal in signals: + assert signal.tag == "signal" + + signal_name = signal.attrib["name"] + + if signal_name in class_def.signals: + print_error("Duplicate signal '{}', file: {}".format(signal_name, class_name), self) + continue + + params = parse_arguments(signal) + + desc_element = signal.find("description") + signal_desc = None + if desc_element is not None: + signal_desc = desc_element.text + + signal_def = SignalDef(signal_name, params, signal_desc) + class_def.signals[signal_name] = signal_def + + theme_items = class_root.find("theme_items") + if theme_items is not None: + class_def.theme_items = OrderedDict() + for theme_item in theme_items: + assert theme_item.tag == "theme_item" + + theme_item_name = theme_item.attrib["name"] + theme_item_def = ThemeItemDef(theme_item_name, TypeName.from_element(theme_item)) + if theme_item_name not in class_def.theme_items: + class_def.theme_items[theme_item_name] = [] + class_def.theme_items[theme_item_name].append(theme_item_def) + + tutorials = class_root.find("tutorials") + if tutorials is not None: + for link in tutorials: + assert link.tag == "link" + + if link.text is not None: + class_def.tutorials.append(link.text) -class_names = [] -classes = {} + def sort_classes(self): # type: () -> None + self.classes = OrderedDict(sorted(self.classes.items(), key=lambda t: t[0])) + + +def parse_arguments(root): # type: (ET.Element) -> List[ParameterDef] + param_elements = root.findall("argument") + params = [None] * len(param_elements) # type: Any + for param_element in param_elements: + param_name = param_element.attrib["name"] + index = int(param_element.attrib["index"]) + type_name = TypeName.from_element(param_element) + default = param_element.get("default") + + params[index] = ParameterDef(param_name, type_name, default) + + cast = params # type: List[ParameterDef] + + return cast + + +def main(): # type: () -> None + parser = argparse.ArgumentParser() + parser.add_argument("path", nargs="+", help="A path to an XML file or a directory containing XML files to parse.") + group = parser.add_mutually_exclusive_group() + group.add_argument("--output", "-o", default=".", help="The directory to save output .rst files in.") + group.add_argument("--dry-run", action="store_true", help="If passed, no output will be generated and XML files are only checked for errors.") + args = parser.parse_args() + + file_list = [] # type: List[str] + + for path in args.path: + # Cut off trailing slashes so os.path.basename doesn't choke. + if path.endswith(os.sep): + path = path[:-1] + + if os.path.basename(path) == 'modules': + for subdir, dirs, _ in os.walk(path): + if 'doc_classes' in dirs: + doc_dir = os.path.join(subdir, 'doc_classes') + class_file_names = (f for f in os.listdir(doc_dir) if f.endswith('.xml')) + file_list += (os.path.join(doc_dir, f) for f in class_file_names) + + elif os.path.isdir(path): + file_list += (os.path.join(path, f) for f in os.listdir(path) if f.endswith('.xml')) + + elif os.path.isfile(path): + if not path.endswith(".xml"): + print("Got non-.xml file '{}' in input, skipping.".format(path)) + continue + + file_list.append(path) + + classes = {} # type: Dict[str, ET.Element] + state = State() + + for cur_file in file_list: + try: + tree = ET.parse(cur_file) + except ET.ParseError as e: + print_error("Parse error reading file '{}': {}".format(cur_file, e), state) + continue + doc = tree.getroot() + + if 'version' not in doc.attrib: + print_error("Version missing from 'doc', file: {}".format(cur_file), state) + continue + + name = doc.attrib["name"] + if name in classes: + print_error("Duplicate class '{}'".format(name), state) + continue + + classes[name] = doc + + for name, data in classes.items(): + try: + state.parse_class(data) + except Exception as e: + print_error("Exception while parsing class '{}': {}".format(name, e), state) + + state.sort_classes() + + for class_name, class_def in state.classes.items(): + state.current_class = class_name + make_rst_class(class_def, state, args.dry_run, args.output) + + if state.errored: + exit(1) + +def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, State, bool, str) -> None + class_name = class_def.name + + if dry_run: + f = open(os.devnull, "w") + else: + f = open(os.path.join(output_dir, "class_" + class_name.lower() + '.rst'), 'w', encoding='utf-8') + + # Warn contributors not to edit this file directly + f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n") + f.write(".. DO NOT EDIT THIS FILE, but the " + class_name + ".xml source instead.\n") + f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n") + + f.write(".. _class_" + class_name + ":\n\n") + f.write(make_heading(class_name, '=')) + + # Inheritance tree + # Ascendants + if class_def.inherits: + inh = class_def.inherits.strip() + f.write('**Inherits:** ') + first = True + while inh in state.classes: + if not first: + f.write(" **<** ") + else: + first = False + + f.write(make_type(inh, state)) + inode = state.classes[inh].inherits + if inode: + inh = inode.strip() + else: + break + f.write("\n\n") + + # Descendents + inherited = [] + for c in state.classes.values(): + if c.inherits and c.inherits.strip() == class_name: + inherited.append(c.name) + + if len(inherited): + f.write('**Inherited By:** ') + for i, child in enumerate(inherited): + if i > 0: + f.write(", ") + f.write(make_type(child, state)) + f.write("\n\n") + + # Category + if class_def.category is not None: + f.write('**Category:** ' + class_def.category.strip() + "\n\n") + + # Brief description + f.write(make_heading('Brief Description', '-')) + if class_def.brief_description is not None: + f.write(rstize_text(class_def.brief_description.strip(), state) + "\n\n") + + # Properties overview + if len(class_def.properties) > 0: + f.write(make_heading('Properties', '-')) + ml = [] # type: List[Tuple[str, str]] + for property_def in class_def.properties.values(): + type_rst = property_def.type_name.to_rst(state) + ref = ":ref:`{0}<class_{1}_property_{0}>`".format(property_def.name, class_name) + ml.append((type_rst, ref)) + format_table(f, ml) + + # Methods overview + if len(class_def.methods) > 0: + f.write(make_heading('Methods', '-')) + ml = [] + for method_list in class_def.methods.values(): + for m in method_list: + ml.append(make_method_signature(class_def, m, True, state)) + format_table(f, ml) + + # Theme properties + if class_def.theme_items is not None and len(class_def.theme_items) > 0: + f.write(make_heading('Theme Properties', '-')) + ml = [] + for theme_item_list in class_def.theme_items.values(): + for theme_item in theme_item_list: + ml.append((theme_item.type_name.to_rst(state), theme_item.name)) + format_table(f, ml) + + # Signals + if len(class_def.signals) > 0: + f.write(make_heading('Signals', '-')) + for signal in class_def.signals.values(): + #f.write(".. _class_{}_{}:\n\n".format(class_name, signal.name)) + f.write(".. _class_{}_signal_{}:\n\n".format(class_name, signal.name)) + _, signature = make_method_signature(class_def, signal, False, state) + f.write("- {}\n\n".format(signature)) + + if signal.description is None or signal.description.strip() == '': + continue + f.write(rstize_text(signal.description.strip(), state)) + f.write("\n\n") + + # Enums + if len(class_def.enums) > 0: + f.write(make_heading('Enumerations', '-')) + for e in class_def.enums.values(): + f.write(".. _enum_{}_{}:\n\n".format(class_name, e.name)) + # Sphinx seems to divide the bullet list into individual <ul> tags if we weave the labels into it. + # As such I'll put them all above the list. Won't be perfect but better than making the list visually broken. + # As to why I'm not modifying the reference parser to directly link to the _enum label: + # If somebody gets annoyed enough to fix it, all existing references will magically improve. + for value in e.values.values(): + f.write(".. _class_{}_constant_{}:\n\n".format(class_name, value.name)) + + f.write("enum **{}**:\n\n".format(e.name)) + for value in e.values.values(): + f.write("- **{}** = **{}**".format(value.name, value.value)) + if value.text is not None and value.text.strip() != '': + f.write(' --- ' + rstize_text(value.text.strip(), state)) + f.write('\n\n') + + # Constants + if len(class_def.constants) > 0: + f.write(make_heading('Constants', '-')) + # Sphinx seems to divide the bullet list into individual <ul> tags if we weave the labels into it. + # As such I'll put them all above the list. Won't be perfect but better than making the list visually broken. + for constant in class_def.constants.values(): + f.write(".. _class_{}_constant_{}:\n\n".format(class_name, constant.name)) + + for constant in class_def.constants.values(): + f.write("- **{}** = **{}**".format(constant.name, constant.value)) + if constant.text is not None and constant.text.strip() != '': + f.write(' --- ' + rstize_text(constant.text.strip(), state)) + f.write('\n\n') + + # Class description + if class_def.description is not None and class_def.description.strip() != '': + f.write(make_heading('Description', '-')) + f.write(rstize_text(class_def.description.strip(), state) + "\n\n") + + # Online tutorials + if len(class_def.tutorials) > 0: + f.write(make_heading('Tutorials', '-')) + for t in class_def.tutorials: + link = t.strip() + match = GODOT_DOCS_PATTERN.search(link) + if match: + groups = match.groups() + if match.lastindex == 2: + # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: + # `#calling-javascript-from-script in Exporting For Web` + f.write("- `" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n") + # Commented out alternative: Instead just emit: + # `Subsection in Exporting For Web` + # f.write("- `Subsection <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n") + elif match.lastindex == 1: + # Doc reference, for example: + # `Math` + f.write("- :doc:`../" + groups[0] + "`\n\n") + else: + # External link, for example: + # `http://enet.bespin.org/usergroup0.html` + f.write("- `" + link + " <" + link + ">`_\n\n") + + # Property descriptions + if len(class_def.properties) > 0: + f.write(make_heading('Property Descriptions', '-')) + for property_def in class_def.properties.values(): + #f.write(".. _class_{}_{}:\n\n".format(class_name, property_def.name)) + f.write(".. _class_{}_property_{}:\n\n".format(class_name, property_def.name)) + f.write('- {} **{}**\n\n'.format(property_def.type_name.to_rst(state), property_def.name)) + + setget = [] + if property_def.setter is not None and not property_def.setter.startswith("_"): + setget.append(("*Setter*", property_def.setter + '(value)')) + if property_def.getter is not None and not property_def.getter.startswith("_"): + setget.append(('*Getter*', property_def.getter + '()')) + + if len(setget) > 0: + format_table(f, setget) + + if property_def.text is not None and property_def.text.strip() != '': + f.write(rstize_text(property_def.text.strip(), state)) + f.write('\n\n') -def ul_string(str, ul): - str += "\n" - for i in range(len(str) - 1): - str += ul - str += "\n" - return str + # Method descriptions + if len(class_def.methods) > 0: + f.write(make_heading('Method Descriptions', '-')) + for method_list in class_def.methods.values(): + for i, m in enumerate(method_list): + if i == 0: + #f.write(".. _class_{}_{}:\n\n".format(class_name, m.name)) + f.write(".. _class_{}_method_{}:\n\n".format(class_name, m.name)) + ret_type, signature = make_method_signature(class_def, m, False, state) + f.write("- {} {}\n\n".format(ret_type, signature)) + + if m.description is None or m.description.strip() == '': + continue + f.write(rstize_text(m.description.strip(), state)) + f.write("\n\n") -def make_class_list(class_list, columns): - f = codecs.open('class_list.rst', 'wb', 'utf-8') - prev = 0 - col_max = len(class_list) / columns + 1 +def make_class_list(class_list, columns): # type: (List[str], int) -> None + # This function is no longer used. + f = open('class_list.rst', 'w', encoding='utf-8') + col_max = len(class_list) // columns + 1 print(('col max is ', col_max)) - col_count = 0 - row_count = 0 - last_initial = '' - fit_columns = [] + fit_columns = [] # type: List[List[str]] - for n in range(0, columns): - fit_columns += [[]] + for _ in range(0, columns): + fit_columns.append([]) - indexers = [] + indexers = [] # type List[str] last_initial = '' - idx = 0 - for n in class_list: - col = idx / col_max + for idx, name in enumerate(class_list): + col = idx // col_max if col >= columns: col = columns - 1 - fit_columns[col] += [n] + fit_columns[col].append(name) idx += 1 - if n[:1] != last_initial: - indexers += [n] - last_initial = n[:1] + if name[:1] != last_initial: + indexers.append(name) + last_initial = name[:1] row_max = 0 f.write("\n") @@ -111,7 +601,7 @@ def make_class_list(class_list, columns): f.close() -def rstize_text(text, cclass): +def rstize_text(text, state): # type: (str, State) -> str # Linebreak + tabs in the XML should become two line breaks unless in a "codeblock" pos = 0 while True: @@ -128,7 +618,8 @@ def rstize_text(text, cclass): if post_text.startswith("[codeblock]"): end_pos = post_text.find("[/codeblock]") if end_pos == -1: - sys.exit("ERROR! [codeblock] without a closing tag!") + print_error("[codeblock] without a closing tag, file: {}".format(state.current_class), state) + return "" code_text = post_text[len("[codeblock]"):end_pos] post_text = post_text[end_pos:] @@ -194,6 +685,7 @@ def rstize_text(text, cclass): # Handle [tags] inside_code = False pos = 0 + tag_depth = 0 while True: pos = text.find('[', pos) if pos == -1: @@ -209,53 +701,100 @@ def rstize_text(text, cclass): escape_post = False - if tag_text in class_names: - tag_text = make_type(tag_text) + if tag_text in state.classes: + tag_text = make_type(tag_text, state) escape_post = True else: # command cmd = tag_text space_pos = tag_text.find(' ') if cmd == '/codeblock': tag_text = '' + tag_depth -= 1 inside_code = False # Strip newline if the tag was alone on one if pre_text[-1] == '\n': pre_text = pre_text[:-1] elif cmd == '/code': tag_text = '``' + tag_depth -= 1 inside_code = False escape_post = True elif inside_code: tag_text = '[' + tag_text + ']' elif cmd.find('html') == 0: - cmd = tag_text[:space_pos] param = tag_text[space_pos + 1:] tag_text = param - elif cmd.find('method') == 0 or cmd.find('member') == 0 or cmd.find('signal') == 0: - cmd = tag_text[:space_pos] + elif cmd.startswith('method') or cmd.startswith('member') or cmd.startswith('signal') or cmd.startswith('constant'): param = tag_text[space_pos + 1:] if param.find('.') != -1: ss = param.split('.') if len(ss) > 2: - sys.exit("Bad reference: '" + param + "' in file: " + cur_file) - (class_param, method_param) = ss - tag_text = ':ref:`' + class_param + '.' + method_param + '<class_' + class_param + '_' + method_param + '>`' + print_error("Bad reference: '{}', file: {}".format(param, state.current_class), state) + class_param, method_param = ss + else: - tag_text = ':ref:`' + param + '<class_' + cclass + "_" + param + '>`' + class_param = state.current_class + method_param = param + + ref_type = "" + if class_param in state.classes: + class_def = state.classes[class_param] + if cmd.startswith("method"): + if method_param not in class_def.methods: + print_error("Unresolved method '{}', file: {}".format(param, state.current_class), state) + ref_type = "_method" + + elif cmd.startswith("member"): + if method_param not in class_def.properties: + print_error("Unresolved member '{}', file: {}".format(param, state.current_class), state) + ref_type = "_property" + + elif cmd.startswith("signal"): + if method_param not in class_def.signals: + print_error("Unresolved signal '{}', file: {}".format(param, state.current_class), state) + ref_type = "_signal" + + elif cmd.startswith("constant"): + found = False + if method_param in class_def.constants: + found = True + + else: + for enum in class_def.enums.values(): + if method_param in enum.values: + found = True + break + + if not found: + print_error("Unresolved constant '{}', file: {}".format(param, state.current_class), state) + ref_type = "_constant" + + else: + print_error("Unresolved type reference '{}' in method reference '{}', file: {}".format(class_param, param, state.current_class), state) + + repl_text = method_param + if class_param != state.current_class: + repl_text = "{}.{}".format(class_param, method_param) + tag_text = ':ref:`{}<class_{}{}_{}>`'.format(repl_text, class_param, ref_type, method_param) escape_post = True elif cmd.find('image=') == 0: tag_text = "" # '![](' + cmd[6:] + ')' elif cmd.find('url=') == 0: tag_text = ':ref:`' + cmd[4:] + '<' + cmd[4:] + ">`" + tag_depth += 1 elif cmd == '/url': tag_text = '' + tag_depth -= 1 escape_post = True elif cmd == 'center': + tag_depth += 1 tag_text = '' elif cmd == '/center': + tag_depth -= 1 tag_text = '' elif cmd == 'codeblock': + tag_depth += 1 tag_text = '\n::\n' inside_code = True elif cmd == 'br': @@ -265,22 +804,35 @@ def rstize_text(text, cclass): while post_text[0] == ' ': post_text = post_text[1:] elif cmd == 'i' or cmd == '/i': + if cmd == "/i": + tag_depth -= 1 + else: + tag_depth += 1 tag_text = '*' elif cmd == 'b' or cmd == '/b': + if cmd == "/b": + tag_depth -= 1 + else: + tag_depth += 1 tag_text = '**' elif cmd == 'u' or cmd == '/u': + if cmd == "/u": + tag_depth -= 1 + else: + tag_depth += 1 tag_text = '' elif cmd == 'code': tag_text = '``' + tag_depth += 1 inside_code = True elif cmd.startswith('enum '): - tag_text = make_enum(cmd[5:]) + tag_text = make_enum(cmd[5:], state) else: - tag_text = make_type(tag_text) + tag_text = make_type(tag_text, state) escape_post = True # Properly escape things like `[Node]s` - if escape_post and post_text and post_text[0].isalnum(): # not punctuation, escape + if escape_post and post_text and (post_text[0].isalnum() or post_text[0] == "("): # not punctuation, escape post_text = '\ ' + post_text next_brac_pos = post_text.find('[', 0) @@ -306,18 +858,21 @@ def rstize_text(text, cclass): text = pre_text + tag_text + post_text pos = len(pre_text) + len(tag_text) + if tag_depth > 0: + print_error("Tag depth mismatch: too many/little open/close tags, file: {}".format(state.current_class), state) + return text -def format_table(f, pp): +def format_table(f, pp): # type: (TextIO, Iterable[Tuple[str, ...]]) -> None longest_t = 0 longest_s = 0 for s in pp: sl = len(s[0]) - if (sl > longest_s): + if sl > longest_s: longest_s = sl tl = len(s[1]) - if (tl > longest_t): + if tl > longest_t: longest_t = tl sep = "+" @@ -330,27 +885,25 @@ def format_table(f, pp): f.write(sep) for s in pp: rt = s[0] - while (len(rt) < longest_s): + while len(rt) < longest_s: rt += " " st = s[1] - while (len(st) < longest_t): + while len(st) < longest_t: st += " " f.write("| " + rt + " | " + st + " |\n") f.write(sep) f.write('\n') -def make_type(t): - global class_names - if t in class_names: - return ':ref:`' + t + '<class_' + t + '>`' +def make_type(t, state): # type: (str, State) -> str + if t in state.classes: + return ':ref:`{0}<class_{0}>`'.format(t) + print_error("Unresolved type '{}', file: {}".format(t, state.current_class), state) return t -def make_enum(t): - global class_names +def make_enum(t, state): # type: (str, State) -> str p = t.find(".") - # Global enums such as Error are relative to @GlobalScope. if p >= 0: c = t[0:p] e = t[p + 1:] @@ -359,362 +912,61 @@ def make_enum(t): c = "@GlobalScope" e = "Variant." + e else: - # Things in GlobalScope don't have a period. - c = "@GlobalScope" + c = state.current_class e = t - if c in class_names: - return ':ref:`' + e + '<enum_' + c + '_' + e + '>`' - return t + if c in state.classes and e not in state.classes[c].enums: + c = "@GlobalScope" + if c in state.classes and e in state.classes[c].enums: + return ":ref:`{0}<enum_{1}_{0}>`".format(e, c) + print_error("Unresolved enum '{}', file: {}".format(t, state.current_class), state) + return t -def make_method( - f, - cname, - method_data, - declare, - event=False, - pp=None -): - if (declare or pp == None): - t = '- ' - else: - t = "" - - ret_type = 'void' - args = list(method_data) - mdata = {} - mdata['argidx'] = [] - for a in args: - if a.tag == 'return': - idx = -1 - elif a.tag == 'argument': - idx = int(a.attrib['index']) - else: - continue - mdata['argidx'].append(idx) - mdata[idx] = a +def make_method_signature(class_def, method_def, make_ref, state): # type: (ClassDef, Union[MethodDef, SignalDef], bool, State) -> Tuple[str, str] + ret_type = " " - if not event: - if -1 in mdata['argidx']: - if 'enum' in mdata[-1].attrib: - t += make_enum(mdata[-1].attrib['enum']) - else: - t += make_type(mdata[-1].attrib['type']) - else: - t += 'void' - t += ' ' + ref_type = "signal" + if isinstance(method_def, MethodDef): + ret_type = method_def.return_type.to_rst(state) + ref_type = "method" - if declare or pp == None: + out = "" - s = '**' + method_data.attrib['name'] + '** ' + if make_ref: + out += ":ref:`{0}<class_{1}_{2}_{0}>` ".format(method_def.name, class_def.name, ref_type) else: - s = ':ref:`' + method_data.attrib['name'] + '<class_' + cname + "_" + method_data.attrib['name'] + '>` ' - - s += '**(**' - argfound = False - for a in mdata['argidx']: - arg = mdata[a] - if a < 0: - continue - if a > 0: - s += ', ' - else: - s += ' ' + out += "**{}** ".format(method_def.name) - if 'enum' in arg.attrib: - s += make_enum(arg.attrib['enum']) - else: - s += make_type(arg.attrib['type']) - if 'name' in arg.attrib: - s += ' ' + arg.attrib['name'] + out += '**(**' + for i, arg in enumerate(method_def.parameters): + if i > 0: + out += ', ' else: - s += ' arg' + str(a) - - if 'default' in arg.attrib: - s += '=' + arg.attrib['default'] + out += ' ' - s += ' **)**' + out += "{} {}".format(arg.type_name.to_rst(state), arg.name) - if 'qualifiers' in method_data.attrib: - s += ' ' + method_data.attrib['qualifiers'] + if arg.default_value is not None: + out += '=' + arg.default_value - if (not declare): - if (pp != None): - pp.append((t, s)) + if isinstance(method_def, MethodDef) and method_def.qualifiers is not None and 'vararg' in method_def.qualifiers: + if len(method_def.parameters) > 0: + out += ', ...' else: - f.write("- " + t + " " + s + "\n") - else: - f.write(t + s + "\n") - - -def make_properties( - f, - cname, - prop_data, - description=False, - pp=None -): - t = "" - if 'enum' in prop_data.attrib: - t += make_enum(prop_data.attrib['enum']) - else: - t += make_type(prop_data.attrib['type']) - - if description: - s = '**' + prop_data.attrib['name'] + '**' - setget = [] - if 'setter' in prop_data.attrib and prop_data.attrib['setter'] != '' and not prop_data.attrib['setter'].startswith('_'): - setget.append(("*Setter*", prop_data.attrib['setter'] + '(value)')) - if 'getter' in prop_data.attrib and prop_data.attrib['getter'] != '' and not prop_data.attrib['getter'].startswith('_'): - setget.append(('*Getter*', prop_data.attrib['getter'] + '()')) - else: - s = ':ref:`' + prop_data.attrib['name'] + '<class_' + cname + "_" + prop_data.attrib['name'] + '>`' - - if (pp != None): - pp.append((t, s)) - elif description: - f.write('- ' + t + ' ' + s + '\n\n') - if len(setget) > 0: - format_table(f, setget) - - -def make_heading(title, underline): - return title + '\n' + underline * len(title) + "\n\n" - - -def make_rst_class(node): - name = node.attrib['name'] - - f = codecs.open("class_" + name.lower() + '.rst', 'wb', 'utf-8') - - # Warn contributors not to edit this file directly - f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n") - f.write(".. DO NOT EDIT THIS FILE, but the " + name + ".xml source instead.\n") - f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n") - - f.write(".. _class_" + name + ":\n\n") - f.write(make_heading(name, '=')) - - # Inheritance tree - # Ascendents - if 'inherits' in node.attrib: - inh = node.attrib['inherits'].strip() - f.write('**Inherits:** ') - first = True - while (inh in classes): - if (not first): - f.write(" **<** ") - else: - first = False - - f.write(make_type(inh)) - inode = classes[inh] - if ('inherits' in inode.attrib): - inh = inode.attrib['inherits'].strip() - else: - inh = None - f.write("\n\n") - - # Descendents - inherited = [] - for cn in classes: - c = classes[cn] - if 'inherits' in c.attrib: - if (c.attrib['inherits'].strip() == name): - inherited.append(c.attrib['name']) - if (len(inherited)): - f.write('**Inherited By:** ') - for i in range(len(inherited)): - if (i > 0): - f.write(", ") - f.write(make_type(inherited[i])) - f.write("\n\n") - - # Category - if 'category' in node.attrib: - f.write('**Category:** ' + node.attrib['category'].strip() + "\n\n") - - # Brief description - f.write(make_heading('Brief Description', '-')) - briefd = node.find('brief_description') - if briefd != None: - f.write(rstize_text(briefd.text.strip(), name) + "\n\n") - - # Properties overview - members = node.find('members') - if members != None and len(list(members)) > 0: - f.write(make_heading('Properties', '-')) - ml = [] - for m in list(members): - make_properties(f, name, m, False, ml) - format_table(f, ml) - - # Methods overview - methods = node.find('methods') - if methods != None and len(list(methods)) > 0: - f.write(make_heading('Methods', '-')) - ml = [] - for m in list(methods): - make_method(f, name, m, False, False, ml) - format_table(f, ml) - - # Theme properties - theme_items = node.find('theme_items') - if theme_items != None and len(list(theme_items)) > 0: - f.write(make_heading('Theme Properties', '-')) - ml = [] - for m in list(theme_items): - make_properties(f, name, m, False, ml) - format_table(f, ml) - - # Signals - events = node.find('signals') - if events != None and len(list(events)) > 0: - f.write(make_heading('Signals', '-')) - for m in list(events): - f.write(".. _class_" + name + "_" + m.attrib['name'] + ":\n\n") - make_method(f, name, m, True, True) - f.write('\n') - d = m.find('description') - if d == None or d.text.strip() == '': - continue - f.write(rstize_text(d.text.strip(), name)) - f.write("\n\n") - - # Constants and enums - constants = node.find('constants') - consts = [] - enum_names = set() - enums = [] - if constants != None and len(list(constants)) > 0: - for c in list(constants): - if 'enum' in c.attrib: - enum_names.add(c.attrib['enum']) - enums.append(c) - else: - consts.append(c) - - # Enums - if len(enum_names) > 0: - f.write(make_heading('Enumerations', '-')) - for e in enum_names: - f.write(".. _enum_" + name + "_" + e + ":\n\n") - f.write("enum **" + e + "**:\n\n") - for c in enums: - if c.attrib['enum'] != e: - continue - s = '- ' - s += '**' + c.attrib['name'] + '**' - if 'value' in c.attrib: - s += ' = **' + c.attrib['value'] + '**' - if c.text.strip() != '': - s += ' --- ' + rstize_text(c.text.strip(), name) - f.write(s + '\n\n') - - # Constants - if len(consts) > 0: - f.write(make_heading('Constants', '-')) - for c in list(consts): - s = '- ' - s += '**' + c.attrib['name'] + '**' - if 'value' in c.attrib: - s += ' = **' + c.attrib['value'] + '**' - if c.text.strip() != '': - s += ' --- ' + rstize_text(c.text.strip(), name) - f.write(s + '\n\n') - - # Class description - descr = node.find('description') - if descr != None and descr.text.strip() != '': - f.write(make_heading('Description', '-')) - f.write(rstize_text(descr.text.strip(), name) + "\n\n") - - # Online tutorials - global godot_docs_pattern - tutorials = node.find('tutorials') - if tutorials != None and len(tutorials) > 0: - f.write(make_heading('Tutorials', '-')) - for t in tutorials: - link = t.text.strip() - match = godot_docs_pattern.search(link); - if match: - groups = match.groups() - if match.lastindex == 2: - # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: - # `#calling-javascript-from-script in Exporting For Web` - f.write("- `" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n") - # Commented out alternative: Instead just emit: - # `Subsection in Exporting For Web` - # f.write("- `Subsection <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n") - elif match.lastindex == 1: - # Doc reference, for example: - # `Math` - f.write("- :doc:`../" + groups[0] + "`\n\n") - else: - # External link, for example: - # `http://enet.bespin.org/usergroup0.html` - f.write("- `" + link + " <" + link + ">`_\n\n") - - # Property descriptions - members = node.find('members') - if members != None and len(list(members)) > 0: - f.write(make_heading('Property Descriptions', '-')) - for m in list(members): - f.write(".. _class_" + name + "_" + m.attrib['name'] + ":\n\n") - make_properties(f, name, m, True) - if m.text.strip() != '': - f.write(rstize_text(m.text.strip(), name)) - f.write('\n\n') - - # Method descriptions - methods = node.find('methods') - if methods != None and len(list(methods)) > 0: - f.write(make_heading('Method Descriptions', '-')) - for m in list(methods): - f.write(".. _class_" + name + "_" + m.attrib['name'] + ":\n\n") - make_method(f, name, m, True) - f.write('\n') - d = m.find('description') - if d == None or d.text.strip() == '': - continue - f.write(rstize_text(d.text.strip(), name)) - f.write("\n\n") - - -file_list = [] + out += '...' -for path in input_list: - if os.path.basename(path) == 'modules': - for subdir, dirs, _ in os.walk(path): - if 'doc_classes' in dirs: - doc_dir = os.path.join(subdir, 'doc_classes') - class_file_names = [f for f in os.listdir(doc_dir) if f.endswith('.xml')] - file_list += [os.path.join(doc_dir, f) for f in class_file_names] - elif not os.path.isfile(path): - file_list += [os.path.join(path, f) for f in os.listdir(path) if f.endswith('.xml')] - elif os.path.isfile(path) and path.endswith('.xml'): - file_list.append(path) + out += ' **)**' -for cur_file in file_list: - tree = ET.parse(cur_file) - doc = tree.getroot() + if isinstance(method_def, MethodDef) and method_def.qualifiers is not None: + out += ' ' + method_def.qualifiers - if 'version' not in doc.attrib: - print("Version missing from 'doc'") - sys.exit(255) + return ret_type, out - version = doc.attrib['version'] - if doc.attrib['name'] in class_names: - continue - class_names.append(doc.attrib['name']) - classes[doc.attrib['name']] = doc -class_names.sort() +def make_heading(title, underline): # type: (str, str) -> str + return title + '\n' + (underline * len(title)) + "\n\n" -# Don't make class list for Sphinx, :toctree: handles it -# make_class_list(class_names, 2) -for cn in class_names: - c = classes[cn] - make_rst_class(c) +if __name__ == '__main__': + main() |