diff options
Diffstat (limited to 'doc')
226 files changed, 2803 insertions, 1300 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 20ec9141c6..072eec800f 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"> @@ -751,6 +771,10 @@ <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"> @@ -759,6 +783,10 @@ <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"> @@ -1001,7 +1029,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 e05af0f1ac..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> 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/Animation.xml b/doc/classes/Animation.xml index f189e6451d..a7cae709a4 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") @@ -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"> 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/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 3b3638a4f3..499da4b8a3 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -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> diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index a081c64f6d..b0b58fc7bd 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -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]. 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..6bd0ef3421 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -196,10 +196,10 @@ <description> Return true if the array contains 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> 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/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/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index 87c622e3bb..008c644466 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -15,7 +15,7 @@ </methods> <members> <member name="damping" type="float" setter="set_damping" getter="get_damping"> - Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code]. + Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="dry" type="float" setter="set_dry" getter="get_dry"> Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: [code]1[/code]. diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 3ae5454e65..96f02137cf 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -61,6 +61,15 @@ Generates an [AudioBusLayout] using the available busses 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> @@ -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"> @@ -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"> diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index 96ce53b14f..c0a16adda9 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -4,7 +4,7 @@ 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>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index be4e4f137a..e880fc1323 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -7,7 +7,6 @@ Plays background audio. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/learning/features/audio/index.html</link> <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <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 3b81894c14..28754f8695 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -7,7 +7,6 @@ Plays audio that dampens with distance from screen center. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/learning/features/audio/index.html</link> <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <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 5841f1f6dc..a0260d8261 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -7,7 +7,6 @@ Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. </description> <tutorials> - <link>https://docs.godotengine.org/en/latest/learning/features/audio/index.html</link> <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> </tutorials> <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 8e27dc8d5d..d376bf667f 100644 --- a/doc/classes/BakedLightmap.xml +++ b/doc/classes/BakedLightmap.xml @@ -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 95f6346321..b96daed6fc 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -9,7 +9,6 @@ </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link> - <link>https://docs.godotengine.org/en/latest/tutorials/math/rotations.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 c778cd56b3..2073ca0664 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -127,11 +127,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> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index bae725d47c..12a176589c 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -123,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> diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index c7eb365891..f4b1bc1519 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -138,7 +138,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 4bae656740..0ec28f93a7 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -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/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..48a198b248 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -53,7 +53,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 +171,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"> @@ -199,7 +199,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/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index 5b940e7ff1..f63adbf71a 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -17,10 +17,10 @@ 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="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> The polygon's list of vertices. The final point will be connected to the first. 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/Control.xml b/doc/classes/Control.xml index 76a475e49d..f067b50c72 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -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. </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. 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> @@ -921,16 +932,19 @@ 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. </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. 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, 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. </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 wil 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 wil 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..a9e2a38dcf 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -41,6 +41,17 @@ Erase a dictionary key/value pair by key. </description> </method> + <method name="get"> + <return type="Variant"> + </return> + <argument index="0" name="key" type="Variant"> + </argument> + <argument index="1" name="default" type="Variant" default="Null"> + </argument> + <description> + Returns the current value for the specified key in the [code]Dictionary[/code]. If the key does not exist, the method returns the value of the optional default argument, or Null if it is omitted. + </description> + </method> <method name="has"> <return type="bool"> </return> diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml index 86c8f2f03a..4a2802ffa4 100644 --- a/doc/classes/DirectionalLight.xml +++ b/doc/classes/DirectionalLight.xml @@ -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/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 24201c39b9..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 @@ -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/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 feaa24b0ab..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>https://docs.godotengine.org/en/latest/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> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 0c5de68d98..e69f3b0119 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -20,7 +20,7 @@ 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] diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index 2081ae7a4d..c3ecd3c3b7 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. These are created by [method EditorSpatialGizmoPlugin.create_gizmo]. </description> <tutorials> </tutorials> diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml new file mode 100644 index 0000000000..521ec748b3 --- /dev/null +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorSpatialGizmoPlugin" inherits="Resource" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </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> + </description> + </method> + <method name="can_be_hidden" qualifiers="virtual"> + <return type="bool"> + </return> + <description> + </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> + </description> + </method> + <method name="create_gizmo" qualifiers="virtual"> + <return type="EditorSpatialGizmo"> + </return> + <argument index="0" name="spatial" type="Spatial"> + </argument> + <description> + </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> + </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> + </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> + </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> + </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> + </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> + </description> + </method> + <method name="get_name" qualifiers="virtual"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="has_gizmo" qualifiers="virtual"> + <return type="bool"> + </return> + <argument index="0" name="spatial" type="Spatial"> + </argument> + <description> + </description> + </method> + <method name="is_gizmo_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> + </description> + </method> + <method name="is_selectable_when_hidden" qualifiers="virtual"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="redraw" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="gizmo" type="EditorSpatialGizmo"> + </argument> + <description> + </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> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 4c2c83e55f..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 @@ -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/File.xml b/doc/classes/File.xml index 1745389833..1967349546 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -330,7 +330,7 @@ <method name="store_csv_line"> <return type="void"> </return> - <argument index="0" name="values" type="PoolStringArray" default="",""> + <argument index="0" name="values" type="PoolStringArray"> </argument> <argument index="1" name="delim" type="String" default="",""> </argument> @@ -404,7 +404,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/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/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/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 346ab9d357..a304f34ed2 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -4,7 +4,7 @@ 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> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 2f21505757..5436e2b1eb 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -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 3916eb2b5b..3271fef8e3 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -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/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/InputEventAction.xml b/doc/classes/InputEventAction.xml index 8a10dc6ab9..bd0d774180 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -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 18e33c2131..1875ea508a 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -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/InputEventKey.xml b/doc/classes/InputEventKey.xml index 0118fda2df..4d8a2f6242 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -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/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index 1342c7bf7e..8603a4f673 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -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/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 55f04cdd94..8b1b9cae9f 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -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/InputMap.xml b/doc/classes/InputMap.xml index 8c25f851db..3779aa399f 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -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 0b8ede92d5..4df8a14804 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -388,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/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 df8fb251ba..ad41f48ddd 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -89,7 +89,7 @@ </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 a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method. [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 collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. @@ -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 8a644447ca..986010f832 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -89,12 +89,12 @@ </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 a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method. [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_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"> @@ -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. </member> </members> <constants> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index cf873e5b28..a7b0d86a7a 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -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 c90dba1561..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] 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 990f928b25..42f08b36af 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -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]. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index dcdb6d0500..02a8ee8e75 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -11,7 +11,7 @@ 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. @@ -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"> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index e955f6bb7d..80f9329402 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -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 e218949757..f6ad71b6e2 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -210,6 +210,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 +371,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"> @@ -663,12 +684,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"> @@ -715,7 +746,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"> @@ -739,28 +770,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> 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..58ad268f05 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -14,7 +14,7 @@ </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]. 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 7dea004b90..432ca4b23f 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -18,7 +18,7 @@ node.add_child(rigid) # change owner of rigid, but not of collision - rigid.set_owner(node) + rigid.owner = node var scene = PackedScene.new() # only node and rigid are now packed @@ -61,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 6416e409a3..a6d23ed0f2 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -33,7 +33,7 @@ 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]. @@ -46,12 +46,12 @@ 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"> </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. diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 2904d4c578..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]. @@ -51,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]. @@ -69,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]. @@ -84,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]. @@ -105,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]. @@ -120,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]. @@ -129,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]. @@ -147,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]. @@ -225,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 81db70f435..1bffea0c09 100644 --- a/doc/classes/Physics2DDirectSpaceState.xml +++ b/doc/classes/Physics2DDirectSpaceState.xml @@ -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> diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index 84e15d3b26..cd887ff950 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -1128,7 +1128,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/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index 2f3501ae5d..2b4125aef4 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"> diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml index 350a9ed3ce..c4dc103b72 100644 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -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]. </description> </method> <method name="collide_shape"> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index c836414dd2..e3ed43e7bc 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"> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index bf4519fd0a..9803837e5d 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -80,18 +80,20 @@ </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. @@ -99,9 +101,9 @@ <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. </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/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 9706ea4e60..6b53615535 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,6 +213,9 @@ </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> @@ -577,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. @@ -588,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> @@ -672,6 +670,10 @@ <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> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 468839dfba..990dcc7a91 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -10,7 +10,6 @@ </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link> - <link>https://docs.godotengine.org/en/latest/tutorials/math/rotations.html</link> </tutorials> <demos> </demos> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index aee9654561..5badfba923 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -10,7 +10,14 @@ <demos> </demos> <methods> - <method name="rand_range"> + <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"> @@ -21,18 +28,22 @@ Generates pseudo-random float between [code]from[/code] and [code]to[/code]. </description> </method> - <method name="randf"> - <return type="float"> + <method name="randi"> + <return type="int"> </return> <description> - Generates pseudo-random float between '0.0' and '1.0'. + Generates pseudo-random 32-bit unsigned integer between '0' and '4294967295'. </description> </method> - <method name="randi"> + <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 integer between '0' and '4294967295'. + Generates pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code](inclusive). </description> </method> <method name="randomize"> 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 1392e53f8d..45bfd16cb8 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -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/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/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/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 145ce7537b..dcfb980e21 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -118,7 +118,7 @@ <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"> @@ -225,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. @@ -264,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 4ff332402b..3f28156915 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -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"> @@ -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..68e78ba5d4 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"> @@ -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 dd94ee66d2..f39d221d89 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -192,7 +192,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 +236,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 +270,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/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..0b427fc089 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 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). </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/Shape2D.xml b/doc/classes/Shape2D.xml index 96b8a77d9e..fc773faf5e 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -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/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/Spatial.xml b/doc/classes/Spatial.xml index 6f9d779737..518a942cc2 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -4,8 +4,8 @@ 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>https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link> @@ -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 392a550ee4..62a34821fe 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -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. @@ -181,7 +185,7 @@ 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="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]. + 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/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/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/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/TabContainer.xml b/doc/classes/TabContainer.xml index f17c10b31e..04285b62df 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> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 350b49513d..de57250d8b 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"> 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..8c6acd2c51 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> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 7034d75473..fb5a733ccd 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -37,6 +37,16 @@ Returns the tile index of the given 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"> <return type="int"> </return> @@ -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..9e31f7e1b1 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"> @@ -304,7 +483,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"> @@ -508,7 +687,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/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 e792835605..c3af586b21 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -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..93806ac326 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -102,8 +102,11 @@ <method name="clear_history"> <return type="void"> </return> + <argument index="0" name="increase_version" type="bool" default="true"> + </argument> <description> Clear the undo/redo history and associated references. + Passing [code]false[/code] to [code]increase_version[/code] will prevent the version number to be increased from this. </description> </method> <method name="commit_action"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 006a843c32..1770dec80d 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -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/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 2cdd8c407f..880dc43c90 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -125,6 +125,12 @@ <description> </description> </method> + <method name="is_input_handled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="is_size_override_enabled" qualifiers="const"> <return type="bool"> </return> @@ -147,6 +153,12 @@ <description> </description> </method> + <method name="set_input_as_handled"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="set_size_override"> <return type="void"> </return> @@ -166,7 +178,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 +208,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 +223,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 +258,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 +279,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 46a06d63d4..26a6bae48c 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -1113,11 +1113,13 @@ </argument> <argument index="2" name="depth_begin" type="float"> </argument> - <argument index="3" name="depth_curve" type="float"> + <argument index="3" name="depth_end" type="float"> </argument> - <argument index="4" name="transmit" type="bool"> + <argument index="4" name="depth_curve" type="float"> </argument> - <argument index="5" name="transmit_curve" type="float"> + <argument index="5" name="transmit" type="bool"> + </argument> + <argument index="6" name="transmit_curve" type="float"> </argument> <description> </description> @@ -1159,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> @@ -1184,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> @@ -3099,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> @@ -3490,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"> @@ -3513,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"> @@ -3606,7 +3620,7 @@ <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_stacking"> @@ -3646,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"> @@ -3657,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"> @@ -3668,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"> @@ -3679,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"> @@ -3701,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"> @@ -3712,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"> @@ -3804,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"> @@ -3837,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"> @@ -3848,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> @@ -4146,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. @@ -4339,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/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index 45e1af4e42..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. 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/tools/makerst.py b/doc/tools/makerst.py index 7b7cc52547..22c0b5d1fd 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) + + + + 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) -class_names = [] -classes = {} + # 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: + 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: - tag_text = ':ref:`' + param + '<class_' + cclass + "_" + param + '>`' + 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,55 @@ 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 + '>`' + 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 is 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 +def make_method_signature(class_def, method_def, make_ref, state): # type: (ClassDef, Union[MethodDef, SignalDef], bool, State) -> Tuple[str, str] + ret_type = " " - mdata['argidx'].append(idx) - mdata[idx] = a - - 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 is 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']) + out += '**(**' + for i, arg in enumerate(method_def.parameters): + if i > 0: + out += ', ' else: - s += make_type(arg.attrib['type']) - if 'name' in arg.attrib: - s += ' ' + arg.attrib['name'] - else: - s += ' arg' + str(a) - - if 'default' in arg.attrib: - s += '=' + arg.attrib['default'] - - s += ' **)**' - - if 'qualifiers' in method_data.attrib: - s += ' ' + method_data.attrib['qualifiers'] - - if (not declare): - if (pp != None): - pp.append((t, s)) - 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 is 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 is None or d.text.strip() == '': - continue - f.write(rstize_text(d.text.strip(), name)) - f.write("\n\n") + out += ' ' + out += "{} {}".format(arg.type_name.to_rst(state), arg.name) -file_list = [] + if arg.default_value is not None: + out += '=' + arg.default_value -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() |